• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

OC4J JMS Clustering problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OC4J standalone states that it does not support clustering.
 
Deepak Raina
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. My error. I misread "Localhost will not work with clustering".
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Deepak Raina
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert,

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?

Thanks,
Deepak
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for late reply

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 230.0.0.1 or more):
<topic-connection-factory name="My Topic Connection Factory" host="230.0.0.20" 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.

My rmi.xml configuration file:
<rmi-server port="23791">
<cluster username="username" password="password" host="224.0.0.3" id="123"/>
<log>
<file path="../log/rmi.log"/>
</log>
</rmi-server>

host is another multicast adress. Use the same id on both instances (or change to different, when it don't work).
 
reply
    Bookmark Topic Watch Topic
  • New Topic