new ConnectionState(serverID, connectionDelegate, remotingConn, versionToUse, g);
new ConnectionState(serverID, connectionDelegate, remotingConnection, listener, versionToUse, idGenerator);
   public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable   {      ConnectionFactoryDelegate cfd = (ConnectionFactoryDelegate)inv.getTargetObject();      CreateConnectionResult res = (CreateConnectionResult)inv.invokeNext();      ClientConnectionDelegate connectionDelegate = (ClientConnectionDelegate)res.getDelegate();      if (connectionDelegate != null && connectionDelegate.getState() == null)      {         // no state set yet, initialize and configure it         if(trace) { log.trace(connectionDelegate + " not configured, configuring ..."); }         connectionDelegate.init();         int serverID = connectionDelegate.getServerID();         Version versionToUse = connectionDelegate.getVersionToUse();         JMSRemotingConnection remotingConn = connectionDelegate.getRemotingConnection();         if (versionToUse == null)         {            throw new IllegalStateException("Connection version is null");         }         // We have one message id generator per unique server         MessageIdGenerator g = MessageIdGeneratorFactory.instance.checkOutGenerator(serverID, cfd);         ConnectionState connectionState =            new ConnectionState(serverID, connectionDelegate, remotingConn, versionToUse, g);         connectionDelegate.setState(connectionState);         // the delegate is completely configured now; will use this state to avoid redundant         // configuration on a double pass through StateCreationAspect, which happens for clustered         // connections      }      return res;   }