connState.getResourceManager().addAck(txID, state.getSessionId(), info);
ClientSessionDelegate connectionConsumerDelegate = (ClientSessionDelegate)info.getConnectionConsumerSession();  int sessionId = connectionConsumerDelegate != null ? connectionConsumerDelegate.getID() : state.getSessionId();  connState.getResourceManager().addAck(txID, sessionId, info);
   public Object handlePreDeliver(Invocation invocation) throws Throwable   {      SessionState state = (SessionState)getState(invocation);      Object txID = state.getCurrentTxId();      if (txID != null)      {         // the session is non-XA and transacted, or XA and enrolled in a global transaction. An         // XA session that has not been enrolled in a global transaction behaves as a         // non-transacted session.                  MethodInvocation mi = (MethodInvocation)invocation;                  DeliveryInfo info = (DeliveryInfo)mi.getArguments()[0];         ConnectionState connState = (ConnectionState)state.getParent();         if (trace) { log.trace("sending acknowlegment transactionally, queueing on resource manager"); }         connState.getResourceManager().addAck(txID, state.getSessionId(), info);      }      return null;   }