Hi On Fri, Jan 14, 2011 at 9:21 AM, Rice Yeh <[email protected]> wrote:
> Hi, > Is there such a function available in CXF JAX-RS? I have an application > based on CXF JAX-RS. The application itself consits of many plguins and > these plugins can come and leave dynamically. Hence, OSGi is the platform > on > which the application runs. In the application, each plugin (bundle) > provides some resource classes and hence managing these dyanamic plugins is > important for this application. Since JAXRS Server > (org.apache.cxf.endpoint.Server) is immutable, the application has to > destory the server and recreate a new server when a plugin is changed > (added > or removed). Now, I would like to know that such a function already exist > in > CXF JAX-RS? If not, is it do-able for such a function for CXF JAXRS? > > Are you asking if it is possible to have a single JAXRS Server with dynamic root resources without having to create new Servers ? Please clarify a bit more. I'm not sure what sort of generic support can we provide, need more information. For example, in DOSGi, users can register new resources but each new registration creates a new Server. But what if we want say a all the requests being targeted to http://localhost:8081/service and then delegate them to new dynamic handlers which come and go ? Do these new resources you are referring to are related to each other somehow. Do the share the same interface ? Can you register a single JAX-RS server with a single root resource bean which will have the new dynamic resources being injected in (from the Activator) ? Or may be this root resource will listen via ServiceTracker for the new resources ? This root resource will only delegate to newly registered resources. Will it work for you ? Cheers, Sergey > Rice >
