users@jersey.java.net

Re: [Jersey] adding root resource to grizzly

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Mon, 01 Mar 2010 01:43:51 +0100

Hello,

as far as I know this is not possible right now so you'll have to
restart grizzly (and put generated resource classes on classpath and add
its package if differs from provided one).

Jakub is considering similar scenario in OSGI environment but its not
ready yet..

Pavel

raist1_at_op.pl wrote:
> Hi,
>
> I have a problem. I wish to add resource dynamically to alredy running
> grizzly server. my code is:
>
>
> public static void main(String[] args) throws IOException {
>
>
> final Map<String, String> initParams = new HashMap<String, String>();
>
> initParams.put("com.sun.jersey.config.property.packages",
> "workflow.resources");
>
> System.out.println("Starting grizzly...");
> threadSelector = GrizzlyWebContainerFactory.create(
> baseUri, initParams);
>
> System.in.read();
> threadSelector.stopEndpoint();
> System.exit(0);
> }
>
> I need to add new root resource (generated in different application)
> without restarting server is it possible?
>
> Sorry for my english.
>
> Andy