code: @Override
     public void toPool() throws ResourceException
     {
        if (localTransaction)
        {
           LocalTransaction localTransaction = null;
           ManagedConnection mc = getManagedConnection();
           try
           {
              localTransaction = mc.getLocalTransaction();
           }
           catch (Throwable t)
           {
              throw new ResourceException(t);
           }
  
           if (localTransaction == null)
           {
              throw new ResourceException();
           }
           else
           {
              localTransaction.rollback();
           }
        }
  
        resetXAResourceTimeout();
        
        super.toPool();
     }
docs: {@inheritDoc}