tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DJohn...@desknetinc.com
Subject Re: Singleton and ServletContext
Date Fri, 08 Sep 2006 10:54:48 GMT
I'll assume you mean shared between separate web applications, as, within 
a single web app. is nothing special.  The key is the classloader.  In 
order for the singleton to be a true singleton, (not one fo reach webapp) 
it must be loaded rom a common classloader.  So the jar it is loaded from 
should probably be in common/lib.  See 
http://tomcat.apache.org/tomcat-4.1-doc/class-loader-howto.html for more 
on Tomcat classloader hierarchy.



Please respond to "Tomcat Users List" <users@tomcat.apache.org>

To:     "Tomcat Users List" <users@tomcat.apache.org>
cc:      
Subject:        Singleton and ServletContext



Dear All,

Is there anyone can point me to any sample how to use singleton object
across web application in Tomcat ?

--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message