Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

MDB Timeout??

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Craig Hitman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic