-
1. Re: talking to remote jboss instance from within jboss
jahlborn May 25, 2006 10:37 PM (in response to jahlborn)Just to let anyone know who happens upon this topic, i have opened a bug related to this situation here:
http://jira.jboss.org/jira/browse/JBAS-3241 -
2. Re: talking to remote jboss instance from within jboss
jahlborn May 25, 2006 10:38 PM (in response to jahlborn) -
3. Re: talking to remote jboss instance from within jboss
brian.stansberry May 26, 2006 12:26 AM (in response to jahlborn)If an EJB is deployed in the same JVM as the caller, JBoss will always optimize the call to the local EJB.
If you don't want this behavior, you need to replace org.jboss.invocation.InvokerInterceptor with your own implementation. Simplest way to do that is to subclass it and override the isLocal(Invocation) method. See conf/standardjboss.xml for how InvokerInterceptor is integrated into the client interceptor stack; you could either replace the references to InvokerInterceptor there with your own interceptor, or do it on a per-bean basis in jboss.xml. -
4. Re: talking to remote jboss instance from within jboss
jahlborn May 26, 2006 1:20 PM (in response to jahlborn)i'm curious as to why this is considered acceptable behavior? As far as my implementation is concerned, i've used a differently configured initial context to get a handle to a remote ejb, but that handle violates the context and decides to make the call locally? the optimization is indeed a good thing when invoking ejbs within the local cluster, but in the given example completely violates the configured context.
-
5. Re: talking to remote jboss instance from within jboss
jahlborn May 26, 2006 1:42 PM (in response to jahlborn)After looking at the code a bit, it seems like it would be fairly straightforward to fix this problem. The InvokerInterceptor already checks whether the invoker is an instance of InvokerProxyHA. A method could be added to this interface to get the partition name of the invoker, which could then be compared against the local partition name. this information could be used to determine whether the clustered call can be made to the local server or not.
-
6. Re: talking to remote jboss instance from within jboss
jahlborn May 26, 2006 1:45 PM (in response to jahlborn)One last note, i realize that the requirement to separate the partition names is not a bug. i was just noting that nowhere in the wiki/documentation did i find information that gave reasons why you would have to have this value distinct between servers (because in many situtations it does not need to be distinct if the mcast_addr and mcast_ports are distinct).