*/
if (_synchs != null)
{
HashListIterator iterator = new HashListIterator(_synchs);
SynchronizationRecord value = (SynchronizationRecord) iterator.iterate();
boolean doSuspend = false;
ControlWrapper cw = null;
try
{
/*
* Make sure that this transaction is active on the thread
* before we invoke any Synchronizations. They are
* TransactionalObjects and must have the context flowed to
* them.
*/
try
{
// cw = OTSImpleManager.systemCurrent().getControlWrapper();
cw = OTSImpleManager.current().getControlWrapper();
/*
* If there's no transaction incoming, then use the one that
* we got at creation time.
*/
if ((cw == null) || (!controlHandle.equals(cw.getImple())))
{
// OTSImpleManager.systemCurrent().resumeImple(controlHandle);
OTSImpleManager.current().resumeImple(controlHandle);
doSuspend = true;
}
}
catch (Exception ex)
{
/*
* It should be OK to continue with the invocations even if
* we couldn't resume, because a Synchronization is only
* supposed to be associated with a single transaction. So,
* it should be able to infer the transaction.
*/
}
while (value != null)
{
Synchronization c = value.contents();
c.before_completion();
value = (SynchronizationRecord) iterator.iterate();
}