Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 45493 invoked from network); 30 Mar 2007 19:32:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Mar 2007 19:32:32 -0000 Received: (qmail 99414 invoked by uid 500); 30 Mar 2007 19:32:37 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 99359 invoked by uid 500); 30 Mar 2007 19:32:37 -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 Delivered-To: moderator for dev@cocoon.apache.org Received: (qmail 12940 invoked by uid 99); 30 Mar 2007 18:37:10 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of igornaumov@hotmail.com designates 65.54.246.214 as permitted sender) Message-ID: X-Originating-IP: [76.183.247.139] X-Originating-Email: [igornaumov@hotmail.com] X-Sender: igornaumov@hotmail.com From: "Igor Naumov" To: dev@cocoon.apache.org Subject: web3 block - lifecycle issues and class design Date: Fri, 30 Mar 2007 13:36:39 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 Mar 2007 18:36:41.0115 (UTC) FILETIME=[5BD0CEB0:01C772FA] X-Virus-Checked: Checked by ClamAV on apache.org I have been using the block web3 for some time and ran into a couple of issues. 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. 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. That causes a null pointer exception next time the class is used. So may be the code needs to be changed to init the static properties if they are null, or remove the lines that set them to null in the dispose() method. As a workaround, can anybody suggest a way to "unload" the class? (e.g. when restarting Cocoon, or even without it) _________________________________________________________________ Live Search Maps � find all the local information you need, right when you need it. http://maps.live.com/?icid=hmtag2&FORM=MGAC01