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.
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
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.
OC4J standalone states that it does not support clustering.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Jul 27, 2004
It supports clustering. I have gone through the OC4J documentation. My other applications are running fine. Only problem I'm facing is with the JMS application. Is there any specific thing anybody is aware of?
Marilyn de Queiroz
Joined: Jul 22, 2000
Sorry. My error. I misread "Localhost will not work with clustering".
We have the same problem. First we try set parameter res-sharing-scope in ejb-jar.xml to Shareable:
This work only on standalone OC4J 9.0.3 aplications servers in cluster, but didn't work on 9iAS in cluster. But we use some servlet to sending JMS to Queue, whitch work ok on all systems, and because that we make HTTPRequest to servlet from EJB. No pretty, but working solution. We have two projects ejb and web together, and we may use this, but when yiu have only ejb project you have problem still I think that this is something wronk in configuration in ejb-jar.xml or orion-ejb-jar.xml [ August 05, 2004: Message edited by: R�bert Nagy ]
Joined: Jul 27, 2004
You have said that it works fine with standalone oc4j cluster. I'm using a standalone oc4j cluster only and I'm having the same settings in the ejb-jar.xml but this error still comes. If I start the servers at the same time then it works fine. It seems to be some problem with the jms.xml and rmi.xml files. Can you tell me the settings in your jms.xml and rmi.xml files. Also , what setting you are doing in orion-ejb-jar.xml file?
In jms.xml configuration file I use host="[ALL]": <jms-server host="[ALL]" port="9127">
and for topic-connection-factory you must use multicast host adress (try use 188.8.131.52 or more): <topic-connection-factory name="My Topic Connection Factory" host="184.108.40.206" port="9127" location="jms/MyTopicConnectionFactory" username="username" password="password"> <description>My Topic Connection factory</description> </topic-connection-factory>
When you use Queue, you don't need configure any special.