addCurrent() Create a new EntityManager on each PersistenceContext.
public void
addExtraPersistenceUnitInfos(JPersistenceUnitInfo[] newPersistenceUnitInfos) Adds new persistence unit infos to this persistence unit manager.
Note: The persistence unit name have to be different from existing persistence units.
public void
closeCurrentAndReturnToPrevious() Sets back to the previous entity manager and close the current entity
manager for each persistence context.
public EntityManager
getEntityManager(String unitName, PersistenceContextType type) Gets an entity manager for the given unit name and the extra attributes.
Adds new persistence unit infos to this persistence unit manager.
Note: The persistence unit name have to be different from existing persistence units.
Parameters: newPersistenceUnitInfos - a list of persistence unit infos.
closeCurrentAndReturnToPrevious
public void closeCurrentAndReturnToPrevious()(Code)
Sets back to the previous entity manager and close the current entity
manager for each persistence context.
getEntityManager
public EntityManager getEntityManager(String unitName, PersistenceContextType type)(Code)
Gets an entity manager for the given unit name and the extra attributes.
Parameters: unitName - the name of the persistence unit Parameters: type - the type of the persistence context entity manager corresponding to arguments
getEntityManagerFactory
public EntityManagerFactory getEntityManagerFactory(String unitName)(Code)
Gets an entity manager factory for the given unit name.
Parameters: unitName - the name of the persistence unit entity manager factory.
Merge the persistence context of a an other persistent unit manager in
this one. Note that as specified in chapter 6.2.2 (persistence unit
scope), an EAR level component level will only be seen by a subcomponent
if it was not redefined. In our case : don't merge the given unit-name if
the current manager defines this unit-name.
Parameters: otherEZBPersistenceUnitManager - the other persistence unit managerthat will be merged into this one.