private static class AbstractLobTypeHandler.LobCreatorSynchronization extends TransactionSynchronizationAdapter
LobCreator.close()
Modifier and Type | Field and Description |
---|---|
private LobCreator |
lobCreator |
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractLobTypeHandler.LobCreatorSynchronization(LobCreator lobCreator) |
Modifier and Type | Method and Description |
---|---|
void |
beforeCompletion()
Invoked before transaction commit/rollback.
|
int |
getOrder()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
afterCommit, afterCompletion, beforeCommit, flush, resume, suspend
private final LobCreator lobCreator
public AbstractLobTypeHandler.LobCreatorSynchronization(LobCreator lobCreator)
public int getOrder()
Ordered
Normally starting with 0, with Integer.MAX_VALUE
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).
getOrder
in interface Ordered
getOrder
in class TransactionSynchronizationAdapter
public void beforeCompletion()
TransactionSynchronization
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.
beforeCompletion
in interface TransactionSynchronization
beforeCompletion
in class TransactionSynchronizationAdapter
TransactionSynchronization.beforeCommit(boolean)
,
TransactionSynchronization.afterCompletion(int)