This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Atibes for MDB's

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a question on the Transaction Attributes for MDB's. The O'Reilly book says that for an MDB (which does not have a client view), only NotSupproted or Required makes sense. But from the meaning of other attributes, it makes sense that Supports, Never also makes sense for an MDB. Any suggestions?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My wireless keyboard did not function well and that was why because the post title got screwed up. It is not Atibes but Attributes. Sorry for the typo.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Support Attribute two features-

1• If the client calls with a transaction context, the container performs the same steps as described
in the REQUIRED case.
• If the client calls without a transaction context, the container performs the same steps as
described in the NOT_SUPPORTED case
Due to second reason, the Support Attribute cannot be used.


Never Attribute-

3) it beans the starting MDB code can never have transaction. So even if MDB lifecycle method's want to start a new transaction, the def. of NEVER attribute will not allow it.

Due to this reason, the Never attribute cannot be used.


whereas NotSupported and Required has no such restrictions.


Atcually my answer is not too clear.

I think Reza or other's can give clear answer.
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems to me that atleast Supports makes sense.
 
Graeme Jenkinson
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I see it...

As an MDB does not have a local or remote business interface there are not methods for a client to invoke. So transaction attributes that depend on the state of the client (within or outside a transaction) are irrelevent. For example, it doesn't make sense to define that a client must never be within a transaction (Never) because it can't invoke a method on the MDB anyway!

thanks,

Graeme
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic