On Tue, Dec 28, 2010 at 7:51 AM, Willem Jiang <[email protected]> wrote:
> On 12/28/10 12:21 PM, Dante Sun wrote:
>>
>> I am using the example cxf-jaxrs shipped with
>> apache-servicemix-4.3.0-fuse-03-00.tar.gz to investigate how to deploy
>> multiple bundles which provides different RESTful services. What I did is
>> copied the cxf-jaxrs example into cxf-jaxrs-example-1, and modified the
>> pom.xml and beans.xml. The modifications are :
>>
>> 1. pom.xml
>> version: 4.3.0-2-fuse-03-00
>> name: Apache ServiceMix Example 2:: CXF JAX-RS OSGI
>> 2. beans.xml
>> <jaxrs:server id="customerService2" address="/crm2">
>>
>> Then I made two packages. The one is the original example package
>> cxf-jaxrs-4.3.0-fuse-03-00.jar and the other is the modified one
>> cxf-jaxrs-4.3.0-2-fuse-03-00.jar and I copied them into "deploy"
>> directory.
>>
>> After servicemix started, I see both bundles are active and started
>> succesfully.
>>
>> But, I am only able to access the RESTful services in one bundle. When I
>> type "http://localhost:8080/cxf/crm2/customerservice/customers/123";, I got
>> "No service was found." error. And when I stop the other example
>> bundle(the
>> original one), I can access "
>> http://localhost:8080/cxf/crm2/customerservice/customers/123"; with no
>> problems.
>>
>> What I did wrong?? It is supposed to provides the RESTful services in both
>> context path "/crm" and "/crm2".
>>
> Please change your second context patch to "/otherCRM" which is not start
> with first service.
>
> For the RESTful service, CXF will pass the request which url start with
> "/crm" to the first service.
>

This does seem like a scary bug to me.

Its common to use xxx2, xxx3 for a simple versioning scheme to support
multiple versions of the "same" service.

Why doesn't it match equals on the context path name?




> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to