• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about MDB and their Transaction

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody,

just a quick question because I was confused by Ethnuwares Training program:

Is it possible for a MDB for actually rollback a transaction from a bean sending a message to the MDB ?

I thought that MDBs would live in a transaction context that would always be created for them by the container ...
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I have understood it as follows (please correct me if I am wrong!):
When a MDB is involved in a transaction which includes receiving a message, rolling back the transaction will result in the message being re-inserted into (or not removed from, in the first place) the queue. Inserting the message into the queue is done in another, earlier, transaction.
Remember that messages to MDBs do not go directly from the sender to the MDB, but always via a queue.
References:
EJB 3.1 Specification, chapter 13 (with sample scenarios in section 13.2).
Best wishes!
reply
    Bookmark Topic Watch Topic
  • New Topic