Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 74227 invoked from network); 5 Oct 2004 20:27:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Oct 2004 20:27:02 -0000 Received: (qmail 75438 invoked by uid 500); 5 Oct 2004 20:26:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 75393 invoked by uid 500); 5 Oct 2004 20:26:46 -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 75355 invoked by uid 99); 5 Oct 2004 20:26:46 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [150.148.0.65] (HELO wall3-pub.fda.gov) (150.148.0.65) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 05 Oct 2004 13:26:43 -0700 Received: from no.name.available by wall3-pub.fda.gov via smtpd (for hermes.apache.org [209.237.227.199]) with SMTP; Tue, 5 Oct 2004 16:26:42 -0400 Received: from 150.148.36.216 by drsm500.cdrh.fda.gov with ESMTP (CDRH SMTP Relay); Tue, 05 Oct 2004 16:25:28 -0400 X-Server-Uuid: 4239CB95-2B57-4D38-A807-272199D62346 Received: from [10.2.17.121] (DR2MG5102159 [10.2.17.121]) by drsm555.cdrh.fda.gov with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id T91CB72G; Tue, 5 Oct 2004 16:26:23 -0400 Message-ID: <4163039D.8010801@schof.com> Date: Tue, 05 Oct 2004 16:27:09 -0400 X-Sybari-Trust: e5bb410a fec532a2 ace86b03 00000136 From: "Sean Schofield" User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jakarta Commons Developers List" Subject: Re: [chain] New interface: CatalogFactory References: <415C5D3E.7030809@schof.com> <4162B1FE.6050000@schof.com> In-Reply-To: X-WSS-ID: 6D7DDCB20OO329280-01-01 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Craig, >I should have checked on the line endings before committing ... was it >built on a Windows system with CR-LF? I checked it in on Unix. > > > I'm developing on a Windows machine. I think my IDE is adding Windows line feed by default but preserves the end of line used by existing files (which would explain why I don't have problems with patches.) >I'll apply the patch tonight, when I can reach the repository without >my friendly corporate firewall in the way. > > > Thanks. I have the same problem here with CVS and subversion. I can't even checkout or do updates which sucks. >* Leverage the fact that each web application has a unique class loader > that can then be used as a map key to disambiguate the default catalog. > The container guarantees to set up something called the "thread context > class loader" before calling any code inside the webapp, so your getInstance() > method could retrieve it like this: > > ClassLoader cl = Thread.currentThread().getContextClassLoader(); > > and use it as the key to a Map that contains the actual catalogs for that > webapp. The biggest problem with this approach is cleaning up when > the application is undeployed or reloaded ... you'll want something like a > ServletContextListener whose contextDestroyed() method can call a > cleanup to release all the catalogs for that webapp. > > NOTE: Commons Logging uses techniques like this. > > I think I will go with this approach. What is the need for ServletContextListener? Is this so that the resources associated with the Catalog for a web application can be "released" after the application is stopped? I was wondering if you think there is significant harm associated with not doing this? Also, I take it that this is not an issue once you restart the server. Finally, while I like the idea of the ServletContextListener for clean up, it seems like there is no way other than documentation to make sure the cleanup takes place (since the listener needs to be deployed via the web.xml file.) Should I provide an implementation of the ServletContextListener as well for users to use for cleanup? sean --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org