I guess that might be possible. I am not using wars or jars for my webapp
itself, the context is in an exploded form in the webapps directory thats
it. How can I stop multiple instances of the web app starting? I need the
context in the server.xml to create my JNDI DataSource. Thanks

regards,
Dave


----- Original Message -----
From: "Alexander Wallace" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 14, 2003 11:12 AM
Subject: Re: Listener problem in tomcat 4.1.18


> 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]>
>



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

Reply via email to