ServerSessionDelegate ssd = new ServerSessionDelegate(sessionID, this);
ServerSessionDelegate ssd = new ServerSessionDelegate(sessionID, this, acknowledgmentMode);
   public SessionDelegate createSessionDelegate(boolean transacted, int acknowledgmentMode)   {      // create the dynamic proxy that implements SessionDelegate      SessionDelegate sd = null;      Serializable oid = serverPeer.getSessionAdvisor().getName();      String stackName = "SessionStack";      AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);      // TODO why do I need to the advisor to create the interceptor stack?      Interceptor[] interceptors = stack.createInterceptors(serverPeer.getSessionAdvisor(), null);      // TODO: The ConnectionFactoryDelegate and ConnectionDelegate share the same locator (TCP/IP connection?). Performance?      JMSInvocationHandler h = new JMSInvocationHandler(interceptors);      String sessionID = generateSessionID();      SimpleMetaData metadata = new SimpleMetaData();      // TODO: The ConnectionFactoryDelegate and ConnectionDelegate share the same locator (TCP/IP connection?). Performance?      metadata.addMetaData(Dispatcher.DISPATCHER, Dispatcher.OID, oid, PayloadKey.AS_IS);      metadata.addMetaData(InvokerInterceptor.REMOTING,                           InvokerInterceptor.INVOKER_LOCATOR,                           serverPeer.getLocator(),                           PayloadKey.AS_IS);      metadata.addMetaData(InvokerInterceptor.REMOTING,                           InvokerInterceptor.SUBSYSTEM,                           "JMS",                           PayloadKey.AS_IS);      metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.CLIENT_ID, clientID, PayloadKey.AS_IS);      metadata.addMetaData(JMSAdvisor.JMS, JMSAdvisor.SESSION_ID, sessionID, PayloadKey.AS_IS);            h.getMetaData().mergeIn(metadata);      // TODO       ClassLoader loader = getClass().getClassLoader();      Class[] interfaces = new Class[] { SessionDelegate.class };      sd = (SessionDelegate)Proxy.newProxyInstance(loader, interfaces, h);            // create the corresponding "server-side" SessionDelegate and register it with this      // ConnectionDelegate instance      ServerSessionDelegate ssd = new ServerSessionDelegate(sessionID, this);      putSessionDelegate(sessionID, ssd);      log.debug("created session delegate (sessionID=" + sessionID + ")");      return sd;   }