This content has been marked as final.
Show 1 reply
-
1. Re: ServerInvocationHandler Performance problem
ron_sigal Jul 17, 2009 2:02 PM (in response to aolias)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.
-Ron