code: public void start(Xid xid, int flags) throws XAException
     {
        if (trace)
           log.tracef("start(%s, %s)", xid, flags);  
        
        if (currentXid != null && flags == XAResource.TMNOFLAGS)
        {
           throw new LocalXAException(bundle.tryingStartNewTxWhenOldNotComplete(
                 currentXid, xid, flags), XAException.XAER_PROTO);
        }
        
        if (currentXid == null && flags != XAResource.TMNOFLAGS)
        {
           throw new LocalXAException(bundle.tryingStartNewTxWithWrongFlags(xid, flags), XAException.XAER_PROTO);
        }
  
        if (currentXid == null)
        {
           try
           {
              cl.getManagedConnection().getLocalTransaction().begin();
           }
           catch (ResourceException re)
           {
              throw new LocalXAException(bundle.errorTryingStartLocalTx(), XAException.XAER_RMERR, re);
           }
           catch (Throwable t)
           {
              throw new LocalXAException(bundle.throwableTryingStartLocalTx(), XAException.XAER_RMERR, t);
           }
  
           currentXid = xid;
        }
     }
docs: {@inheritDoc}