[ 
https://issues.apache.org/jira/browse/CXF-2304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762634#action_12762634
 ] 

Bob Jacoby commented on CXF-2304:
---------------------------------

I just tried with CXF 2.2.3 and this issue seems to be resolved.

After looking through the change log of 2.2.3 I'm believe this issue was 
related to CXF-2210 where the Jsr250BeanPostProcessor used a @Resource 
annotation to load the cxf bean. On instantiation the cxf bean would 
instantiate the various interceptors, which (in my case) included a slew of 
managers that I need to be auto-proxied. I believe that since the @Resource was 
removed in the fix for 2210, the interceptor (and hence my managers) was no 
longer being created too early for auto-proxying.

My test case:
Before upgrading, my managers were unable to be autoproxied due to inclusion in 
a CXF interceptor (see previous comment). Once I upgraded to 2.2.3 (without 
changing anything else), my managers were proxied.

> In Spring AOP, some aspect failed to apply
> ------------------------------------------
>
>                 Key: CXF-2304
>                 URL: https://issues.apache.org/jira/browse/CXF-2304
>             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="com.foo.FinderIntroductionInterceptor" 
> />
>     <aop:config>
>         <aop:aspect ref="queryInterceptor">
>             <aop:pointcut id="findQuery"  expression="execution(* 
> com.foo..*Dao.find*(..)) and this(com.foo.FinderExecutor)" />
>             <aop:pointcut id="listQuery" expression="execution(* 
> com.foo..*Dao.list*(..,int,int)) and this(com.foo.FinderExecutor)" />
>             <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 proxy.
> 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.

Reply via email to