br.gov.frameworkdemoiselle.internal.producer
Class AbstractEntityManagerStore
java.lang.Object
br.gov.frameworkdemoiselle.internal.producer.AbstractEntityManagerStore
- All Implemented Interfaces:
- EntityManagerStore, Serializable
- Direct Known Subclasses:
- ApplicationEntityManagerStore, ConversationEntityManagerStore, DependentEntityManagerStore, RequestEntityManagerStore, SessionEntityManagerStore, ViewEntityManagerStore
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.
- Author:
- serpro
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEntityManagerStore
public AbstractEntityManagerStore()
getEntityManager
public javax.persistence.EntityManager getEntityManager(String persistenceUnit)
- Specified by:
getEntityManager in interface EntityManagerStore
getCache
public Map<String,javax.persistence.EntityManager> getCache()
- Specified by:
getCache in interface EntityManagerStore
Copyright © 2013 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.