Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 23263 invoked from network); 29 Mar 2007 12:06:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 12:06:25 -0000 Received: (qmail 91181 invoked by uid 500); 29 Mar 2007 12:06:30 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 91104 invoked by uid 500); 29 Mar 2007 12:06:30 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 91093 invoked by uid 99); 29 Mar 2007 12:06:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 05:06:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [68.230.240.7] (HELO eastrmmtao101.cox.net) (68.230.240.7) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Mar 2007 05:06:21 -0700 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao101.cox.net (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20070329120418.MTNB23423.eastrmmtao101.cox.net@eastrmimpo02.cox.net> for ; Thu, 29 Mar 2007 08:04:18 -0400 Received: from [192.168.0.100] ([24.255.120.190]) by eastrmimpo02.cox.net with bizsmtp id gc4J1W00K46aSr40000000; Thu, 29 Mar 2007 08:04:18 -0400 Message-ID: <460BAB3A.1010601@reverycodes.com> Date: Thu, 29 Mar 2007 08:04:10 -0400 From: Vadim Gritsenko User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: svn commit: r522901 - in /cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main: java/org/apache/cocoon/caching/impl/CacheImpl.java resources/META-INF/cocoon/spring/cocoon-pipeline-impl-cache.xml References: <20070327132939.B88971A9838@eris.apache.org> <460AB0A1.3010503@reverycodes.com> <460AFC46.4020309@reverycodes.com> <460B5D06.5030603@apache.org> In-Reply-To: <460B5D06.5030603@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Carsten Ziegeler wrote: > Vadim Gritsenko wrote: >> Torsten Curdt wrote: >>> On 28.03.2007, at 20:14, Vadim Gritsenko wrote: >>> >>>> reinhard@apache.org wrote: >>>>> -public class CacheImpl >>>>> -extends AbstractLogEnabled >>>>> -implements Cache, ThreadSafe, Serviceable, Disposable, >>>>> Parameterizable { >>>>> +public class CacheImpl implements Cache { >>>>> + private Log logger = LogFactory.getLog(getClass()); >>>> Is there a reason why logger can not be static? >>> http://wiki.apache.org/jakarta-commons/Logging/StaticLog >> So since Cocoon is not and should not be deployed in container's shared class >> loader, usage of 'static' is preferred. >> > Hmm, why do you think "is not and should not"? Why not (I'm talking > about 2.2+ here)? Last I checked, and since 2.2, it is impossible (or just really hard?) to start up cocoon without servlet context and related objects, which means it gotta be deployed and started as part of the webapp. If that is the case, IMHO there is no good reason to have it as part of the shared classloader. > In addition, with 2.2+ we provide separate artifacts for "common" > components which might be used outside of Cocoon and might then be used > via a shared class loader. So I think we should not use "static" here. For reusable components - yes, I agree. > As most of our components are singletons anyway, there isn't any memory > problem here. There are some generated poolable wrappers, IIRC - those aren't singletons and do represent good chunk of components (pipelines and all direct sitemap components). Vadim