• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why MDB transaction attributes are required instead of required new?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB's allowed transaction parameters are required and not supported.
MDB's has no client access. These things will be called by container.
why "required" is used here?
is there any chance that message driven beans invoked by some other process which is already in transaction? Why not it is "required New"?
 
Tony Tranquil
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For MDB transaction attribute, you can use just NotSupported/Required. no other option.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Requires New" would imply that there could be a pre-existing transaction that may need suspending.

That cannot be the case for an MDB.

"Required" simply states that a transaction needed.
As a transaction cannot pre-exist for an MDB, the container will always create one.

Ultimately "Required" is the simpler of two - which probably explains why it was chosen.

Please take this into account. Your questions would have eventually been answered in the SCBCD forum - I answered them here because I happened to see them here first. So future EJB (the nitty-gritty details) questions should just stay in the "SCBCD" or the "EJB and Other J2EE Technologies" forums.
[ October 03, 2005: Message edited by: Peer Reynders ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic