public abstract class AbstractEntityManagerStore extends Object implements EntityManagerStore
Stores produced entity managers. When the EntityManagerProducer try to create an entity manager it will seach
this store for a cached instance, only creating a new instance if this cache doesn't contain a suitable one.
There are several concrete implementations of this class, each one corresponding to a scoped cache (ex:
RequestEntityManagerStore stores Entity Managers on the request scope). To select witch implementation is
used (and with that, what scope is used to store Entity Managers) open the "demoiselle.properties" file and edit the
property "frameworkdemoiselle.persistence.entitymanager.scope". The default scope is the RequestScoped.
| Constructor and Description |
|---|
AbstractEntityManagerStore() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,javax.persistence.EntityManager> |
getCache() |
javax.persistence.EntityManager |
getEntityManager(String persistenceUnit) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, terminatepublic javax.persistence.EntityManager getEntityManager(String persistenceUnit)
getEntityManager in interface EntityManagerStorepublic Map<String,javax.persistence.EntityManager> getCache()
getCache in interface EntityManagerStoreCopyright © 2018 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.