2 Replies Latest reply on Jun 20, 2006 3:24 AM by vasanth_java

    Identify the Clients from Server in Pull Callback Jboss remo

      In Pull Callback method in JBoss Remoting, I am having one Server that will generate the callbacks automatically through a Thread without differentiating the clients. When trying to access by multiple clients simultaneously, all the clients getting the same callbacks. I came through the articles saying that to identify a client in JBoss Remoting, the session id of the invoking client is used. I got the session id by:

      At the client side by

      Client remotingClient = new Client(uriLocator, metadata);
      String sessionId = RemotingClient.getSessionId();

      At the server side by

      public Object invoke(InvocationRequest invocation) throws Throwable
      {
      String sessionId = invocation.getSessionId();
      }

      Usually we pass the callbackhandler object of the client through addListener() method to server. But how I can link this session id with the corresponding callbackhandler of the client. I require this for giving back the callback to the handler. So I need a map between the sessionId and callbackhandler.
      i.e how to identify/differentiate the clients from server in pull callback?