this.clientIdGenerator = new IdGenerator();
this.packetIdGenerator = new IdGenerator();
this.handleIdGenerator = new IdGenerator();
this.sessionIdGenerator = new IdGenerator();
this.consumerNumberGenerator = new SynchronizedInt(0);
this.sessions = new CopyOnWriteArrayList();
this.messageDispatchers = new CopyOnWriteArrayList();
this.connectionConsumers = new CopyOnWriteArrayList();
this.connectionMetaData = new ActiveMQConnectionMetaData();
this.started = new SynchronizedBoolean(false);
this.startTime = System.currentTimeMillis();
this.prefetchPolicy = new ActiveMQPrefetchPolicy();
this.boundedQueueManager = new MemoryBoundedQueueManager(clientID, DEFAULT_CONNECTION_MEMORY_LIMIT);
this.boundedQueueManager.addCapacityEventListener(this);
boolean transactional = this instanceof XAConnection;
factoryStats = factory.getFactoryStats();
factoryStats.addConnection(this);
stats = new JMSConnectionStatsImpl(sessions, transactional);
this.transientConsumedRedeliverCache = new CopyOnWriteArrayList();
this.tempDestinationMap = new ConcurrentHashMap();
factory.onConnectionCreate(this);
}