public class GrailsSessionContext
extends java.lang.Object
implements org.hibernate.context.spi.CurrentSessionContext
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowCreate |
protected org.hibernate.context.spi.CurrentSessionContext |
jtaSessionContext |
protected org.hibernate.engine.spi.SessionFactoryImplementor |
sessionFactory |
protected java.lang.reflect.Constructor<?> |
springFlushSynchronizationConstructor |
protected java.lang.reflect.Constructor<?> |
springSessionSynchronizationConstructor |
| Constructor and Description |
|---|
GrailsSessionContext(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
create(java.lang.reflect.Constructor<?> constructor,
java.lang.Object... args) |
protected org.springframework.transaction.support.TransactionSynchronization |
createSpringFlushSynchronization(org.hibernate.Session session) |
protected org.springframework.transaction.support.TransactionSynchronization |
createSpringSessionSynchronization(org.springframework.orm.hibernate4.SessionHolder sessionHolder) |
org.hibernate.Session |
currentSession()
Retrieve the Spring-managed Session for the current thread, if any.
|
protected javax.transaction.TransactionManager |
getJtaTransactionManager(org.hibernate.Session session) |
void |
initJta() |
protected java.lang.reflect.Constructor<?> |
lookupConstructor(java.lang.String className,
java.lang.Class<?>... argTypes) |
protected void |
lookupConstructors() |
protected void |
registerJtaSynchronization(org.hibernate.Session session,
org.springframework.orm.hibernate4.SessionHolder sessionHolder) |
protected final org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory
protected org.hibernate.context.spi.CurrentSessionContext jtaSessionContext
protected java.lang.reflect.Constructor<?> springFlushSynchronizationConstructor
protected java.lang.reflect.Constructor<?> springSessionSynchronizationConstructor
protected boolean allowCreate
public GrailsSessionContext(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
sessionFactory - the SessionFactory to provide current Sessions forpublic void initJta()
public org.hibernate.Session currentSession()
throws org.hibernate.HibernateException
currentSession in interface org.hibernate.context.spi.CurrentSessionContextorg.hibernate.HibernateExceptionprotected void registerJtaSynchronization(org.hibernate.Session session,
org.springframework.orm.hibernate4.SessionHolder sessionHolder)
protected javax.transaction.TransactionManager getJtaTransactionManager(org.hibernate.Session session)
protected void lookupConstructors()
protected java.lang.reflect.Constructor<?> lookupConstructor(java.lang.String className,
java.lang.Class<?>... argTypes)
protected org.springframework.transaction.support.TransactionSynchronization createSpringFlushSynchronization(org.hibernate.Session session)
protected org.springframework.transaction.support.TransactionSynchronization createSpringSessionSynchronization(org.springframework.orm.hibernate4.SessionHolder sessionHolder)
protected java.lang.Object create(java.lang.reflect.Constructor<?> constructor,
java.lang.Object... args)