tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: 3.0 Singleton in Container Question
Date Fri, 11 Sep 2009 23:15:41 GMT

On Sep 11, 2009, at 5:52 AM, Quintin Beukes wrote:

> That's great. I didn't even think of the EJB interceptors. Can they be
> cross JAR as well? I basically have all my EJB projects.
> Then I have a 2 different auditing modules. Depending on the auditing
> module you deploy (which would be a separate jar) you should get
> different interceptors (not just different implementations but
> completely different 'approaches').

Not sure of the intended distinction between implementations and  
approaches, but yes you can have different interceptors for each  
module, each bean or even each method of a bean.

In terms of instantiation and lifecycle, the interceptor instances  
share the exact same lifecycle of the bean they are intercepting  
(wrapping).  So interceptor instances are created when individual  
beans are created and destroyed when the individual beans are destroyed.

In terms of configuration you can say "this interceptor class applies  
to all ejbs in this module" (a global interceptor) or to "this  
bean" (class interceptor) or "this method".  You can even exclude the  
global interceptors or exclude the class interceptors, etc. etc.  It's  
pretty flexible.


View raw message