• Post Reply Bookmark Topic Watch Topic
  • New Topic

Message-driven bean:Attributes  RSS feed

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt in Message-driven beans transaction attribute.
In HFEJB PGNO 500, it is given that MDB can use only TWO attributes:Requires and NotSupported.
Iam not understanding what it means. Can anyone brief this.

Thank You
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only the NotSupported and Required transaction attributes may be used for message-driven beans. The use of the other transaction attributes is not meaningful for message-driven beans because there can be no pre-existing transaction context (RequiresNew, Supports) and no client to handle exceptions (Mandatory, Never).

Note that it is Required, not Requires
 
vinod balaji
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for Your nice note.Now Iam clear
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Satou,

What do you mean by "there can be no pre-existing transaction context"?

The Required transaction attribute can promise a pre-existing tran-context?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "there can be no pre-existing transaction context"?

If there were one, it would be suspended, which is not possible for message driven beans as there's no client.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!