Look at listeners. I think there was a similar thread a while back and the
solution was to have a listener kick off the servlet after all the other
processes were done. You could also have your servlet start and then wait
for a certain amount of time, to allow time for all other processes to
start.

Doug


----- Original Message ----- 
From: "Adrian Klingel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 4:03 PM
Subject: Tomcat stops loading when I run my servlet with <load-on-startup>


> I have a servlet which calls a method on itself to poll a directory for
XML
> files.  When one is found, another method ("read()" is called which then
> creates a SAX parser and attempts to validate the file against an XML
> schema.  Upon calling the "parse()" method, Tomcat freezes.  It doesn't
> create or write to a log, and nothing else starts up.  Nothing is
accessible
> on port 8080, because Tomcat doesn't make it to the point where it mounts
> that port.
>
> When I remove the <load-on-startup> from this particular app's web.xml,
> Tomcat completes its startup process and things are accessible.  I can
then
> reintroduce the <load-on-startup> to the web.xml and Tomcat will
> automatically kick off the servlet.  This time nothing freezes, and the
> program runs as it is supposed to.
>
> My program is attempting to validate this XML file against a schema which
is
> accessible locally on port 8080.  But that port is prevented from becoming
> available, so the program will just wait forever.
>
> My question is, how can I prevent my servlet from starting up until after
> Tomcat has completed its startup procedure?  I've specified higher numbers
> in the <load-on-startup> element, but to no avail.
>
> Thanks for any help you can offer.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to