users@jersey.java.net

Re: [Jersey] restart a resource

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 24 Sep 2008 16:57:55 +0200

On Sep 24, 2008, at 4:42 PM, Guilhem wrote:

> hi,
>
> I would know if its possible to dynamically restart a resource
> without having to undeploy/deploy or restart the container?
>

It is currently only possible to reload all resources. What happens is
a new web application is created, configured and initiated.

See the JavaDoc of the class:

   com.sun.jersey.spi.container.ContainerNotifier

to register a notifier that may reload the container.

I have used this in conjunction with JavaRebel. When JavaRebel detects
changes to class files i have a hook in that to dynamically reload
things using a ContainerNotifier without having to undeploy/deploy the
web application.

Does that work for you?

Paul.