toAck = new ArrayList();
ClientAckList = new ArrayList();
   public SessionState(ConnectionState parent, ClientSessionDelegate delegate,                       boolean transacted, int ackMode, boolean xa)   {      super(parent, (DelegateSupport)delegate);            this.sessionId = delegate.getID();            children = new HashSet();      this.acknowledgeMode = ackMode;      this.transacted = transacted;      this.xa = xa;            if (xa)      {         // Create an XA resource         xaResource = new MessagingXAResource(parent.getResourceManager(), this);                                  }            // If session is transacted and XA, the currentTxId will be updated when the XAResource will      // be enrolled with a global transaction.            if (transacted & !xa)      {         // Create a local tx         currentTxId = parent.getResourceManager().createLocalTx();              }            executor = new QueuedExecutor(new LinkedQueue());            toAck = new ArrayList();            // TODO could optimise this to use the same map of callbackmanagers (which holds refs      // to callbackhandlers) in the connection, instead of maintaining another map      callbackHandlers = new HashMap();   }