Hi, Glassfish experts,
A user at Glassfish Chinese forum reported an issue regarding IIOP load-balancing not happening in cluster, whereas the same worked on JBoss.
http://gceclub.sun.com.cn/NASApp/sme/jive/thread.jsp?forum=22&thread=46978
He has successfully configured a two-node cluster, and deployed an EJB module to the cluster. So far so good. When running the test client to invoke the EJB, all requests are always serviced by instance1, never by instance2.
Another factor in his app is, he needs to run the invoke the ejb from inside Tomcat or JBoss. As such, he needs to use InitialContext(Properties), as opposed to the usual no-arg InitialContext():
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); props.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", "10.100.1.151");
props.setProperty("org.omg.CORBA.ORBInitialPort", "33700");
InitialContext ctx = new InitialContext(props);
TestEJBRemote testBean = ctx.lookup("com.xxx.TestEJBRemote");
testBean.invoke();
I suggested to try a multi-thread client to really activate the load-balancing, and pointed him to Glassfish EJB FAQ (
https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html). Still the same.
Your help is appreciated.
-cheng
[Message sent by forum member 'cf126330' (cf126330)]
http://forums.java.net/jive/thread.jspa?messageID=243991