cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Jacoby (JIRA)" <>
Subject [jira] Commented: (CXF-2304) In Spring AOP, some aspect failed to apply
Date Mon, 10 Aug 2009 22:09:14 GMT


Bob Jacoby commented on CXF-2304:

Don't have a test case, but I ran into this as well. 

It appears to be due to the interceptors being instantiated prior to the AOP BeanPostProcessor
(eg. DefaultAdvisorAutoProxyCreator) being run. If I inject a bean in my interceptor, when
the application context loads it spits out the following:

INFO [main] XmlWebApplicationContext.postProcessAfterInitialization(1198) | Bean 'xxx' is
not eligible for getting processed by all BeanPostProcessors (for example: not eligible for

The bean is then never wrapped with the AOP Proxy. As soon as I remove the bean from the interceptor,
the bean is wrapped correctly (and the error is no longer displayed).

Not sure how CXF/Spring integration uses BeanPostProcessors to instantiate interceptors, but
perhaps it's a starting point...

> In Spring AOP, some aspect failed to apply
> ------------------------------------------
>                 Key: CXF-2304
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Integration
>    Affects Versions: 2.0.9, 2.0.11
>         Environment: Spring 2.5.3, JDK 1.5.0_12
>            Reporter: Adrian Shum
> This is a very strange issue, I am not sure if I can provide enough useful information.
> In my application, I have used spring AOP.  I am using an interceptor, and defining aspect
in spring application context.
> Everything is fine when I am using CXF 2.0.6.  
> However, after I upgraded to CXF 2.0.9 (and tried 2.0.11 too) Spring AOP failed to apply
aspects on some object (not all) that matches with the pointcut.
> Things I put in spring app ctx for the AOP looks like this:
>     <bean id="queryInterceptor" class="" />
>     <aop:config>
>         <aop:aspect ref="queryInterceptor">
>             <aop:pointcut id="findQuery"  expression="execution(**Dao.find*(..))
and this(" />
>             <aop:pointcut id="listQuery" expression="execution(**Dao.list*(..,int,int))
and this(" />
>             <aop:around pointcut-ref="findQuery" method="invokeFind" />
>             <aop:around pointcut-ref="listQuery" method="invokeFind" />
>         </aop:aspect>
>     </aop:config>
> When I am using CXF 2.0.6, in debug mode, I can see the injected bean is of type of a
> After upgrading to 2.0.9 (and 2.0.11 too), the injected bean is of the type of the original
bean, which means, the injected bean is the unproxied raw bean.
> It looks really strange for CXF affecting totally irrelevant Spring AOP.  However, once
I fallback to CXF2.0.6, everything become normal again.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message