|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.orm.hibernate.LocalSessionFactoryBean
org.figure8.join.core.persistence.ConfigurableHibernateSessionFactoryBean
public class ConfigurableHibernateSessionFactoryBean
This is an extension of Spring LocalSessionFactoryBean that
can be further configured using extra properties provided by a
HibernateConfigurator instance. The creation of the Hibernate
session factory can be also conditioned by the fact that we are on an
asynchronous side of the Join application.
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
Get a commons logger. |
| Fields inherited from class org.springframework.orm.hibernate.LocalSessionFactoryBean |
|---|
logger |
| Constructor Summary | |
|---|---|
ConfigurableHibernateSessionFactoryBean()
Creates a new instance of ConfigurableHibernateSessionFactoryBean |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Initialize the SessionFactory for the given or the default location. |
protected net.sf.hibernate.cfg.Configuration |
newConfiguration()
Custom initialization of the Configuration instance used for SessionFactory creation. |
protected void |
postProcessConfiguration(net.sf.hibernate.cfg.Configuration config)
To be implemented by subclasses that want to to perform custom post-processing of the Configuration object after this FactoryBean performed its default initialization. |
void |
setCheckForAsync(boolean checkForAsync)
|
void |
setHibernateConfigurator(HibernateConfigurator configurator)
|
void |
setMappingResources(java.util.List resources)
|
void |
setReplaceHomeInUrl(boolean replaceHomeInUrl)
|
void |
setUseHbnConfigurator(boolean useHbnConfigurator)
|
| Methods inherited from class org.springframework.orm.hibernate.LocalSessionFactoryBean |
|---|
createDatabaseSchema, destroy, dropDatabaseSchema, executeSchemaScript, getConfigTimeDataSource, getConfigTimeLobHandler, getConfigTimeTransactionManager, getConfiguration, getObject, getObjectType, isSingleton, newSessionFactory, setConfigLocation, setDataSource, setEntityInterceptor, setHibernateProperties, setJtaTransactionManager, setLobHandler, setMappingDirectoryLocations, setMappingJarLocations, setMappingLocations, setMappingResources, setNamingStrategy, setSchemaUpdate, setUseTransactionAwareDataSource, updateDatabaseSchema |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public ConfigurableHibernateSessionFactoryBean()
| Method Detail |
|---|
public void setCheckForAsync(boolean checkForAsync)
checkForAsync - Flag telling if we should start only if on asychronous side of applicationpublic void setUseHbnConfigurator(boolean useHbnConfigurator)
useHbnConfigurator - Flag telling if properties from Spring should be overriden by HibernateConfiguratorpublic void setReplaceHomeInUrl(boolean replaceHomeInUrl)
replaceHomeInUrl - Flag telling if property representing Url should be checkedpublic void setMappingResources(java.util.List resources)
resources - List of Hibernate mapping resourcespublic void setHibernateConfigurator(HibernateConfigurator configurator)
configurator - Helper for configuring session factory
public void afterPropertiesSet()
throws java.lang.IllegalArgumentException,
net.sf.hibernate.HibernateException,
java.io.IOException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.orm.hibernate.LocalSessionFactoryBeanjava.lang.IllegalArgumentException - in case of illegal property values
net.sf.hibernate.HibernateException - in case of Hibernate initialization errors
java.io.IOException - ...
protected net.sf.hibernate.cfg.Configuration newConfiguration()
throws net.sf.hibernate.HibernateException
newConfiguration in class org.springframework.orm.hibernate.LocalSessionFactoryBeannet.sf.hibernate.HibernateException
protected void postProcessConfiguration(net.sf.hibernate.cfg.Configuration config)
throws net.sf.hibernate.HibernateException
postProcessConfiguration in class org.springframework.orm.hibernate.LocalSessionFactoryBeanconfig - the current Configuration object
net.sf.hibernate.HibernateException - in case of Hibernate initialization errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||