|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.interface21.orm.hibernate.LocalSessionFactoryBean
FactoryBean that creates local Hibernate SessionFactory instances. Behaves like a SessionFactory instance when used as bean reference, e.g. for HibernateTemplate's sessionFactory property. Note that switching to JndiObjectFactoryBean is just a matter of configuration!
The typical usage will be to register this as singleton factory (for a certain underlying data source) in an application context, and give bean references to application services that need it.
This SessionFactory handling strategy is most appropriate for applications that solely use Hibernate for data access, probably using HibernateTransactionManager for transaction demarcation.
HibernateTemplate,
HibernateTransactionManager,
JndiObjectFactoryBean| Constructor Summary | |
LocalSessionFactoryBean()
|
|
| Method Summary | |
void |
afterPropertiesSet()
Initialize the SessionFactory for the given or the default location. |
java.lang.Object |
getObject()
Return the singleton SessionFactory. |
PropertyValues |
getPropertyValues()
Property values to pass to new bean instances created by this factory. |
boolean |
isSingleton()
Is the bean managed by this factory a singleton or a prototype? |
void |
setLocation(java.lang.String location)
Set the location of the Hibernate XML config file, as URL or classpath resource location. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LocalSessionFactoryBean()
| Method Detail |
public void setLocation(java.lang.String location)
public void afterPropertiesSet()
throws DataAccessResourceFailureException
afterPropertiesSet in interface InitializingBeanDataAccessResourceFailureException - in case of initialization errorspublic java.lang.Object getObject()
getObject in interface FactoryBeancom.interface21.beans.factory.FactoryBeanpublic boolean isSingleton()
FactoryBeanisSingleton in interface FactoryBeancom.interface21.beans.factory.FactoryBeanpublic PropertyValues getPropertyValues()
FactoryBeangetPropertyValues in interface FactoryBeancom.interface21.beans.factory.FactoryBean
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||