File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB 3, TX  @AroundInvoke Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB 3, TX  @AroundInvoke Question" Watch "EJB 3, TX  @AroundInvoke Question" New topic

EJB 3, TX @AroundInvoke Question

Camilo Morales
Ranch Hand

Joined: Jul 14, 2007
Posts: 92
Since the @AroundInvoke methods CAN NOT be business methods of a Bean, they CAN NOT define TX Attributes for Container-Managed Transaction demarcation, and they CAN NOT use the UserTransaction interface to manage transactions explicitly either, even if the @AroundInvoke method is inside a BMT Bean.

Is that right ?


Camilo Morales<br />SCJP 5, SCBCD 5
Shivani Chandna
Ranch Hand

Joined: Sep 18, 2004
Posts: 380
No, that is not true. Read the following lines from Core Specs -> Page 303.

Business method interceptor method invocations occur within the same transaction and security context as the business method for which they are invoked.

Lifecycle call back method execute in unspecified Tx and Security context.


/** Code speaks louder than words */
Camilo Morales
Ranch Hand

Joined: Jul 14, 2007
Posts: 92
Thanks for clarifying,
I agree. Here's the link:
subject: EJB 3, TX @AroundInvoke Question
It's not a secret anymore!