permaculture playing cards*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Transaction Atibes for MDB's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Transaction Atibes for MDB Watch "Transaction Atibes for MDB New topic
Author

Transaction Atibes for MDB's

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

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?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

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

Joined: Jul 17, 2008
Posts: 844
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.

SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

It seems to me that atleast Supports makes sense.
Graeme Jenkinson
Greenhorn

Joined: Sep 08, 2008
Posts: 27
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
 
Consider Paul's rocket mass heater.
 
subject: Transaction Atibes for MDB's