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.jpa
Interface EntityManagerManager

All Known Implementing Classes:
  EntityManagerManagerImpl

    public interface EntityManagerManager

Manages `EntityManager`s for the current thread. An `EntityManager` is created as needed and closed at the end of each request.

The implementation of this service is per-thread.

Since:
  5.3

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.

Method Detail

### getEntityManager

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

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

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

### getEntityManagers

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

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

  Returns:
    Map in which persistence unit names are associated with EntityManagers

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.