* @param xaStatefulHolder the recycled {@link XAStatefulHolder}.
*/
public static void recycle(XAStatefulHolder xaStatefulHolder) {
BitronixTransaction currentTransaction = currentTransaction();
if (log.isDebugEnabled()) log.debug("marking " + xaStatefulHolder + " as recycled in " + currentTransaction);
Scheduler synchronizationScheduler = currentTransaction.getSynchronizationScheduler();
DeferredReleaseSynchronization deferredReleaseSynchronization = findDeferredRelease(xaStatefulHolder, currentTransaction);
if (deferredReleaseSynchronization != null) {
if (log.isDebugEnabled()) log.debug(xaStatefulHolder + " has been recycled, unregistering deferred release from " + currentTransaction);
synchronizationScheduler.remove(deferredReleaseSynchronization);
}
}