public void tidyup() throws ResourceException
{
// We have a hanging transaction
if (localTransaction.get())
{
LocalTransaction local = null;
ManagedConnection mc = getManagedConnection();
try
{
local = mc.getLocalTransaction();
}
catch (Throwable t)
{
throw new ResourceException(bundle.unfinishedLocalTransaction(this), t);
}
if (local == null)
throw new ResourceException(bundle.unfinishedLocalTransactionNotProvideLocalTransaction(this));
else
{
local.rollback();
log.debug("Unfinished local transaction was rolled back." + this);
}
}
}