I am finding the same behaviour - every call to an EJB3 stateless session bean 
appears to be creating a new client socket. I have been running through the 
source in the debugger and it seems to be due to this code (snipped in places):

public class InvokeRemoteInterceptor ...
{
   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws 
Throwable
   {
      
      Client client = new Client(locator, subsystem);
      
      try 
      {
         client.connect();
         org.jboss.aop.joinpoint.InvocationResponse response = 
(org.jboss.aop.joinpoint.InvocationResponse)client.invoke(invocation, null);
         invocation.setResponseContextInfo(response.getContextInfo());
         return response.getResponse();
      }
      catch (Exception e)
      {
            
      }
      finally
      {
         client.disconnect();
      }
}

So, from the bold lines it seems to create a new Client Object for every remote 
call. This in turn creates a new SocketClientInvoker which then creates a new 
Socket pool rather than reusing an existing Socket pool. 

Client.connect() does store the client invoker in the InvokerRegistry but the 
disconnect() then causes the Invoker to be removed from the InvokerRegistry 
(via destroyClientInvoker). This may explain why the Invoker (and its pool) is 
not being reused.

I am using JBoss 4.2.1GA (JBoss Remoting 2.2.1). FYI - The source above is from 
2.2.0 since that is the latest downloadable version I could find.

Any help on a potential fix appreciated.

Thanks,
Darren.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127075
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to