Hi

On Tue, Aug 10, 2010 at 5:09 PM, rickcole3 <[email protected]> wrote:

>
> We are adding REST support to our application. Our container is homegrown
> and
> based on Spring running an embedded Jetty instance. We need the ability to
> dynamically deploy and undeploy JAX-RS REST web services. We have already
> done this for SOAP services using the Endpoint.publish() and
> Endpoint.stop()
> API. However, I need to do the same for a REST API and I have not been able
> to find any way to do this. I would prefer to use only the JAX-RS API, but
> I
> am not adverse to using CXF-specific code. Has anyone had any success doing
> this? Thanks!
>

JAX-RS API offers

RuntimeDelegate.createEndpoint(Application, Class<T> endpointClass)

and the idea is that one does, for example,

RuntimeDelegate.createEndpoint(new MyApplication(), SomeJetty.class)

etc, for different types of containers.

This is not implemented in CXF and IMHO it would not make the code any more
portable than with using some stack-specific API. I recall proposing
introducing an Endpoint interface to be used instead of container-specific
classes, but it was not approved.

So you can use CXF JAXRSServerFactoryBean to start and stop endpoints.
With DOSGI RI that can be done at the OSGI level (just using shell
commands).

cheers, Sergey


> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Dynamically-Deploying-JAX-RS-RESTful-web-services-tp2453549p2453549.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to