Specifically, I need to intercept Naming.bind() and Naming.lookup() calls in my program. I am not sure if I can do this with JBoss AOP, as it seems that JBoss AOP cannot change Java system classes. Can anyone help me with this issue? Thanks very mucu!
Take a look at caller pointcuts
They work by instrumenting the caller instead, so if your code is responsible for binding into JNDI, you should be able to use these.