Package org.wicketstuff.javaee
Class EntityManagerFactoryLocator
java.lang.Object
org.wicketstuff.javaee.EntityManagerFactoryLocator
- All Implemented Interfaces:
Serializable
,IProxyTargetLocator
,IClusterable
Implementation of
private @PersistenceUnit(unitName="defaultPersistenceContext") EntityManagerFactory emf; The 'unitName' attribute is mandatory, and refers to the name of the persistence unit you have declared in your persistence.xml file
IProxyTargetLocator
to locate Java EE 5 EntityManagerFactory
To use this technique in a Wicket Page, just insert a line likeprivate @PersistenceUnit(unitName="defaultPersistenceContext") EntityManagerFactory emf; The 'unitName' attribute is mandatory, and refers to the name of the persistence unit you have declared in your persistence.xml file
- Author:
- Filippo Diotalevi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EntityManagerFactoryLocator
Constructor- Parameters:
pUnit
- - persistence unit
-
-
Method Details
-
locateProxyTarget
- Specified by:
locateProxyTarget
in interfaceIProxyTargetLocator
- See Also:
-
equals
-
hashCode
public int hashCode() -
getPersistenceUnit
-