My application is a mix of ejb2.1 and ejb3 beans (actually mostly ejb2.1... 
have just started doing new development using ejb3). 

I am thinking of using ejb3 style interceptors to do audit logging of my 
application.

My interceptor class

public class AuditLoggger {
  |     
  |     @AroundInvoke
  |     public Object log(InvocationContext ctx) throws Exception {
  |               [CODE TO APPEND TO AUDIT LOG]
  |         }
  | }

Using this to to audit log my ejb3 bean methods is straightforward

public @Stateless class AccountManagerBean implements AccountManager {
  | 
  |         @Interceptors({AuditLoggger.class})
  |     public long createAccount (String user) {       
  |         }
  | }

My question is can I use the same interceptor class with my ejb2.1 beans? How?




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002936#4002936

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002936
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to