// this.closed = new SynchronizedBoolean(false);
this.startTransaction = new SynchronizedBoolean(false);
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("
+ sessionId + ")"));
this.messageExecutor.setOptimizedMessageDispatch(theConnection.isOptimizedMessageDispatch());
connection.addSession(this);
stats = new JMSSessionStatsImpl(producers, consumers);