Hi,
I'm having problems getting IC failover to work, any advice/hint is very
welcome. The interesting thing is that the failover works only one way
(instance1 -> instance2) but not the other way round.
Setup:
Cluster with 2 instances and a simple ejb deployed.
Testclient with the following logic:
try {
InitialContext ic = new InitialContext();
TestBean bean = (TestBean)
ic.lookup("java:global/module/ejbname");
for (int i=1; i < 10; i++) {
System.out.println(bean.sayHello());
Thread.sleep(30000);
}
} catch (Exception e){
e.printStackTrace();
}
Startparamters for the test:
-Dorg.omg.CORBA.ORBInitialHost=ip-cluster-instance1
-Dorg.omg.CORBA.ORBInitialPort=port-cluster-instance1
Testsetup1
- Starting the test
- The first lookup lands on cluster-instance1
- I kill cluster-instance1
- The next remote call causes a "connetion refused" exception on the client
but then fails over to cluster-instance2
Testsetup2: Changing the InitialHost/Port to cluster-instance2 values
- Starting the test
- The first lookup lands on cluster-instance2
- I kill cluster-instance2
- The next remote call causes a "connetion refused" exception but no failover
occurs. Which results in a lot of "connection refused" exceptions.
I also tried to create the InitialContext with properties but that didn't
change my results:
Properties props = new Properties();
props.put("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.put("java.naming.factory.url.pkgs",
"com.sun.enterprise.naming");
props.put("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.put("com.sun.appserv.iiop.endpoints",
"host1:port1,host2:port2");
InitialContext ic = new InitialContext(props);
Any ideas?
Regards
Bernd
--
[Message sent by forum member 'boernd']
View Post: http://forums.java.net/node/873951