| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final boolean | |
| private final SessionFactory | sessionFactory
References Deprecated
SessionFactory is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private final SessionHolder |
| Access | Constructor and Description |
|---|---|
| public | SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory)
References Deprecated
SessionFactory is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public | SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession)
References Deprecated
SessionFactory is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | afterCommit()
Overrides default org. Invoked after transaction commit. |
| public void | afterCompletion(int
completion status according to the status)STATUS_* constantsOverrides default org. Invoked after transaction commit/rollback. |
| public void | beforeCommit(boolean
whether the transaction is defined as read-only transaction readOnly)Overrides default org. Invoked before transaction commit (before "beforeCompletion"). |
| public void | beforeCompletion()
Overrides default org. Invoked before transaction commit/rollback. |
| public void | flush()
Overrides default org. Flush the underlying session to the datastore, if applicable: for example, a Hibernate/JPA session. |
| private Session | getCurrentSession()
References Deprecated
Session is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public int | getOrder()
Overrides default org. Implements org. Return the execution order for this transaction synchronization. |
| public void | resume()
Overrides default org. Resume this synchronization. |
| public void | suspend()
Overrides default org. Suspend this synchronization. |
| holderActive | back to summary |
|---|---|
| private boolean holderActive | |
| newSession | back to summary |
|---|---|
| private final boolean newSession | |
| sessionFactory | back to summary |
|---|---|
| private final SessionFactory sessionFactory
References Deprecated
See corresponding docs for further information. | |
| sessionHolder | back to summary |
|---|---|
| private final SessionHolder sessionHolder | |
| SpringSessionSynchronization | back to summary |
|---|---|
| public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory)
References Deprecated
See corresponding docs for further information. | |
| SpringSessionSynchronization | back to summary |
|---|---|
| public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession)
References Deprecated
See corresponding docs for further information. | |
| afterCommit | back to summary |
|---|---|
| public void afterCommit() Overrides default org. Doc from org. Invoked after transaction commit. Can perform further operations right after the main transaction has successfully committed. Can e.g. commit further operations that are supposed to follow on a successful commit of the main transaction, like confirmation messages or emails. Note The transaction will have been committed already, but the
transactional resources might still be active and accessible. As a consequence,
any data access code triggered at this point will still "participate" in the
original transaction, allowing to perform some cleanup (with no commit following
anymore!), unless it explicitly declares that it needs to run in a separate
transaction. Hence: Use
| |
| afterCompletion | back to summary |
|---|---|
| public void afterCompletion(int status) Overrides default org. Doc from org. Invoked after transaction commit/rollback. Can perform resource cleanup after transaction completion. Note The transaction will have been committed or rolled back already,
but the transactional resources might still be active and accessible. As a
consequence, any data access code triggered at this point will still "participate"
in the original transaction, allowing to perform some cleanup (with no commit
following anymore!), unless it explicitly declares that it needs to run in a
separate transaction. Hence: Use
| |
| beforeCommit | back to summary |
|---|---|
| public void beforeCommit(boolean readOnly) throws DataAccessException Overrides default org. Doc from org. Invoked before transaction commit (before "beforeCompletion"). Can e.g. flush transactional O/R Mapping sessions to the database. This callback does not mean that the transaction will actually be committed. A rollback decision can still occur after this method has been called. This callback is rather meant to perform work that's only relevant if a commit still has a chance to happen, such as flushing SQL statements to the database. Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.
| |
| beforeCompletion | back to summary |
|---|---|
| public void beforeCompletion() Overrides default org. Doc from org. Invoked before transaction commit/rollback. Can perform resource cleanup before transaction completion. This method will be invoked after
| |
| flush | back to summary |
|---|---|
| public void flush() Overrides default org. Doc from org. Flush the underlying session to the datastore, if applicable: for example, a Hibernate/JPA session.
| |
| getCurrentSession | back to summary |
|---|---|
| private Session getCurrentSession()
References Deprecated
See corresponding docs for further information. | |
| getOrder | back to summary |
|---|---|
| public int getOrder() Overrides default org. Implements org. Doc from org. Return the execution order for this transaction synchronization. Default is
| |
| resume | back to summary |
|---|---|
| public void resume() Overrides default org. Doc from org. Resume this synchronization. Supposed to rebind resources to TransactionSynchronizationManager if managing any.
| |
| suspend | back to summary |
|---|---|
| public void suspend() Overrides default org. Doc from org. Suspend this synchronization. Supposed to unbind resources from TransactionSynchronizationManager if managing any.
| |