M
Marius
Hi All,
I am having a hard time getting a "jms queue connection watcher" to
work with the J2EE Reference Implementation 1.3.1. What I need to do
is monitor the status of a JMS server and, in case it goes down, try
to reconnect to it when it's brought up again, without having to
restart the client.
I have a client that periodically does a count of the messages in a
queue. If this fails for any reason, this operation is retried and,
when successful, the real connections are recreated. The scenario is
the following:
1. Bring up the j2ee server (btw, I have created all needed objects -
queue factories, queues)
2. Connect to it and count the messages in Queue Q1. This operation
is repeated everyt 10 seconds.
3. Take down j2ee (I do it cleanly: j2ee -stop)
4. Client reports
javax.naming.CommunicationException: java.rmi.MarshalException:
CORBA COMM_FAILURE 1398079689 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: minor code: 1398079689 completed: No
5. Client continues to hit the jms server. Same error is reported.
6. Bring up the J2EE server. Client will never reconnect. The same
exception as above keeps being thrown.
I am wondering whether there is a bug in the j2ee implementation. I
searched the Internet, try changing classpaths (to point to locale,)
added
com.sun.jms.internal.java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
to jms_client.properties and jms_service.properties, etc; nothing
worked.
I noticed that, when I create a queue connection the first time the
line "Java(TM) Message Service 1.0.2 Reference Implementation (build
b14)" is printed on the console, and this never happens again (after
closing the queue connection).
I tried my code with Tibco JMS provider and it worked perfectly...
Any clue will be greatly appreciated. Thanks in advance,
Marius
P.S. My first implementation used the ExceptionListener but, again
J2EE didn't work (didn't call my callback method when the connection
went down). Anyway, this is another problem...
I am having a hard time getting a "jms queue connection watcher" to
work with the J2EE Reference Implementation 1.3.1. What I need to do
is monitor the status of a JMS server and, in case it goes down, try
to reconnect to it when it's brought up again, without having to
restart the client.
I have a client that periodically does a count of the messages in a
queue. If this fails for any reason, this operation is retried and,
when successful, the real connections are recreated. The scenario is
the following:
1. Bring up the j2ee server (btw, I have created all needed objects -
queue factories, queues)
2. Connect to it and count the messages in Queue Q1. This operation
is repeated everyt 10 seconds.
3. Take down j2ee (I do it cleanly: j2ee -stop)
4. Client reports
javax.naming.CommunicationException: java.rmi.MarshalException:
CORBA COMM_FAILURE 1398079689 No; nested exception is:
org.omg.CORBA.COMM_FAILURE: minor code: 1398079689 completed: No
5. Client continues to hit the jms server. Same error is reported.
6. Bring up the J2EE server. Client will never reconnect. The same
exception as above keeps being thrown.
I am wondering whether there is a bug in the j2ee implementation. I
searched the Internet, try changing classpaths (to point to locale,)
added
com.sun.jms.internal.java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
to jms_client.properties and jms_service.properties, etc; nothing
worked.
I noticed that, when I create a queue connection the first time the
line "Java(TM) Message Service 1.0.2 Reference Implementation (build
b14)" is printed on the console, and this never happens again (after
closing the queue connection).
I tried my code with Tibco JMS provider and it worked perfectly...
Any clue will be greatly appreciated. Thanks in advance,
Marius
P.S. My first implementation used the ExceptionListener but, again
J2EE didn't work (didn't call my callback method when the connection
went down). Anyway, this is another problem...