Save This Page
Home » hibernate-entity-src-20081106 » org.hibernate » ejb » [javadoc | source]
org.hibernate.ejb
public class: Ejb3Configuration [javadoc | source]
java.lang.Object
   org.hibernate.ejb.Ejb3Configuration

All Implemented Interfaces:
    Referenceable, Serializable

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:
 public Ejb3Configuration() 
Method from org.hibernate.ejb.Ejb3Configuration Summary:
addAnnotatedClass,   addAuxiliaryDatabaseObject,   addClass,   addFile,   addFile,   addFilterDefinition,   addInputStream,   addPackage,   addProperties,   addResource,   addResource,   buildEntityManagerFactory,   buildMappings,   buildSessionFactory,   buildSettings,   configure,   configure,   configure,   createEntityManagerFactory,   createEntityManagerFactory,   getClassMapping,   getClassMappings,   getCollectionMapping,   getEventListeners,   getFilterDefinitions,   getHibernateConfiguration,   getInterceptor,   getNamedQueries,   getNamingStrategy,   getProperties,   getReference,   getTableMappings,   setDataSource,   setEntityResolver,   setInterceptor,   setListeners,   setListeners,   setNamingStrategy,   setProperties,   setProperty
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.ejb.Ejb3Configuration Detail:
 public Ejb3Configuration addAnnotatedClass(Class persistentClass) throws MappingException 
 public  void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject object) 
 public Ejb3Configuration addClass(Class persistentClass) throws MappingException 
 public Ejb3Configuration addFile(String xmlFile) throws MappingException 
 public Ejb3Configuration addFile(File xmlFile) throws MappingException 
 public  void addFilterDefinition(FilterDefinition definition) 
 public Ejb3Configuration addInputStream(InputStream xmlInputStream) throws MappingException 
 public Ejb3Configuration addPackage(String packageName) throws MappingException 
 public Ejb3Configuration addProperties(Properties props) 
 public Ejb3Configuration addResource(String path) throws MappingException 
 public Ejb3Configuration addResource(String path,
    ClassLoader classLoader) throws MappingException 
 public EntityManagerFactory buildEntityManagerFactory() 
 public  void buildMappings() 
 SessionFactory buildSessionFactory() throws HibernateException 
 public Settings buildSettings() throws HibernateException 
 public Ejb3Configuration configure(String resource) throws HibernateException 
 public Ejb3Configuration configure(String persistenceUnitName,
    Map integration) 
    Build the configuration from an entity manager name and given the appropriate extra properties. Those properties override the one get through the peristence.xml file. If the persistence unit name is not found or does not match the Persistence Provider, null is returned
 public Ejb3Configuration configure(PersistenceUnitInfo info,
    Map integration) 
    Process configuration from a PersistenceUnitInfo object Typically called by the container
 public EntityManagerFactory createEntityManagerFactory() 
Deprecated!
    Process configuration and build an EntityManagerFactory when the configuration is ready
 public EntityManagerFactory createEntityManagerFactory(Map workingVars) 
Deprecated! use - the Java Persistence API

    create a factory from a list of properties and HibernatePersistence.CLASS_NAMES -> Collection (use to list the classes from config files HibernatePersistence.PACKAGE_NAMES -> Collection (use to list the mappings from config files HibernatePersistence.HBXML_FILES -> Collection (input streams of hbm files) HibernatePersistence.LOADED_CLASSES -> Collection (list of loaded classes)

    Used by JBoss AS only

 public PersistentClass getClassMapping(String persistentClass) 
 public Iterator getClassMappings() 
 public Collection getCollectionMapping(String role) 
 public EventListeners getEventListeners() 
 public Map getFilterDefinitions() 
 public AnnotationConfiguration getHibernateConfiguration() 
    This API is intended to give a read-only configuration. It is sueful when working with SchemaExport or any Configuration based tool. DO NOT update configuration through it.
 public Interceptor getInterceptor() 
 public Map getNamedQueries() 
 public NamingStrategy getNamingStrategy() 
 public Properties getProperties() 
 public Reference getReference() throws NamingException 
 public Iterator getTableMappings() 
 public  void setDataSource(DataSource ds) 
    Used to inject a datasource object as the connection provider. If used, be sure to not override the hibernate.connection.provider_class property
 public  void setEntityResolver(EntityResolver entityResolver) 
 public Ejb3Configuration setInterceptor(Interceptor interceptor) 
 public  void setListeners(String type,
    String[] listenerClasses) 
 public  void setListeners(String type,
    Object[] listeners) 
 public Ejb3Configuration setNamingStrategy(NamingStrategy namingStrategy) 
 public Ejb3Configuration setProperties(Properties properties) 
 public Ejb3Configuration setProperty(String key,
    String value)