Hello,
I need to write a custom loadbalancer or interceptor to route EJB requests to different
servers in the cluster. The problem is I can't get JBoss to use my LB. Anyone have an
idea? I am thinking maybe jboss can't find my class and therefore doesn't use it.
If this is the case, where should I put the LB class?
section of jboss.xml for the clustered (stateless) bean:
| <cluster-config>
| <partition-name>MyPartition</partition-name>
| <bean-load-balance-policy>
| com.acme.MyCustomBalancer
| </bean-load-balance-policy>
| <home-load-balance-policy>
| com.acme.MyCustomBalancer
| </home-load-balance-policy>
| </cluster-config>
|
And the simple LB I try to use for testing
| public class MyCustomBalancer extends FirstAvailable {
|
| @Override
| public Object chooseTarget(FamilyClusterInfo clusterFamily, Invocation
routingDecision) {
| System.out.println("AAAAAAAAAAA");
| //List targets = clusterFamily.getTargets();
| return super.chooseTarget(clusterFamily, routingDecision);
| }
|
| }
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236772#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...