It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS" Watch "JMS" New topic


Anirudha Joshi

Joined: Apr 08, 2005
Posts: 22
Here is the scenario.

I have two JBOSS server instance running on two difference machines. BOX1 and BOX2. I configured the JMS queue on BOX1. Queue messages are persisted in the Oracle database. Web application running on BOX1 and BOX2 pushes messages in the queue configured on BOX1. And I have a JSP page which browses through the current messages of the queue and displayes it on the web page.

But now what is happening is, when a message is pushed from BOX1 web application to the queue, JSP page displayes this newly added message. But when a message is pushed by BOX2 web application, JSP does not show that message till I restart the BOX1 JBOSS. However If I see the record count of JMS_MESSAGES table, it returns the exact count.

Whats the problem and how do I resolve it?

Hemanth Pallavajula
Ranch Hand

Joined: Oct 07, 2004
Posts: 38
Hi Anirudha,

I think when you are sending messages from the BOX2, the onMessage() method of the MDB is not getting called. You can put an System.out.println(SOP) as the first statement in the onMessage() of your MDB and verify this. As because, this method is not getting called, that message is not getting shown in the JSP.

Please post your reply telling whether the SOP is getting executed or not, when you are sending message from BOX2.

A last word, do check your JMS configuration once, before going ahead.
[ June 25, 2005: Message edited by: Hemanth Pallavajula ]

Cheers,<br />Hemanth...<br />(When opportunity doesn't knock, build a door.)
I agree. Here's the link:
subject: JMS
It's not a secret anymore!