This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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,
GeeCON Prague 2014
subject: EJB 3, TX @AroundInvoke Question