[jboss-user] [JBoss AOP] - Re: How can we pintcut JBoss classes?

kabir.khan@jboss.com do-not-reply at jboss.com
Tue Nov 14 10:19:32 EST 2006


It should be possible. The simplest solution will be to use "execution" instead of "call":

  | <bind pointcut="execution(* org.jnp.server.NamingServer->setBinding(..))">
  |   <advice name="notify" aspect="com.cmi2.facility.jndi.aop.JndiNotifier" />
  | </bind>
  | 

This only weaves the target class, while "call" needs to weave all the classes calling the method. The AspectManagerService contains the attributes Include and Exclude to include/exclude what can be woven http://labs.jboss.com/portal/jbossaop/docs/1.5.0.GA/docs/aspect-framework/reference/en/html/running.html#d0e3323

By default classes starting with org.jboss. are excluded, so chances are that your callers are being excluded.

Also, make sure that you have loadtime weaving turned on http://labs.jboss.com/portal/jbossaop/docs/1.5.0.GA/docs/aspect-framework/reference/en/html/running.html#jboss

There is an example that comes with the aop download under aop/docs/aspect-framework/examples/injboss that you can use to validate if you have everything set up properly

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985809



More information about the jboss-user mailing list