This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to route Stateless Bean to appropriate node in weblogic Cluster?

 
Jeffty Stone
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using WLS11G cluster for our app. There are 2 physical machine and several wls nodes in every machine together for cluster.

We deploy web module and ejb module in wls nodes.

My question is: How to route Stateless Bean to another nodes (e.g. node in the other physical server) if current node's balance is heavy?

Here is how I tested it:

1. Set the max number to 1 for the bean.
2. in the method of the bean Thread.sleep a long time.
3. mark the bean with clusterable as below in weblogic-ejb-jar.xml, then access the web url which will invoke this EJB method (e.g. http://19x.xx.xx.xx:7001/testBean)
<stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
Then visit that URL again, now since this bean in the first ejb container is busy for the long time task, it should be routed automatically to another node (another node in the same machine or another node in the other physical machine).

But it failed, the request keeps on waiting until the first bean's task completed and been served after that. There is no any other node that jump out to serve for the request

Is there any other cluster configuration needed for the stateless bean load balance?

I don't think it's related with session replication or weblogic Default Load Algorithm, since the stateless bean is non-state and could be routed to any of the node.

And below is the weblogic-ejb-jar.xml for this bean. Thanks.


<weblogic-enterprise-bean>
<ejb-name>CalculateProcessor</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>1</max-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
</stateless-clustering>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic