tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: shutdown hook for JNDI custom resource factories???
Date Tue, 27 Jan 2004 14:13:37 GMT

AFAIK there's no explicit lifecycle support around these resource
factories.  I would suggest adding a finalizer to the PMF class, but
that's a 3rd party class outside your control.  I think grabbing it from
JNDI in the shutdown method is what's left.  I'm not happy with it
because it's too heavyweight an operation for shutdown, but...

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Jacob Kjome []
>Sent: Tuesday, January 27, 2004 12:48 AM
>To: 'Tomcat Users List'
>Subject: shutdown hook for JNDI custom resource factories???
>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
>Factory object (PMF).  The PMF is supposed to be closed and I found
>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
>upon application reload I would get a java.lang.ThreadDeath.
>Am I going to have to grab the object from JNDI in the shutdown()
>and then do myobj.pmf().close()?  Is there a better way to do this
>having to use a servlet context listener?  Maybe configurable through
>JNDI configuration?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message