this.connection = theConnection;
this.acknowledgeMode = theAcknowledgeMode;
setTransactionContext(new TransactionContext(theConnection));
this.consumers = new CopyOnWriteArrayList();
this.producers = new CopyOnWriteArrayList();
this.temporaryDestinationGenerator = new IdGenerator();
this.started = new SynchronizedBoolean(false);
this.sessionId = connection.generateSessionId();
this.startTime = System.currentTimeMillis();
this.deliveredMessages = new DefaultQueueList();
this.messageExecutor = new ActiveMQSessionExecutor(this, connection.getMemoryBoundedQueue("Session("