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

Sergey Beryozkin commented on CXF-2718:
---------------------------------------

I recall having some issues with a pax web extender 'losing' the context after 
a cxf bundle was refreshed or restarted. It refreshes itself whenever a cxf 
jaxrs demo restarts, possibly to do with the fact it has some optional 
dependencies(jettison related, etc). I actually submitted a patch, just can't 
find a link at the moment, but I know it was applied by Alin Dreghiciu. It was 
a transient thread-safety related issue.

> JAX-RS OSGi doesn't support relative path from annotation
> ---------------------------------------------------------
>
>                 Key: CXF-2718
>                 URL: https://issues.apache.org/jira/browse/CXF-2718
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.6
>         Environment: Ubuntu 9 
> servicemix-4.2.0-fuse-01-00
>            Reporter: george.goodrich
>         Attachments: configuration-status-20100318-1258-0700.txt
>
>
> I tried to use CXF JAX-RS in ServiceMix 4.2/Fuse ESB.
> Somehow I had to prefix /cfx/server-address in the @Path of the resource 
> class.
> For example:
> I used the following Spring bean xml 
>   <import resource="classpath:META-INF/cxf/cxf.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" 
> />
>     <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
>     <jaxrs:server id="helloworldService" address="/hello">
>         <jaxrs:serviceBeans>
>             <ref bean="helloworldSvc"/>
>         </jaxrs:serviceBeans>
>     </jaxrs:server>
>     <bean id="helloworldSvc" class=" com.test.HelloWorld"/>
> Then I had to use /cxf/hello EXACTLY in resource class like below:
> @Path("/cxf/hello")
> public class EquipmentRegistryService {
>       
>        @GET
>        @Produces("text/html")
>        public String getXml() {
>               return "<html><body><h1>Hello World!</body></h1></html>";
>        }
> }
> If I changed the path to anything else(such as @Path("/greeting")), I got 
> http 404. 
> In the non-OSGi environment, I am able to use relative path in the path 
> annotation.
> For example: if the @Path("/greeting") is used, I can use 
> /cxf/rest/hello/greeting to reach the resource in non-OSGi environment.

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