tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject shutdown hook for JNDI custom resource factories???
Date Tue, 27 Jan 2004 05:48:15 GMT

I have implemented a custom JNDI resource factory according to the 
documentation here...

The Object that gets returned from this factory uses the 
JDOHelper.getPersistentManagerFactory() to return a JDO Persistence Manager 
Factory object (PMF).  The PMF is supposed to be closed and I found that 
when I was creating storing the PMF in a servlet context listener and 
creating it on startup, if I didn't shut it down upon application shutdown, 
upon application reload I would get a java.lang.ThreadDeath.

Am I going to have to grab the object from JNDI in the shutdown() method 
and then do myobj.pmf().close()?  Is there a better way to do this without 
having to use a servlet context listener?  Maybe configurable through the 
JNDI configuration?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message