users@jersey.java.net

Re: [Jersey] adding root resource to grizzly

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Mon, 01 Mar 2010 07:46:14 +0100

Hi Andy,

look at the ReloadResourceTest in the jersey-test module [1].
The resource two there is dynamically added after the post request on the reload resource.

HTH,

~Jakub

[1]https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/jersey-tests/src/test/java/com/sun/jersey/impl/container/grizzly/web/ReloadResourceTest.java?rev=3252&view=markup


On Fri, Feb 26, 2010 at 01:19:11AM +0100, 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

-- 
http://blogs.sun.com/japod