EJB calls loadbalancing

Avatar

Avatar

Jaroslav_Pavlic

Avatar

Jaroslav_Pavlic

Jaroslav_Pavlic

02-12-2013

Sirs,

I call LiveCycle on JBoss 5.1 server (livecycle ES3 turnkey installation) using EJB API without problem on one machine.

When in cluster, I would like loadbalance calls between two nodes. But I'm unable to do that. All calls are processes by same node. I use such a simple code:

jndi.properties:

java.naming.factory.initial= org.jnp.interfaces.NamingContextFactory

java.naming.provider.url=node1:1100,node2:1100

test.java:

...

Properties connectionProps = new Properties();

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

HashMap<String,String> hmInput = new HashMap<String, String>();

hmInput.put("a","10");

hmInput.put("b","20");

for(int i=0;i<5;i++) {

     InvocationRequest ir = myFactory.createInvocationRequest("tst/NewProcess1", "invoke", hmInput, true);

     InvocationResponse ires = myFactory.getServiceClient().invoke(ir);

     System.out.println("Result: " + ires.getOutputParameter("c"));

}

-------

According to JBoss documentation (http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html/clustering-jndi.html), there should be round robin implementation and calls should be processed by both nodes.

Can you help me, please?

Thanks,

--- Jaroslav

Accepted Solutions (0)

Answers (0)