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("
+ sessionId + ")"));
this.messageExecutor.setOptimizedMessageDispatch(optimizedDispatch);
connection.addSession(this);
stats = new JMSSessionStatsImpl(producers, consumers);