[jboss-user] [JBoss Messaging] - Re: Can JBoss Messaging uses direct method invocation while

gary.c.chen do-not-reply at jboss.com
Fri Jun 13 01:54:05 EDT 2008


En, could you please tell me  how JBM determine client and server are in the same VM ? 
You know, in a Servlet we use JNDI as follow : 

Context ctx = new InitialContext();
QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/ConnectionFactory");

and we don't use the JNDI URL property.
I had ever developed Application Server before, in our Application Server, we used the JNDI URL property to determine the JNDI lookup action is inside the server VM or outside, according to this we return a ConnectionFactory that it's created Connection used direct method invocation or used Socket.
So I am very interesting in how JBM achieve the optimisation. Like the above I describe ?

And you said the client and the server must in the same VM and loaded by the same ClassLoader, so JBM can do the optimisation, is that right ?

And we know that the Servlet class and the JMS Server class are not loaded by the same ClassLoader.

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

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



More information about the jboss-user mailing list