Results 1 to 3 of 3

Thread: Mix JDK and CGlib proxies in one AppCtx

  1. #1
    Join Date
    Sep 2007
    Posts
    9

    Question 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. #2
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    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
    This post can contain insufficient information.

  3. #3
    Join Date
    Sep 2007
    Posts
    9

    Unhappy 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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •