Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 33678 invoked from network); 31 Mar 2007 01:01:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2007 01:01:43 -0000 Received: (qmail 1170 invoked by uid 500); 31 Mar 2007 01:01:50 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 717 invoked by uid 500); 31 Mar 2007 01:01:49 -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 705 invoked by uid 99); 31 Mar 2007 01:01:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2007 18:01:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of joerg.heinicke@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Mar 2007 18:01:41 -0700 Received: (qmail invoked by alias); 31 Mar 2007 01:01:19 -0000 Received: from p549D1BA2.dip0.t-ipconnect.de (EHLO [192.168.178.20]) [84.157.27.162] by mail.gmx.net (mp054) with SMTP; 31 Mar 2007 03:01:19 +0200 X-Authenticated: #3483660 X-Provags-ID: V01U2FsdGVkX1/yyPB8imPyFPsknbp7qbI1ChLqoem5wAbTqoBqZx /3ngo9gu0NVKUQ Message-ID: <460DB2CB.4020208@gmx.de> Date: Sat, 31 Mar 2007 03:00:59 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1 MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: web3 block - lifecycle issues and class design References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org On 30.03.2007 20:36, Igor Naumov wrote: > I have been using the block web3 for some time and ran into a couple of > issues. Oh, somebody is using it :) > Most of them are related to the lifecycle of the class - it seems that > some things are preventing a clean instantiation/disposal of the block > classes. > > In particular, method Web3DataSourceSelectorImpl.dispose() destroys > (through =null ) the manager and lock properties. Nulling the lock is indeed wrong, especially since dispose() is called for every instance (though we should have only one due to ThreadSafe). But I can't see why nulling the manager should cause any problem. It should be reinjected via service() on next access to the component. > For some reason when an application (Cocoon) is restarted (without > restarting servlet/J2EE/JVM, e.g. through a URL ?cocoon-reload=true), > the class (Web3DataSourceSelectorImpl) is not completely unloaded, > so the private static properties are not re-initialized. I guess this only reloads the components but not their classes. Somebody else might confirm this. Thanks for your report. Fixed it in SVN. Regards J�rg