[jboss-user] [JBoss AOP] - Re: Different jboss-aop.xml files for unit testing

nizzy do-not-reply at jboss.com
Tue Apr 14 10:39:55 EDT 2009


Hi Flavia,

Thanks for the response. I have tried your suggestion however when the pointcut is of type "execution" then it is intercepted and the defined aspect is executed.


  | <aspect class="com.ecebs.unittest.aop.aspect.ExceptionInjector" scope="PER_VM" />
  | 
  | <bind pointcut="execution(public void com.ecebs.unittest.aop.ExampleManagerBean->createObject(..))">
  |     	<advice name="throwMultefileException" aspect="com.ecebs.unittest.aop.aspect.ExceptionInjector" />
  | </bind>

However when I change it to 


  | <aspect class="com.ecebs.unittest.aop.aspect.ExceptionInjector" scope="PER_VM" />
  | 
  | <bind pointcut="call(public void com.ecebs.unittest.aop.ExampleManagerBean->createObject(..))">
  |     	<advice name="throwMultefileException" aspect="com.ecebs.unittest.aop.aspect.ExceptionInjector" />
  | </bind>

The class defined in the aspect is never executed. Is there anything else I need to do that I have missed?

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

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



More information about the jboss-user mailing list