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

yarddog edited comment on CXF-1494 at 4/2/08 6:16 AM:
----------------------------------------------------------

Seeing that 'proxyAware' is more of a hint than a forced requirement on the 
bean classes, your suggestion to put it on <jaxrs:server> should be sufficient. 
 I do like the idea of the proxyAware default being true, as I think (with 
Hibernate/Spring/CGLIB) the scenario where the bean class is a proxy to another 
object will be more often the case than the resource class itself being a 
proxy.  Right off the bat, I can't think of a scenario where I'd want the 
resource class to be a proxy - but, there probably is some case I'm just not 
thinking of.

Any concern about how this differs from the jaxws stuff?  I have some concerns 
about how the jaxws piece appears to be implemented for this scenario (mainly 
in that it appears I would have to create a different <jaxws:server> for each 
serviceClass/serviceBean), but that's a different forum.  But, obviously, 
similar implementations would be ideal.

      was (Author: yarddog):
    Seeing that 'proxyAware' is more of a hint than a forced requirement on the 
bean classes, your suggestion to put it on <jaxrs:server> should be sufficient. 
 I do like the idea of the proxyAware default being true, as I think (with 
Hibernate/Spring/CGLIB) the scenario where the bean class is a proxy to another 
object will be more often the case than the resource class itself being a 
proxy.  Right off the bat, I can't think of a scenario where I'd want the 
resource class to be a proxy - but, there probably is some case I'm just not 
thinking of.

Any concern about how this differs from the jaxws stuff?  I have some concerns 
about how the jaxws piece appears to be implemented for this scenario (mainly 
in that it appears I would have to create a different <jaxws:server> for each 
serviceClass/serviceBean, but that's a different forum.  But, obviously, 
similar implementations would be ideal.
  
> 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.

Reply via email to