users@glassfish.java.net

ContextListener

From: <glassfish_at_javadesktop.org>
Date: Fri, 05 Sep 2008 02:12:38 PDT

Hello,

I have a contextlistener doing some initialization and processing in my application.

It is like:

public class ContextListener implements ServletContextListener {
    public void contextInitialized(ServletContextEvent event) { ..
    public void contextDestroyed(ServletContextEvent event) { ..
}

Here is an interesting thing. I tried making another virtual domain to host another application, and my context listener would initialize twice when there is another app hosted in another virtual domain.

why?

Best.
[Message sent by forum member 'segfault2007' (segfault2007)]

http://forums.java.net/jive/thread.jspa?messageID=297401