Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 91311 invoked from network); 30 Apr 2003 12:53:10 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 30 Apr 2003 12:53:10 -0000 Received: (qmail 25086 invoked by uid 97); 30 Apr 2003 12:55:07 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 25079 invoked from network); 30 Apr 2003 12:55:07 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 30 Apr 2003 12:55:07 -0000 Received: (qmail 90977 invoked by uid 500); 30 Apr 2003 12:53:05 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 90966 invoked from network); 30 Apr 2003 12:53:05 -0000 Received: from pcow053o.blueyonder.co.uk (HELO blueyonder.co.uk) (195.188.53.96) by daedalus.apache.org with SMTP; 30 Apr 2003 12:53:05 -0000 Received: from localhost ([80.194.24.21]) by blueyonder.co.uk with Microsoft SMTPSVC(5.5.1877.757.75); Wed, 30 Apr 2003 13:55:50 +0100 Date: Wed, 30 Apr 2003 13:54:01 +0100 Subject: Re: [PATCH][collections] purging reference map entries when key is garbage collected Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: <042201c30f1b$4a972960$a901a8c0@juozas> Message-Id: X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wednesday, April 30, 2003, at 02:20 PM, Juozas Baliuka wrote: >> >> i'm looking into per context classloader BeanUtilsBean instances. the >> idea >> is that each web app can have it's own isolated instances (rather than a >> singleton) return on the basis on the thread's contest classloader. >> > > Possible I do not understan a use case, but > each web will have it's own isolated instances, if beanutils.jar is > cloned > per each WEB-INF/lib . > Do you want to have "global" jar loaded by single class loader, but > singletons per classLoader ? (i'll explain as well as i can: craig's the expert) beanutils used to use static utility classes. we've been moving the functionality into beans (this gives greater flexibility for users). as a preliminary step, the static utility classes used a proper singleton. this means that if beanutils are loaded by the same classloader in different web apps, it is possible that changes made to the beanutils settings in one web app may effect another. threads servicing different web applications should have different ContextClassLoaders so (as i understand it) by returning an instance based on the ContextClassLoaders of the thread making the call we should make sure that different web apps get different instances. (of course, some badly behaved servlet containers might confound this scheme by using different classloader instances without providing a good equals method.) > You can use ThreadLocal, it is internaly implemented as weak map without > dependancy on collections. AFAIK ThreadLocal can only be used to store variables associated with a particular thread. if so, then this isn't really what we're looking for. (i'd be glad to be corrected if i've missed something.) - robert --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org