|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.ejb.Ejb3Configuration
EntityManagerFactory
as outlined in the JPA specification, section 7.3 Obtaining an Entity
Manager Factory based on runtime environment. Additionally this class will be removed in Hibernate release
5.0 for the same reasoning outlined on Configuration
due to move towards new
SessionFactory
building methodology. See
HHH-6181 and
HHH-6159 for details
@Deprecated public class Ejb3Configuration
Allow a fine tuned configuration of an EJB 3.0 EntityManagerFactory
A Ejb3Configuration object is only guaranteed to create one EntityManagerFactory.
Multiple usage of buildEntityManagerFactory()
is not guaranteed.
After #buildEntityManagerFactory() has been called, you no longer can change the configuration
state (no class adding, no property change etc)
When serialized / deserialized or retrieved from the JNDI, you no longer can change the
configuration state (no class adding, no property change etc)
Putting the configuration in the JNDI is an expensive operation that requires a partial
serialization
Constructor Summary | |
---|---|
Ejb3Configuration()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Ejb3Configuration()
Method Detail |
---|
public void setDataSource(DataSource ds)
public Ejb3Configuration configure(PersistenceMetadata metadata, Map overridesIn)
metadata
- The information parsed from the persistence.xmloverridesIn
- Any explicitly passed config settings
public Ejb3Configuration configure(String persistenceUnitName, Map integration)
persistenceUnitName
- persistence unit nameintegration
- properties passed to the persistence provider
HibernatePersistence.createEntityManagerFactory(String, java.util.Map)
public Ejb3Configuration configure(PersistenceUnitInfo info, Map integration)
PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
.
In Hibernate EM, this correlates to HibernatePersistence.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
info
- The persistence unit info passed in by the container (usually from processing a persistence.xml).integration
- The map of integration properties from the container to configure the provider.
HibernatePersistence.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
public Ejb3Configuration setProperty(String key, String value)
@Deprecated public EntityManagerFactory createEntityManagerFactory(Map workingVars)
@Deprecated public EntityManagerFactory createEntityManagerFactory()
public EntityManagerFactory buildEntityManagerFactory()
public EntityManagerFactory buildEntityManagerFactory(BootstrapServiceRegistryBuilder builder)
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
public Ejb3Configuration configure(Map configValues)
public Ejb3Configuration addProperties(Properties props)
public Ejb3Configuration addAnnotatedClass(Class persistentClass) throws MappingException
MappingException
public Ejb3Configuration configure(String resource) throws HibernateException
HibernateException
public Ejb3Configuration addPackage(String packageName) throws MappingException
MappingException
public Ejb3Configuration addFile(String xmlFile) throws MappingException
MappingException
public Ejb3Configuration addClass(Class persistentClass) throws MappingException
MappingException
public Ejb3Configuration addFile(File xmlFile) throws MappingException
MappingException
public void buildMappings()
public Iterator getClassMappings()
public Iterator getTableMappings()
public PersistentClass getClassMapping(String persistentClass)
public Collection getCollectionMapping(String role)
public void setEntityResolver(EntityResolver entityResolver)
public Map getNamedQueries()
public Interceptor getInterceptor()
public Properties getProperties()
public Ejb3Configuration setInterceptor(Interceptor interceptor)
public Ejb3Configuration setProperties(Properties properties)
public Map getFilterDefinitions()
public void addFilterDefinition(FilterDefinition definition)
public void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject object)
public NamingStrategy getNamingStrategy()
public Ejb3Configuration setNamingStrategy(NamingStrategy namingStrategy)
public Ejb3Configuration setSessionFactoryObserver(SessionFactoryObserver observer)
public Configuration getHibernateConfiguration()
public Ejb3Configuration addInputStream(InputStream xmlInputStream) throws MappingException
MappingException
public Ejb3Configuration addResource(String path) throws MappingException
MappingException
public Ejb3Configuration addResource(String path, ClassLoader classLoader) throws MappingException
MappingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |