Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Section 4.3.12 of EJB 3.0 Core Specs

 
Meng Tan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Got a question.
Hope anyone can help me.

In Section 4.3.12 (Business Method Interceptor Methods for Session Beans) of EJB 3.0 Core Specs, it says

"The AroundInvoke interceptor methods are supported for session beans. These interceptor methods may be defined on the bean class and/or on interceptor classes, and apply to the handling of the invocation
of the business methods of the bean�s business interface, component interface, and/or web service endpoint.

For stateful session beans that implement the SessionSynchronization interface, afterBegin occurs before any AroundInvoke method invocation, and beforeCompletion after all AroundInvoke invocations are finished."

My understanding is that "beforeCompletion" is not triggered by the invocation of the business methods and so why does "beforeCompletion" occur after all AroundInvoke invocations are finished?

Please help?
Thanks!!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is that "beforeCompletion" is not triggered by the invocation of the business methods and so why does "beforeCompletion" occur after all AroundInvoke invocations are finished?

A transaction can be set on a method of a bean's business interface, so I think that it means that for a transaction that ends at the end of the method, the beforeCompletion will occur after all AroundInvoke invocations are finished.
 
Meng Tan
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christophe,

Thanks for your explanation!

Meng Tan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic