Hi > @Path-annotation supposed to work when used on a sub-resource class
do you mean the one the actual resource class ? No, when resource classes act as sub-resources then root Path annotations are not taken into account per the spec. May be we can add a configuration option to bypass this restriction... Cheers, Sergey -----Original Message----- From: christoe [mailto:[email protected]] Sent: 07 June 2009 12:31 To: [email protected] Subject: RE: Deploying multiple services on same base url Thanks a lot, this really helped! I had not noticed the fact that it was possible to return Objects. A small question though: is the @Path-annotation supposed to work when used on a sub-resource class? I cant seem to get it to work. It however works perfectly when annotating methods in that sub-resource class. Cheers, Christoffer Sergey Beryozkin-2 wrote: > > Hi Christoffer > > I'm not sure this is possible at the moment. One can register multiple > resources beans listening on different relative URIs with a single > JAXRSServerFactoryBean but not one by one. > > Perhaps there could be an alternative option. > One option may be to use subresources. For ex, the base address could be > "/", root bean can listen on "/ws" and it also can have a subresource > method > listening on "/". Inside this method you can return either a root bean > itself if a matched URI (@Context UriInfo has this info) is just "/ws" > or dynamically return another bean depending on whether it is > "/ws/group" or "/ws/user", etc... Subresource method may return an > Object... > May be there could be more options... > > Cheers, Sergey > > > -----Original Message----- > From: christoe [mailto:[email protected]] > Sent: 03 June 2009 11:33 > To: [email protected] > Subject: Deploying multiple services on same base url > > > Hi, > > I'm developing a testing framework for RESTful Web Services where I > generate > ws:es from XML-definitions and deploy them. The problem is that I want > them > deployed on the same base url (i.e. same host, same port and same base > path) > - but not at the same time. > > Example: First I start up a JAXRSServerFactoryBean/Server at > http://localhost:8080/ws and deploy a service bean at > http://localhost:8080/ws/user - and depending on some factors, later I > deploy other service beans at e.g. http://localhost:8080/ws/group (and > so > on). > > Is this at all possible? If so how? Can you add more beans to > JAXRSServerFactoryBean/Server when it has already been started? Without > having to shut everything down and start it all up again? Is there > another > way to do this? > > Thanks in advance, > Christoffer > -- > View this message in context: > http://www.nabble.com/Deploying-multiple-services-on-same-base-url-tp238 > 49126p23849126.html > Sent from the cxf-user mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/Deploying-multiple-services-on-same-base-url-tp238 49126p23910060.html Sent from the cxf-user mailing list archive at Nabble.com.
