File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Message Driven Bean is unable to connect to the JMS Destination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Message Driven Bean is unable to connect to the JMS Destination" Watch "Message Driven Bean is unable to connect to the JMS Destination" New topic
Author

Message Driven Bean is unable to connect to the JMS Destination

Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
The title pretty much says it all. Right now I have a client sending to a queue and an EJB which should listen to the queue and print a message upon receipt.
We know the client is correct, because I print out the queue name after sending the message, and it has the name (not jndi name, but just the "human usable" name) returning from the queue's getName() method--so it's clearly finding the right queue on the server.
We also know that the EJB has the correct queue, because I first tried to deploy the EJB with the wrong queue name and got an error at deployment time.
This seems to be a problem with some server settings. The client sends the message ok, and then I get the error notice in the server log.
Server: WebLogic 7.0, Win2000 SP2
Client/IDE: JBuilder 8.0 Enterprise, Win2000 SP3

--Mark
[ December 19, 2002: Message edited by: Mark Herschberg ]
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
The first thing I would do is check the console to see if the Queue has even received any messages and if any of those messages have been consumed.
In the Admin Console (this from memory so don't flame):
Goto to Services->JMS->Servers->Your JMS Server->Monitoring->Monitor all Active JMS Destinations
The two values you are concerned with are:
Messages - current number of messages in the queue.
Messages Received - total number of messages received (consumed or not) since server startup.
If both of these values are zero then you aren't getting anything into the queue. If Messages is greater than zero then your MDB isn't picking up the messages.
Let me know what you find.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Also look at the Consumers column. The number should be at least 1 (your MDB), if it is not then you know your MDB is never registering as a listener.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
Originally posted by Chris Mathews:
The first thing I would do is check the console to see if the Queue has even received any messages and if any of those messages have been consumed.
In the Admin Console (this from memory so don't flame):
Goto to Services->JMS->Servers->Your JMS Server->Monitoring->Monitor all Active JMS Destinations
The two values you are concerned with are:
Messages - current number of messages in the queue.
Messages Received - total number of messages received (consumed or not) since server startup./QB]


When I go to
SimTradeDomain> Servers> myserver> Active JMS Connections
and click through to
SimTradeDomain> Servers> myserver> Active JMS Services> myserver.jms> Active JMS Conne...> connection225> Active JMS Sessions> session226> Active JMS Consumers
The "Order Placement Queue" is listed as in active, i.e. under active it reads false.
However, under
SimTradeDomain> JMS Servers> SimTrade JMS Server> JMS Destinations> Order Placement Queue> Active JMS Destinations
This shows that one message was received (and 0 pending). This is correct.

Can an inactive queue still receive messages? Is it just that I need to activate it?

--Mark
Originally posted by Chris Mathews:
[QB]The first thing I would do is check the console to see if the Queue has even received any messages and if any of those messages have been consumed.
In the Admin Console (this from memory so don't flame):
Goto to Services->JMS->Servers->Your JMS Server->Monitoring->Monitor all Active JMS Destinations
The two values you are concerned with are:
Messages - current number of messages in the queue.
Messages Received - total number of messages received (consumed or not) since server startup.
If both of these values are zero then you aren't getting anything into the queue. If Messages is greater than zero then your MDB isn't picking up the messages.
Let me know what you find.

Originally posted by Chris Mathews:
The first thing I would do is check the console to see if the Queue has even received any messages and if any of those messages have been consumed.
In the Admin Console (this from memory so don't flame):
Goto to Services->JMS->Servers->Your JMS Server->Monitoring->Monitor all Active JMS Destinations
The two values you are concerned with are:
Messages - current number of messages in the queue.
Messages Received - total number of messages received (consumed or not) since server startup.
If both of these values are zero then you aren't getting anything into the queue. If Messages is greater than zero then your MDB isn't picking up the messages.
Let me know what you find.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
I finally got back into the office today (after discovering that you can only remotely shut down the server, not remotely restart it :-p ) and played around with it some more. I don't think I changed any settings, but ultimately started getting more useful error messages in the log. Specifically, it complained that the Message Driven EJB supported transactions, but the queue did not. So I went to the QueueFactory and checked XAConnection Factory Enabled and Server Side XA Enabled (User Transactions Enabled was already checked). Now it works! Thanks for your help, Chris.
--Mark
[ December 26, 2002: Message edited by: Mark Herschberg ]
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Mark Herschberg:
I finally got back into the office today (after discovering that you can only remotely shut down the server, not remotely restart it :-p)...

You can use a Node Manager to allow for remote startup of WebLogic Servers (among other things). Here is a link to the documentation: Managing Server Availability with Node Manager.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Message Driven Bean is unable to connect to the JMS Destination
 
Similar Threads
Server can't post to a TemporaryQueue created by the client
I am befuffled by this behaviour!
Entity Bean unavailable to me
JMS and XAException on WLS 6...
Authentication using an MDB towards an external JMS provider