[jboss-user] [JBoss AOP] - How does this work?

pablogmuller do-not-reply at jboss.com
Wed May 14 15:34:27 EDT 2008

Hi, this is probably a geek only question :)
I have this binding (in a Web application deployed to tomcat 5.5): 

  | <bind pointcut="execution(* com.tme.evsp.facade.impl.EntidadFacadeImpl->*(..))">
  | 		<interceptor-ref name="com.tme.evsp.aop.TransactionAspect"/>    
  |    </bind>

When I comile the classes with the aopc the com.tme.evsp.facade.impl.EntidadFacadeImpl class is modified, but when the methods are executed, the interceptor is never called. I get an stacktrace where you can see that it is using the modified classes. 
In a desperate act I decompiled the modfied class. In the method that is supossed to execute the interceptor I have this:

  |  if(aop$MethodInfo_insertar_N_6157956559412051353 == null)
  |             {
  |                 entidadfacadeimpl.com$tme$evsp$facade$impl$EntidadFacadeImpl$insertar$aop(entidaddo);
  |                 return;
  |             }
and is after that "if" where it seems to execute the code of the interceptor.
If that is null, the original method is called???
If that's so... why is it null? since it is being initialized here:

  | protected void initialiseMethods()
  |         {
  |             Object obj = null;
  |             aop$MethodInfo_delete_N_2886166142478622837 = new MethodInfo(Class.forName("com.tme.evsp.facade.impl.EntidadFacadeImpl"), 0xd7f2472f5acd5f8bL, 0x828b6ecfb4537b34L, this);
  |             addMethodInfo(aop$MethodInfo_delete_N_2886166142478622837);
  |             Object obj1 = null;
  |             aop$MethodInfo_insertar_N_6157956559412051353 = new MethodInfo(Class.forName("com.tme.evsp.facade.impl.EntidadFacadeImpl"), 0xaa8a8b22adf54267L, 0x232891d50781d99bL, this);
  |             addMethodInfo(aop$MethodInfo_insertar_N_6157956559412051353);
  |             Object obj2 = null;
  |             aop$MethodInfo_retrieve5260743650528787163 = new MethodInfo(Class.forName("com.tme.evsp.facade.impl.EntidadFacadeImpl"), 0x4901ea7a4028fadbL, 0x2deca2ce73887e4aL, this);
  |             addMethodInfo(aop$MethodInfo_retrieve5260743650528787163);
  |             Object obj3 = null;
  |             aop$MethodInfo_update_N_3881587798040445288 = new MethodInfo(Class.forName("com.tme.evsp.facade.impl.EntidadFacadeImpl"), 0xca21d476954efe98L, 0x281b06f9613e46a4L, this);
  |             addMethodInfo(aop$MethodInfo_update_N_3881587798040445288);
  |         }

The jboss-aop.xml file should be deployed with the application? where?

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

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

More information about the jboss-user mailing list