code: public void transactionStarted(ConnectionListener cl) throws ResourceException
     {
        try
        {
           if (!cl.isEnlisted() &&
               TxUtils.isUncommitted(ti.getTransactionManager().getTransaction()) &&
               shouldEnlist(cl))
              cl.enlist();
        }
        catch (ResourceException re)
        {
           throw re;
        }
        catch (Exception e)
        {
           throw new ResourceException(e);
        }
     }
docs: {@inheritDoc}