users@glassfish.java.net

Re: multiple virtual server and ServletContextListener

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Jan 2008 10:04:54 PST

Yes, ServletContextListener#contextInitialized is called once per virtual server on which the webapp has been deployed. This is because internally, the container creates one servlet context per virtual server on which your webapp has been deployed.

In order to deploy your webapp to a subset of available virtual servers, use the "--virtualservers virtual_servers" option of the "asadmin deploy" command.
[Message sent by forum member 'jluehe' (jluehe)]

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