state.getXAResource().setCurrentTxID(xid);
state.setCurrentTxId(xid);
   public Object handleCommit(Invocation invocation) throws Throwable   {      SessionState state = (SessionState)getState(invocation);            if (!state.isTransacted())      {         throw new IllegalStateException("Cannot commit a non-transacted session");      }            if (state.isXA())      {         throw new TransactionInProgressException("Cannot call commit on an XA session");      }            ConnectionState connState = (ConnectionState)state.getParent();            try      {                     connState.getResourceManager().commitLocal((LocalTxXid)state.getXAResource().getCurrentTxID());      }      finally      {         //Start new local tx         Object xid = connState.getResourceManager().createLocalTx();                  state.getXAResource().setCurrentTxID(xid);      }            return null;   }