Could you be running multiple instances of your web app? Like it would happen 
if you have a context for it declared in server.xml and also have a jar or a 
directory in webapps. ?


On Monday 13 January 2003 18:05, David Hemingway wrote:
> Hi,
> This has been posted before, this time i have made it more thorough.
>
> My top of my context inside my server.xml looks like:
>
> <Context path="/lawonline" docBase="lawonline" debug="0"
>                  reloadable="false" crossContext="true">
>
> my web.xml looks like:
>
> <listener>
>         <listener-class>
>                 com.lawonline.StartServlet
>         </listener-class>
> </listener>
>
>
>
> The code in the listener:
>
>
>  public void contextInitialized(ServletContextEvent sce)
>  {
>   sce.getServletContext().setAttribute("startServlet", this);
>   System.out.println("Context Initialized");
>
>   synchronized(this)
>   {
>    if(!hasBeenInitialized)
>    {
>     scheduler = Scheduler.getScheduler();
>     System.out.println("The listener is: "+this);
>     hasBeenInitialized = true;
>    }
>   }
>
>   System.out.println("Got Scheduler Instance");
>  }
>
>
> When server start the listener starts up as expected. However upon the
> first request 2 more instances are created straight away. Does anyne know
> what could cause this and furthermore how to rectify the situation. I only
> want ONE instance as multiple instances causes major concurrency issues.
> Thanks in advance
>
> regards,
> Dave


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to