Beeing Java5 Proxy as a jaxws spec requirement I'd need to use Proxy-based AOP, but then fall into the @Resource issue I reported. I've changed my AOP settings to use compile-time aspectJ for jaxws client instrumentation (from callers).
2009/5/5 Daniel Kulp <[email protected]> > > jaxws:client would generate a Java 5 proxy, not a CGLIB proxy. (that's > kind > of per jaxws spec) My guess is that java5 proxies are final. Can you > set > the aop stuff to use the java5 proxies instead of the CGLIB? > > Dan > > > On Mon May 4 2009 9:26:53 am nicolas de loof wrote: > > Hi guys, > > I'm running into a CGLIB issue when trying to setup spring-aop on : > > > > <jaxws:client id="metierServicePortType" > > serviceClass="....MetierServicePortType" > > address="${metierService.url}"> > > </jaxws:client> > > > > My monitoring framework uses spring-AOP (ApscetJ syntax) to instrument > > beans > > > > > > @Around( "SystemArchitecture.externalWebServiceCall()" ) > > public Object log( ProceedingJoinPoint jp ) { ... } > > > > @Pointcut( "bean(*PortType)" ) > > public void externalWebServiceCall() {} > > > > With this configuration I get an exception : > > > > Caused by: org.springframework.aop.framework.AopConfigException: Could > not > > generate CGLIB subclass of class [class $Proxy169]: Common causes of this > > problem include using a final class or a non-visible class; nested > > exception is java.lang.IllegalArgumentException: Cannot subclass final > > class class $Proxy169 > > at > > > org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.ja > >va:213) at > > > org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:1 > >10) > > > > From my understanding, <jaxws:client> creates a CGLIB proxy as web > service > > client bean, and my AOP frameworks also tries to create one BUT the first > > CGLIB class is created as FINAL. > > Is there any workaround ? > > > > Nicolas > > -- > Daniel Kulp > [email protected] > http://www.dankulp.com/blog >
