[jboss-user] [JBoss AOP] - How can we pintcut JBoss classes?
mskonda
do-not-reply at jboss.com
Tue Nov 14 10:02:58 EST 2006
I have a requirment to provide a notification based on JNDI bind/unbind/rebind events. Of all the scenarios to reach out for a solution, the last resort was to use AOP (and yes, others aren't successful).
I know there's a limitation as to what you can pointcutable in JBoss, I am wondering if there is any way I could intercept calls to couple of methods in org.jnp.server.NamingServer?
I tried this:
| <bind pointcut="call(* org.jnp.server.NamingServer->setBinding(..))">
| <advice name="notify" aspect="com.cmi2.facility.jndi.aop.JndiNotifier" />
| </bind>
|
|
(where JndiNotifier is a simple aspect )
and this
|
| <bind pointcut="call(* org.jnp.server.NamingServer->setBinding(..))">
| <interceptor class="com.cmi2.facility.jndi.aop.SimpleInterceptor" />
| </bind>
|
|
where SimpleInterceptor is really a simple interceptor (lifted from doc/examples).
The *.sar file is deployed successfull but when a bind/rebind takes place, no interceptor is invoked.
Could anyone pointme what I am doing and what I should do to intercept the NamingServer calls?
Thanks
/M
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985800#3985800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985800
More information about the jboss-user
mailing list