You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Steve Ardis (JIRA)" <ji...@apache.org> on 2008/04/01 20:06:24 UTC

[jira] Commented: (CXF-1494) Issue Using JAX-RS / REST When AOP Proxy In Place

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

Steve Ardis commented on CXF-1494:
----------------------------------

Not a bad idea - but, I'd be concerned that the proxyAware setting may not apply to all of the <ref bean="..."> entries in the list.  Would proxyAware="true" just mean that a check should occur on each bean in the list, or that each bean would need to be a proxy?  The setting may be more appropriate on an a serviceBean entry - i.e.

<jaxrs:server id="services" address="/" proxyAware="true">
    <jaxrs:serviceBeans>

        <jaxrs:serviceBean proxyAware="true">
            <bean="test1" />
        </jaxrs:serviceBean>

        <jaxrs:serviceBean proxyAware="false">
            <bean="test2" />
        </jaxrs:serviceBean>

        <jaxrs:serviceBean>   <!-- means proxyAware="false"   -->
            <bean="test3" />
        </jaxrs:serviceBean>

        <bean="test4" />    <!-- equivalent to the test3 example, where proxyAware is defaulted to "false"   -->

    </jaxrs:serviceBeans>
</jaxrs:server> 

I'm looking a little more at the schema and CXF (in general) to understand exactly what I'm suggesting.  But, I'm having issues checking out the code.  Eclipse is currently giving me a "cannot checkout" error from subversion.

checkout -r HEAD http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/core
    RA layer request failed
svn: REPORT request failed on '/repos/asf/!svn/vcc/default'
svn: REPORT of '/repos/asf/!svn/vcc/default': 400 Bad Request (http://svn.apache.org)


> Issue Using JAX-RS / REST When AOP Proxy In Place
> -------------------------------------------------
>
>                 Key: CXF-1494
>                 URL: https://issues.apache.org/jira/browse/CXF-1494
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Steve Ardis
>
> If your beans.xml contains the following entry:
> <jaxrs:server id="services" address="/">
>     <jaxrs:serviceBeans>
>         <ref bean="test" />
>     </jaxrs:serviceBeans>
> </jaxrs:server>
> <bean id="test" class="test.rest.Test" />
> And you have a Spring AOP pointcut defined as:
> <aop:config>
>     <aop:pointcut id="testOperations" expression="execution(* test.rest.*.*(..))" />
>     <aop:advisor advice-ref="transactionAdvice" pointcut-ref="testOperations" />
> </aop:config>
> no mapping to the test bean are mapped and method cannot be invoked - it fails with "No operation found for path: /test/string/"
> If you comment out the contents of <aop:config> everything works fine.
> This link describes the problem with JAX-WS and the same issue probably applies to JAX-RS:
> http://incubator.apache.org/cxf/faq.html#FAQ-WhenusingSpringAOPtoenablethingsliketransactionsandsecurity%252CthegeneratedWSDLisverymessedupwithwrongnamespaces%252Cpartnames%252Cetc...
> However, the solution provided in the link does not work due to differences in the APIs between JAX-WS and JAX-RS.
> I have a dumbed-down Maven project that I can zip up and provide if necessary.
> Is there a suggested way around this problem for JAX-RS?
> Is there a reason that, if the instance of the class that JAX-RS sees is a proxy object, that it can't get the underlying class information by drilling into the proxy object, thereby eliminating the necessity to define the serviceClass information (as in the JAX-WS "fix")?  Ideally , I'd like to be able to do the following:
> <jaxrs:server id="services" address="/">
>     <jaxrs:serviceBeans>
>         <ref bean="test1" />
>         <ref bean="test2" />
>         <ref bean="test3" />
>     </jaxrs:serviceBeans>
> </jaxrs:server>
> without having to define separate jaxrs server(s) (as in the JAX-WS "fix").

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