[jboss-user] [Remoting] - Re: ServerInvocationHandler Performance problem

ron.sigal@jboss.com do-not-reply at jboss.com
Fri Jul 17 14:02:18 EDT 2009

Hi Alfonso,

Sorry to be dense, but I'm just not following you.  Are you asking how to determine how many connections are coming into a Remoting server?

If so, and assuming you are using the socket transport, then I can tell you that each connection to the server is represented by an org.jboss.remoting.transport.socket.ServerThread.  The ServerThread manages invocations coming in over a single socket.  It sits in a loop like this:

  |   while (socket is open)
  |       read invocation
  |       process invocation
  |       return result

So the ServerThread could be sitting in SocketInputStream.read() waiting for the next invocation, but I guess you could still consider it an active connection.  To get the number of currently active ServerThreads, you can do something like:

  |   ((SocketServerInvoker) serverInvoker).getCurrentClientPoolSize()

assuming you have access to the ServerInvoker.  For example, if you're trying to make the call from an implementation of org.jboss.remoting.ServerInvocationHandler, you can implement ServerInvocationHandler.setInvoker() to store a reference to the ServerInvoker.

If I've misunderstood your question, please try again.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244411#4244411

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244411

More information about the jboss-user mailing list