Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 49107 invoked from network); 19 Jun 2002 12:07:04 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Jun 2002 12:07:04 -0000 Received: (qmail 18185 invoked by uid 97); 19 Jun 2002 12:06:49 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 18169 invoked by uid 97); 19 Jun 2002 12:06:49 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 18157 invoked by uid 98); 19 Jun 2002 12:06:48 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Subject: AW: Are static vars VM dependend or ClassLoader dependend [offtopic] MIME-Version: 1.0 Date: Wed, 19 Jun 2002 14:06:38 +0200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 X-MS-Has-Attach: content-class: urn:content-classes:message X-MS-TNEF-Correlator: Thread-Topic: Are static vars VM dependend or ClassLoader dependend [offtopic] Thread-Index: AcIXhSmLkFex5eG+RuSYx4X+CFSqOQAAEHZQ From: "Ralph Einfeldt" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Haven't tried that, as we just use one context, but as I=20 understand it, it's the following way: It depends on where you place the class file or the jar file that holds the class that implements the singleton. If you place it in /webapps//WEB-INF/lib or /webapps//WEB-INF/classes then each=20 webapp should have his own singleton.=20 If you place the class outside the webapp (/lib or /classes or /common/lib or /common/classes) all webapps in the same VM should=20 share the singleton. Also have a look at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html (I think this document says at some places where=20 would be more correct if they point to different=20 directories) > -----Urspr=FCngliche Nachricht----- > Von: Stefan Langer [mailto:mailtolanger@web.de] > Gesendet: Mittwoch, 19. Juni 2002 13:14 > An: Tomcat-User-Maillist > Betreff: Are static vars VM dependend or ClassLoader dependend > [offtopic] >=20 > Stated differently is the static variable the > same for each webapplication in the Tomcat instance or does=20 > each Context have its own copy of the static since each=20 > context is loaded by a different classloader. As far as my=20 > testing has gotten I think that the static is only available=20 > once in the Tomcat installation. > > Can anybody confirm this or for that deny it?? >=20 -- To unsubscribe, e-mail: For additional commands, e-mail: