dev@jersey.java.net

Re: [Jersey] Add Bean Service to Grizzly dynamically

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 29 Dec 2009 10:35:40 +0100

Hi Mic,

The closest code snippet i have is a unit test:

http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-tests/src/test/java/com/sun/jersey/impl/container/grizzly/web/ReloadResourceTest.java?r=HEAD

http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-tests/src/test/java/com/sun/jersey/impl/container/grizzly/web/ReloadTest.java?r=HEAD

Basically you register an instance of ContainerNotifier with a
ResourceConfig instance using the ResourceConfig.
PROPERTY_CONTAINER_NOTIFIER property [2]

The units tests register an instance of ContainerNotifier that by
overriding ServletContainer but if you explicitly supply a
ResourceConfig implementation you do not need to do that.

Paul.

[1] https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/container/ContainerNotifier.html
[2] https://jersey.dev.java.net/nonav/apidocs/latest/jersey/index.html

On Dec 22, 2009, at 12:03 PM, Michele Mostarda wrote:

> Dear All,
>
> I'm trying to figure out how to add a new bean Resource to the
> Grizzly
>
> container programmatically.
>
> Any suggestion, code snippet?
>
> Thanks a lot.
>
> Mic
>
> --
> Michele Mostarda
> Senior Software Engineer
> mail: michele.mostarda_at_gmail.com
> skype: michele.mostarda
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>