Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

ques about message beans

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the different circumstances that will make the container to put the message back in the queue ???

According to HFE,
For CMT :- When a transaction rollback occurs.
For BMT :- When a RuntimeException occurs .

Is that all ???

Also spec 15.4.10 says Message-driven beans, like other well-behaved JMS MessageListeners, should not, in general, throw
RuntimeExceptions.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually according to my interpretation of what I have read I think in the cases where the delivery system does not get a acknowledgement of the message a redelivery takes place. For a CMT the acknoledgement is always tied up with the transaction. So if transaction rolls back we get the redelivery...even if it is done by calling setRollBackOnly()... where as in the case of a BMT Message bean the transaction is tied to the method completion. So if we setRollBack using code and the method returns fine...i mean completes then no redelivery happens. Only if we get a system exception ..where the method fails to complete we get a redelivery.
 
Nitin Mehhta
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And yes we should not throw Runtime exceptions...it is just that something which we are not expecting happens then these exceptions are generated from the running code. So they are propogated automatically. I think by that the specs means that we should not explicitly throw any runtime exception.
reply
    Bookmark Topic Watch Topic
  • New Topic