tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Farrow" <marc.far...@gmail.com>
Subject Re: Singleton and ServletContext
Date Fri, 08 Sep 2006 12:11:30 GMT
Would you not accomplish the same thing by placing it in shared/lib instead
of common/lib?  My understanding is that common/lib is also used by Tomcat
engine itself and also all webapps while the shared/lib is just shared among
all webapps?  Am I mistaken?

On 9/8/06, DJohnson@desknetinc.com <DJohnson@desknetinc.com> wrote:
>
> 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
>
>
>
>


-- 
Marc Farrow

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