users@jersey.java.net

dynamically call _at_preDestroy

From: Guilhem <guilhem.legal_at_geomatys.fr>
Date: Fri, 16 Jan 2009 11:47:02 +0100

hi,

I have some jersey service using the @preDestroy anotations to close the
database connection and other stuff.
I have also a configuration service allowing to dynamically restart all
my web services (using ContainerNotifierImpl cn => cn.reload() )

When i undeploy my application in tomcat the destroy method is
succesfully called , the problem is that if i use the dynamic restart
the method destroy is not called.

How can i call the @preDestroy method when doing
ContainerNotifierImpl.reload() ?

Guilhem Legal