Hi, I don't know how this works with OSGI, and if or how it is possible to react to OSGI events in Restlet. If Restlet allows this, than - iI thinl - you could do it by creating a new javax.ws.rs.Application and adding it to the router.
best regards Stephan -----Ursprüngliche Nachricht----- Von: Bhallamudi Venkata Siva Kamesh Gesendet: 05.02.2010 15:17:29 An: [email protected],Stephan Koops Betreff: RE: Re: Adding/removing JAX-RS resources at runtime >As, I have got one requirement and the requirement is we are going to deploy >Restlet along with some implementation class as an OSGi bundle and this >implementation class will contain implementation of an Application class, >which will attach all the resources listed in one of the configuration file. >If any resource is created at runtime then it should also be added to Router >and the same should be updated to configuratiopn file. > >If you have any other way to achieve this please suggest me. > > > >> Hi Fabio, >> >> sorry for the delay, I was on holiday. >> You could >> >> 1. create and add another subclass of javax.ws.rs.Application, with >> your additional classes, >> 2. build a subclass or org.restlet.ext.jaxrs.JaxRsApplication, where >> you could add the singletons or classes directly, or >> 3. use your proposal. >> >> I preferer the first or second way, because you don't need to double the >> initialization code. >> >> best regards >> Stephan >> >> [email protected] schrieb: >> > Hi everybody, >> > >> > a quick question to evaluate the feasibility of a project. Is it possible >> > to dynamically add or remove resources and providers from a JAX-RS >> > application? >> > >> > I looked at the API and it doesn't seem possible, though the class >> > JaxRsRestlet gives some hope. Maybe by using directly this class (with a >> > bit of code duplication for the initialization) instead of initializing >> > the application in the "canonical" way using JaxRsApplication + >> > javax.ws.rs.core.Application would work. >> > >> > Any hint/comment? >> > >> > Thanks, >> > Fabio >> > > >------------------------------------------------------ >http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2445147 ___________________________________________________________ GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT! Jetzt freischalten unter http://movieflat.web.de ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2445163

