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.memoryManager = new MemoryBoundedObjectManager(clientID, DEFAULT_CONNECTION_MEMORY_LIMIT);
this.boundedQueueManager = new MemoryBoundedQueueManager(memoryManager);
this.memoryManager.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();
this.validDestinationsMap = new ConcurrentHashMap();
factory.onConnectionCreate(this);
}