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

Transactions and Messege Driven Beans

 
Pourang Emami
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the following statement true?

"client's transaction context is never passed to a MDB. The container creates a new transaction context for a MDB if it requires a transaction"
 
Shahfazal Mohammed
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pourang Emami:
Is the following statement true?

"client's transaction context is never passed to a MDB. The container creates a new transaction context for a MDB if it requires a transaction"


A client can never call an MDB directly. MDBs do not have home/remote/local interfaces for the client to lookup/create/use the MDB. The Container manages everything about an MDB, instantiation, removal, calling the onMessage(Message m) method .... in fact, 'Required' and 'NotSupported' are the only transaction attributes that an MDB can use w/ it's onMessage() method, because the others do not make sense.

HFEJB page#500
'You can say only two things for onMessage():
YES, I want to start a transaction (Required)
or
NO, I don't want to start a transaction (NotSupported)

hope this helps

[ May 15, 2004: Message edited by: Shahfazal Mohammed ]
[ May 15, 2004: Message edited by: Shahfazal Mohammed ]
 
Pourang Emami
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Mohammed

Thank you for your info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic