This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JMS Consumer not receiving any messages. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS Consumer not receiving any messages." Watch "JMS Consumer not receiving any messages." New topic
Author

JMS Consumer not receiving any messages.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
Hi bellow is the code for JMS Consumer. I have tried to debug the code but the program is not calling onMessage() even though there are messages.

am i missing something ?



Jigar Naik


Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
Hey,

I have commented the following line of code, and i received all the messages.



but then when should i close the consumer, session and connection ???
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

In a finally block, to guarantee they get closed.


My Blog: Down Home Country Coding with Scott Selikoff
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
all right.. thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS Consumer not receiving any messages.