Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.jpa
Class EntityManagerManagerImpl

    java.lang.Object
      org.apache.tapestry5.internal.jpa.EntityManagerManagerImpl

All Implemented Interfaces:
  java.util.EventListener, ThreadCleanupListener, EntityManagerManager

    public class EntityManagerManagerImpl

extends java.lang.Object
implements EntityManagerManager, ThreadCleanupListener

Constructor Summary
`EntityManagerManagerImpl(EntityManagerSource entityManagerSource, org.slf4j.Logger logger)`

Method Summary
`javax.persistence.EntityManager` | `getEntityManager(java.lang.String persistenceUnitName)` Gets the active `EntityManager` for this request, creating it as necessary.
`java.util.Map<java.lang.String,javax.persistence.EntityManager>` | `getEntityManagers()` Gets all active `EntityManager`s for this request, creating them as necessary.
`void` | `threadDidCleanup()` Invoked by `PerthreadManager` service when a thread performs and end-of-request cleanup.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EntityManagerManagerImpl

    public EntityManagerManagerImpl(EntityManagerSource entityManagerSource,
                                    org.slf4j.Logger logger)

Method Detail

### getEntityManager

    public javax.persistence.EntityManager getEntityManager(java.lang.String persistenceUnitName)

  Gets the active `EntityManager` for this request, creating it as necessary.

  Specified by:
    `getEntityManager` in interface `EntityManagerManager`
  Parameters:
    `persistenceUnitName` - the name of a persistence unit as defined in `persistence.xml```
  Returns:
    EntityManager for the persistence unit,

### getEntityManagers

    public java.util.Map<java.lang.String,javax.persistence.EntityManager> getEntityManagers()

  Gets all active `EntityManager`s for this request, creating them as necessary.

  Specified by:
    `getEntityManagers` in interface `EntityManagerManager`
  Returns:
    Map in which persistence unit names are associated with EntityManagers

### threadDidCleanup

    public void threadDidCleanup()

  Description copied from interface: `ThreadCleanupListener`
  Invoked by `PerthreadManager` service when a thread performs and end-of-request cleanup.

  Specified by:
    `threadDidCleanup` in interface `ThreadCleanupListener`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.