Skip to main content

[webtier] Re: ContextListener

1 reply [Last post]
Anonymous

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, glassfish@javadesktop.org 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.

Jan

> why?
>
> Best.
> [Message sent by forum member 'segfault2007' (segfault2007)]
>
> http://forums.java.net/jive/thread.jspa?messageID=297401
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net