Object txID = sessState.getXAResource().getCurrentTxID();
Object txID = sessState.getCurrentTxId();
   public Object handleSend(Invocation invocation) throws Throwable   {      ProducerState state = (ProducerState)getState(invocation);            SessionState sessState = (SessionState)state.getParent();                              if (sessState.isTransacted())      {         //Session is transacted - so we add message to tx instead of sending now                  Object txID = sessState.getXAResource().getCurrentTxID();                  if (txID == null)         {                        throw new IllegalStateException("Attempt to send message in tx, but txId is null, XA?" + sessState.isXA());         }                  ConnectionState connState = (ConnectionState)sessState.getParent();                  MethodInvocation mi = (MethodInvocation)invocation;                  Message m = (Message)mi.getArguments()[1];                           connState.getResourceManager().addMessage(txID, m);                  //And we don't invoke any further interceptors in the stack         return null;                     }      else      {               return invocation.invokeNext();      }   }