-
1. Re: Explicit routing (load balancing) issue in JBoss 5.1
pferraro Sep 10, 2011 8:43 PM (in response to amathewjboss1)Can you pastebin your custom load balance policy and jboss.xml containing the configuration of the relevant beans?
-
2. Re: Explicit routing (load balancing) issue in JBoss 5.1
amathewjboss1 Sep 11, 2011 1:45 AM (in response to pferraro)Thank you so much Paul for the response.
Please see the attached file which has my load balancing class and the Jboss.xml entry for Beans.
Like i mentioned, when the EJB Method A calls the EJB Method B i would expect the call to go through the 'chooseTarget" method in my EJBRouterJBoss.java class. But this is not happening.
Thanks Again
Anil Mathew
-
routingissue.txt.zip 885 bytes
-
-
3. Re: Explicit routing (load balancing) issue in JBoss 5.1
amathewjboss1 Sep 12, 2011 4:06 PM (in response to amathewjboss1)I have done so much testing to figure this out from yesterday. It seems like even though we are grabbing the “remote” home and doing a “create” on that home, attempting to get the remote interface/bean during the EJB A to EJB B call, i could see the below class in my debug stacktrace:
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
I wonder this means the JBoss 5.1 is making my remote call to a local call.
I am totally stuck at this point and I really have no more ideas on my mind. Can some one please share your thoughts.
Thanks
Anil Mathew
-
4. Re: Explicit routing (load balancing) issue in JBoss 5.1
jaikiran Sep 13, 2011 12:12 AM (in response to amathewjboss1)Anil Mathew wrote:
When the Method A calls Method B, we are trying to route Method B EJB call to a specific node(server). Note that when we make the Mathod A to Method B call, we are grabbing the “remote” home and doing a “create” on that home, attempting to get the remote interface/bean.
Can you post that relevant code and also the exact bean definitions including the annotations/DD?
Anil Mathew wrote:
With JBoss 5.1, the load balancing policy class (i.e chooseTarget method) is not really executing and hence the explicit routing is not happening. This was working fine in Jboss 4.x.
When are you expecting that chooseTarget of your policy to be called? When you invoke the "create" on the home interface or when you invoke a business method on the remote interface returned by create?
-
5. Re: Explicit routing (load balancing) issue in JBoss 5.1
jaikiran Sep 13, 2011 12:13 AM (in response to amathewjboss1)Anil Mathew wrote:
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
You are using EJB2.x and not EJB3?
-
6. Re: Explicit routing (load balancing) issue in JBoss 5.1
jaikiran Sep 13, 2011 12:45 AM (in response to jaikiran)See "Why are calls between clustered session beans not load balanced even though load balancing policy is Round Robin?" here http://community.jboss.org/wiki/ClusteringFAQ
-
7. Re: Explicit routing (load balancing) issue in JBoss 5.1
amathewjboss1 Sep 13, 2011 1:05 PM (in response to jaikiran)Thank You Jaikiran for your reply.
Please see the attached file which has my load balancing class and the Jboss.xml entry for Beans.
Like i mentioned on my earlier post, when the EJB Method A calls the EJB Method B i would expect the call to go through the 'chooseTarget" method in my EJBRouterJBoss.java class. But this is not happening.
After more digging on the forum, i was able to get this one - http://community.jboss.org/message/209981#209981 and i think this is what i wanted. But this seems to be a "hack" for me. Do you know if we can just disable this feature of "JBoss's intra-VM EJB optimization, where it will use a local EJB even for a remote call if the reqested EJB is deployed on the local server" in JBoss 5.1 and hence I don't have to go for the
"JRMPInvokerHA" hack?
Finally as a good note, we upgraded the production to Jboss 5.1 for one of our application (more to go in the days to come). Thank you for all your answers and thoughts.
Anil Mathew
-
routingissue.txt.zip 885 bytes
-
-
8. Re: Explicit routing (load balancing) issue in JBoss 5.1
amathewjboss1 Sep 13, 2011 2:52 PM (in response to amathewjboss1)Hi Jaikiran,
I am trying to see cluster-service.xml in Jboss 5.1, but apparently we don't have this file on JBoss 5.1. Can you tell me which file replaces this on Jboss 5.1 please? In fact i am trying to change 'org.jboss.invocation.jrmp.server.JRMPInvokerHA' to MyJRMPInvokerHA.
Thanks
Anil Mathew
-
9. Re: Explicit routing (load balancing) issue in JBoss 5.1
amathewjboss1 Sep 15, 2011 9:25 PM (in response to amathewjboss1)I just wanted to update this case by saying that my issue is fixed and i followed the same steps mentioned in http://community.jboss.org/message/209981#209981.
I feel this is a "hack" and i hope the future AS will take care of this by just changing some configuration files.
Thanks
Anil Mathew