[jboss-user] [EJB 3.0] - sharing ejb3 style interceptors with ejb2.1 beans
ajay662
do-not-reply at jboss.com
Wed Jan 17 12:06:29 EST 2007
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
More information about the jboss-user
mailing list