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

Reply via email to