tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Elliott <ttoi...@mac.com>
Subject Re: Singleton pattern using Servlet init() and <load-on-startup> - Solved
Date Sun, 31 Mar 2002 08:46:38 GMT
For the record the problem of multiple instances of a singleton being
instantiated at application startup was related to a misconfiguration of
Virtual Hosts in my server.xml file.  The host appBase was incorrectly set
for all my virtual hosts allowing them access to the web.xml file of other
virtual hosts (applications).

What was hard to spot was the misconfiguration because in conjunction with
the Context:docBase the virtual hosts appeared to be functioning normally;
realms, authorization, ServeltContext.getRealPath(), etc were all working
and working on fairly heavily trafficked sites.  The multiple instances of a
singleton was the first indication that a misconfiguration existed.

Thanks to Wil Doane who helped me confirm results and code against his
configuration.

Steven


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message