Skip to main content

[webtier] Re: ContextListener

1 reply [Last post]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

On 09/ 5/08 02:12 AM, wrote:
> 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.

If you deploy your webapp to a number of virtual servers, the web
container will create as many
representations of your webapp: one per virtual server.

Therefore, your context listener will also be invoked as many times.


> why?
> Best.
> [Message sent by forum member 'segfault2007' (segfault2007)]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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