Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are calls between clustered session beans not load balanced even though load balancing policy is Round Robin?

0
Posted

Why are calls between clustered session beans not load balanced even though load balancing policy is Round Robin?

0

Let’s say that we have two session beans, A and B. A is not a clustered bean and is deployed in server 1 and B is a clustered bean deployed in servers 1 and 2. Using Round-Robin as load balancing policy, you might expect calls from bean A to bean B to be load balanced between servers 1 and 2. Actually, this is not what will happen. Repeated calls from bean A to bean B will always remain in server 1. In JBoss, the default policy is to invoke locally for clustered ejbs. This avoids the need for distributed transactions and serialisation, thus reducing the complexity of the call and increasing the performace. There’s various alternatives in order to avoid this situation. First one, remove session bean A from server 1 and deploy it in a new server, let’s say server 3. Calls from bean A to bean B will then be load balanced between servers 1 and 2. Another alternative would be to write your own interceptor and modify the EJB stack(only available from JBoss 4.0.2).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123