Re: can java tell which environment it isrunning in?
Nic Ferrier <[email protected]> Thu, 20 Jan 2005 02:01:32 +0000
| Newsgroups | gmane.comp.java.advanced-servlets |
|---|---|
| Message-ID | <[email protected]> |
[email protected] writes: >> Maybe you should keep a reference to it in a servlet (or even better, >> in a context lifecycle listener). Then it wouldn't get GC'ed. > > context lifecycle listener? that's an interesting idea. > Have you got a pointer? Check the API. You implement javax.servlet.ServletContextListener providing: - public void contextInitialized(ServletContextEvent evt) - public void contextDestroyed(ServletContextEvent evt) and then add it to the web.xml. There is some special syntax for declaring a CLL. But you should really RTFM (the API). -- Nic Ferrier http://www.tapsellferrier.co.uk Before posting a question, try to find your answer here: <http://www.egroups.com/links/advanced-servlets> Announcements should go to: [email protected] To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/advanced-servlets/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/