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 MDB Timeout?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "MDB Timeout??" Watch "MDB Timeout??" New topic
Author

MDB Timeout??

Craig Hitman
Greenhorn

Joined: Aug 26, 2003
Posts: 6
Is there such a thing in the API as a MDB timeout? Take this scenario:
I deploy a MDB that is suppose to listen to a queue. For some reason the queue is not available (like if the queue manager is down, etc). In Weblogic, you can watch the console spin and the MDB continues to connect to that queue. Now, imagine having twenty plus queues some with multiple instances trying to listen to queues. It takes up a lot of server process.
Is there a timeout or something that can be set in the data descriptor of the MDB that says something like "after five times of trying to connect to the queue, the MDB will stop listening"??
ANY advise is greatly appreciated. Thanks!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
It's actually not the MDB that's listening to the JMS queue. It's the container's job to listen to messages, pick an MDB instance from a pool and let it process the message.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Craig Hitman
Greenhorn

Joined: Aug 26, 2003
Posts: 6
If it is the container job, than how would you solve the problem so an endless loop of trying to connect does not occur?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Is it really a performance problem? And if it is, is it really "acceptable" that the JMS server is down?
I'd look for my appserver vendor's documentation for how to configure such a timeout, if such functionality is provided at all. Other than that, I'd try to distribute the load by clustering the application server.
[ August 26, 2003: Message edited by: Lasse Koskela ]
Craig Hitman
Greenhorn

Joined: Aug 26, 2003
Posts: 6
Lasse,
Thanks for the input.
It is a performance problem and no, the JMS server would not be down.
Let's say that their is a problem with one of the queues. The MDB will still be listening for it. It will take up a percentage of processing from the app. server.
I would think, or hope to, that their would be a parameter in the MDB's data descriptor that would all me to set a number of times it would try to connect to the queue. If it hit that parameter, then it would stop the connection attempt.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Interesting. So the failing queue listener take up more resources than a working listener?
There is no such a configuration specified in the specification so you have to rely on your application server's proprietary features, I'm afraid.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
See this link for configuring the number of seconds between attempts to reconnect to the JMS destination: Reconnecting to a JMS Server or Non-BEA Service Provider.
I am moving this to the WebLogic Forum for any further discussion...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDB Timeout??
 
Similar Threads
Messae driven Bean
A question about clustering and jms
MDB Timeout??
JMS - MDB - WebSphere
Mapping MDB JMS references to different queues using descriptors