I'm using OC4J 9.0.3 as a standalone server on Windows XP. I have a
Tomcat 4.1.29 as my webserver on a different physical location. My webapp is installed in Tomcat and my
ejb's are insalled in oc4j within a ear file. I'm also using OC4J/JMS as my jms provider. From my EJB I add a message in the jms queue. It works fine. But now when I cluster the oc4j by introduing another OC4J in a different phyisical location (in a seperate JVM) then my problem starts. I'm using OracleAS JMS Server Distributed Destinations where all factories and destinations are defined on both OC4J instances.
Following are different problems I get
1. I start both the servers at the same time and then If I run my jms application it gives the following error in my program.
javax.jms.JMSException: Unable to connect to JMSServer (/host1:9125)
2. Sometimes I get this error in the console.
java.lang.NullPointerException
at com.evermind.server.jms.JMSServer.removeClient(JMSServer.java:724)
at com.evermind.server.jms.JMSRequestHandler.run(JMSRequestHandler.java:278)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
My jms.xml files on both the servers is same except for the port and host attributes. My two jms.xml files on two different servers are
<jms-server port="9125" host="host1">
<queue name="Queue1" location="jms/Queue/Queue1" persistence-file="pers"> </queue>
<queue-connection-factory location="jms/Queue/QCF"></queue-connection-factory>
</jms-server>
<jms-server port="9127" host="host2">
<queue name="Queue1" location="jms/Queue/Queue1" persistence-file="pers"> </queue>
<queue-connection-factory location="jms/Queue/QCF"></queue-connection-factory>
</jms-server>
3. If I start only one OC4J (host1) server then It works fine. If I start the second server (host2) after some time it still works fine. But if I stop the host1 oc4j server it's not able to find the jms server as it still looks for the host1 jms server.
Do I need any other specific configuration?