tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Elliott <>
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


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message