public class SpringLobCreatorSynchronization extends TransactionSynchronizationAdapter
LobCreator.close()to clean up temporary LOBs that might have been created.
|Modifier and Type||Field and Description|
Order value for TransactionSynchronization objects that clean up LobCreators.
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN
|Constructor and Description|
Create a SpringLobCreatorSynchronization for the given LobCreator.
|Modifier and Type||Method and Description|
Invoked after transaction commit/rollback.
Invoked before transaction commit/rollback.
Return the order value of this object, with a higher value meaning greater in terms of sorting.
afterCommit, beforeCommit, flush, resume, suspend
public static final int LOB_CREATOR_SYNCHRONIZATION_ORDER
public SpringLobCreatorSynchronization(LobCreator lobCreator)
lobCreator- the LobCreator to close after transaction completion
public int getOrder()
Normally starting with 0, with
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
public void beforeCompletion()
This method will be invoked after
beforeCommit, even when
beforeCommit threw an exception. This callback allows for
closing resources before transaction completion, for any outcome.
public void afterCompletion(int status)
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
for any transactional operation that is called from here.
status- completion status according to the