-
1. Re: Remote / LocalHome Interface issue - How smart is JBoss?
peterj Jun 23, 2006 12:18 PM (in response to javaneze)This is not a definitive answer since I have not looked at the JBoss code for this, but in my testing I have found that whether I am using LocalHome or RemoteHome to access EJBs on the same server that the performance is that same, so my guess is that JBoss does perform "magic" under the covers. Also, I vaguely recall someone from JBoss mentioning that this was the case.
-
2. Re: Remote / LocalHome Interface issue - How smart is JBoss?
javaneze Jun 26, 2006 4:06 AM (in response to javaneze)Thanks for your reply...I going through looking at the stactraces...probably..you are right ..there is no big difference..but it is worth taking a look!
-
3. Re: Remote / LocalHome Interface issue - How smart is JBoss?
javaneze Jun 27, 2006 7:44 AM (in response to javaneze)??! eventually indeed JBoss does the magic! No RMI calls event if all the EJBS are declared only with Remote Interface!
Though ok I have to say that probably there is some kind of difference when it comes to CPU cycles on perfoming or not perfoming remote calls!
Anyway the problem started with an application deployed on JBoss 4.0.0 where it had only -remote- EJBs and perfomed only remote calls and in a similar application in JBoss 4.0.2 where again it had again only remote EJBs but it was perfoming loca calls (we are talking to single VM apps..both).
So after a tip dropped from a JBoss Developer D.Andreadis we had a look on
\server\default\conf\jboss-service.xmland thembean code="org.jboss.naming.NamingService" name="jboss:service=Naming" xmbean-dd="resource:xmdesc/NamingService-xmbean.xml"> <!-- The call by value mode. true if all lookups are unmarshalled using the caller's TCL, false if in VM lookups return the value by reference. --> <attribute name="CallByValue">false</attribute>
see CallByValue
and the
\server\default\deploy\ear-deployer.xml<!-- EAR deployer, remove if you are not using ear deployments --> <mbean code="org.jboss.deployment.EARDeployer" name="jboss.j2ee:service=EARDeployer"> <attribute name="Isolated">false</attribute> <!-- A flag indicating if the ear components should have in VM call optimization disabled. --> <attribute name="CallByValue">false</attribute>
see callByValue!
On JBoss 4.0.0 these settings are set to true so JBoss wont perform any magic at all!
On Jboss 4.0.2 and on...these are set to false so ..it behaves very clever detacting all the local calls.
so watch out if you are have not noticed these settings...
Many thanks!