Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A MDB Question

 
krithika desai
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pretty basic. If i send a message to a MDB and an exception gets thrown while performing an operation, depending upon my trans-attribute setting, things will be rolled back or otherwise?.Now does the message that I sent get back to the message queue? and will it retry the whole thing again later @ some other point of time?
If it does is there any timeout and max tries setting?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the message sending code is a part of a transaction and some error occurs which results in Tx rollbacvk, the message is not delivered.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
 
Ashish Sarin
author
Ranch Hand
Posts: 444
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If 'Required' transaction attribute is specified for the onMessage(javax.jms.Message) method ONLY then the message will be redelivered to the MDB instance. In case of MDBs designed with BMT no message is re-delivered because message delivery is never a part of transaction in case of BMTs.
regards
ashish sarin
 
krithika desai
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ashish, pradeep,
that helps. I guess the app servers do allow us to configure the number of retries then?.
 
Ashish Sarin
author
Ranch Hand
Posts: 444
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so. It is probably handled by the Application Server behind the scenes.
regards
ashish sarin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic