tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: multiple execution of a 'load-on-startup'
Date Mon, 02 Dec 2002 13:26:56 GMT
Hi,
A couple of things:

- Please post your log4j config.  If you look in that list, you'll see a
lot of "why am I getting [n] copies of my logging statements" questions.
This is because all log4j loggers are additive by default, so if you
define n appenders at a level matching your logger, you'll get n copies
of logging statements out.

- There have been questions in the past on this list regarding servlets
and filters being initialized twice, and the bugs were addressed by
developers and marked as resolved.  You may wish to search the list
archives at
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2

- You're using 4.1.12 (not LE, right?) with what version of java?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Maxime Colas des Francs [mailto:maxime@sts.ca]
>Sent: Friday, November 29, 2002 10:01 AM
>To: Tomcat Users List
>Subject: multiple execution of a 'load-on-startup'
>
>Hello ,
>
>A strange thing about 'load-on-startup' servlet.
>
>I use tomcat 4.1.12 with multi-host, and log4j 1.2.7
>
>in my web.xml i wrote these lines :
>
><servlet>
>      <servlet-name>Setup</servlet-name>
>      <servlet-class>init.SetupServlet</servlet-class>
>     <load-on-startup/>
></servlet>
>
>and i put an information log at the end of the servlet init() method
>
>at tomcat startup, we can read in the log :
>
>INFO  2002-11-29 09:28:50,084 [Thread-7] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:28:55,352 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:28:56,943 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:29:17,647 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:29:20,501 [main] init.SetupServlet : end of
>initialisation setup.
>
>five execution for this servlet ??
>(what an initialisation !)
>
>if i remove the two other host definitions in my server.xml, and
restart
>tomcat,
>this log appear "only" 2 times , execute by a thread main ...
>
>INFO  2002-11-29 09:42:53,267 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:42:56,144 [main] init.SetupServlet : end of
>initialisation setup.
>
>Smby can explain this ??
>Why 5 or 2 executions of a load-on-startup servlet ?
>Why when i remove other host in tomcat configuration file,
>3 lines dissepear in the log of an application on the first ??
>
>thks !
>_
>M
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message