public class GrailsSessionContext extends java.lang.Object implements org.hibernate.context.spi.CurrentSessionContext
Based on org.springframework.orm.hibernate4.SpringSessionContext.
Modifiers | Name | Description |
---|---|---|
protected boolean |
allowCreate |
|
protected org.hibernate.context.spi.CurrentSessionContext |
jtaSessionContext |
|
protected org.hibernate.engine.spi.SessionFactoryImplementor |
sessionFactory |
Constructor and description |
---|
GrailsSessionContext
(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) Constructor. |
Type Params | Return Type | Name and description |
---|---|---|
|
protected org.springframework.transaction.support.TransactionSynchronization |
createSpringFlushSynchronization(org.hibernate.Session session) |
|
protected org.springframework.transaction.support.TransactionSynchronization |
createSpringSessionSynchronization(org.springframework.orm.hibernate5.SessionHolder sessionHolder) |
|
public org.hibernate.Session |
currentSession() Retrieve the Spring-managed Session for the current thread, if any. |
|
protected javax.transaction.TransactionManager |
getJtaTransactionManager(org.hibernate.Session session) |
|
public void |
initJta() |
|
protected void |
registerJtaSynchronization(org.hibernate.Session session, org.springframework.orm.hibernate5.SessionHolder sessionHolder) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor.
sessionFactory
- the SessionFactory to provide current Sessions forRetrieve the Spring-managed Session for the current thread, if any.