Announcement Announcement Module
Collapse
No announcement yet.
Mix JDK and CGlib proxies in one AppCtx Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mix JDK and CGlib proxies in one AppCtx

    I try to get some aspects wrapped around my JAX-WS 2.1 WebServices, clients and service providers.

    Now I have the problem that the service provider side requires CGLib proxies (to preserve @WebService annotations).

    For weaving around clients I require JDK proxies (since JAX-WS produces clients as JDK proxies and synthetic classes seem to be final, ie. cannot be sub-classed by CGLib).

    I already separated stuff into 2 AppCtx files (webService.xml and webServiceClient.xml). Is there a way to use CGLib on all beans defined in the provider xml file and JDK proxy for the rest of my Application Context?

    Or do you have any other idea?

  • #2
    This is only possible by splitting them into different application contexts, not just only files. For the general issue there is an enhancement request. See also the linked original issue.

    Joerg

    Comment


    • #3
      That sucks - ideas for a workaround?

      Hi Jörg,

      thx for the info.

      Do you think a workaround is possible?

      I found information about PRESERVE_TARGET_CLASS_ATTRIBUTE in the Spring docs. If I read this correctly, then I just need a way to augment the BeanDefinition of the classes where I need CGLib proxy with this attribute, and the AutoProxyFactory should create CGLib proxy.

      Sad thing is I have no idea how to manipulate the bean definition before the AutoProxy kicks in...

      Comment

      Working...
      X