public class GrailsSessionContext extends Object implements CurrentSessionContext
Based on org.springframework.orm.hibernate4.SpringSessionContext.
| Modifiers | Name | Description |
|---|---|---|
protected boolean |
allowCreate |
|
protected CurrentSessionContext |
jtaSessionContext |
|
protected SessionFactoryImplementor |
sessionFactory |
| Constructor and description |
|---|
GrailsSessionContext(SessionFactoryImplementor sessionFactory)Constructor. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected TransactionSynchronization |
createSpringFlushSynchronization(Session session) |
|
protected TransactionSynchronization |
createSpringSessionSynchronization(SessionHolder sessionHolder) |
|
public Session |
currentSession()Retrieve the Spring-managed Session for the current thread, if any. |
|
protected TransactionManager |
getJtaTransactionManager(Session session) |
|
public void |
initJta() |
|
protected void |
registerJtaSynchronization(Session session, SessionHolder sessionHolder) |
Constructor.
sessionFactory - the SessionFactory to provide current Sessions forRetrieve the Spring-managed Session for the current thread, if any.