org.jboss.seam.persistence
@Scope(value=APPLICATION) @BypassInterceptors @Startup public class HibernateSessionFactory extends Object
Loads Hibernate configuration options by checking:
Note that this factory only supports cfg.xml files or programmatic cfgProperties supplied to the factory. Any hibernate.properties are always loaded from the classpath.
Mapping metadata can be supplied via
or via cfg.xml files.
The jndiProperties are convenience, the factory will automatically prefix regular JNDI properties for use as Hibernate configuration properties.
Constructor and Description |
---|
HibernateSessionFactory() |
Modifier and Type | Method and Description |
---|---|
protected org.hibernate.SessionFactory |
createSessionFactory() |
Map<String,String> |
getCfgProperties() |
String |
getCfgResourceName() |
List<String> |
getMappingClasses() |
List<String> |
getMappingFiles() |
List<String> |
getMappingJars() |
List<String> |
getMappingPackages() |
List<String> |
getMappingResources() |
org.hibernate.cfg.NamingStrategy |
getNamingStrategy() |
org.hibernate.SessionFactory |
getSessionFactory() |
void |
setCfgProperties(Map<String,String> cfgProperties) |
void |
setCfgResourceName(String cfgFileName) |
void |
setMappingClasses(List<String> mappingClasses) |
void |
setMappingFiles(List<String> mappingFiles) |
void |
setMappingJars(List<String> mappingJars) |
void |
setMappingPackages(List<String> mappingPackages) |
void |
setMappingResources(List<String> mappingResources) |
void |
setNamingStrategy(org.hibernate.cfg.NamingStrategy namingStrategy) |
void |
shutdown() |
void |
startup() |
@Unwrap public org.hibernate.SessionFactory getSessionFactory() throws Exception
Exception
@Destroy public void shutdown()
protected org.hibernate.SessionFactory createSessionFactory() throws ClassNotFoundException
ClassNotFoundException
public String getCfgResourceName()
public void setCfgResourceName(String cfgFileName)
public org.hibernate.cfg.NamingStrategy getNamingStrategy()
public void setNamingStrategy(org.hibernate.cfg.NamingStrategy namingStrategy)
Copyright © 2015 Seam Framework. All Rights Reserved.