From dev-return-87999-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Wed Jun 21 07:55:02 2006 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 99497 invoked from network); 21 Jun 2006 07:55:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 07:55:01 -0000 Received: (qmail 3843 invoked by uid 500); 21 Jun 2006 07:54:58 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 3781 invoked by uid 500); 21 Jun 2006 07:54:58 -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 3770 invoked by uid 99); 21 Jun 2006 07:54:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 00:54:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 00:54:58 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E7877141E6 for ; Wed, 21 Jun 2006 07:53:34 +0000 (GMT) Message-ID: <26631147.1150876414028.JavaMail.jira@brutus> Date: Wed, 21 Jun 2006 07:53:34 +0000 (GMT+00:00) From: "Antonio Gallardo (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-1862) HSQLDB improper shutdown In-Reply-To: <13569512.1150144949768.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/COCOON-1862?page=comments#action_12417049 ] Antonio Gallardo commented on COCOON-1862: ------------------------------------------ I am sorry for my initial comment. It does not make sense. I think I did not read it correctly. Anyhow, here is another solution without using the DatabaseManager, can you kindly try it: /** Stop the server */ public void stop() { getLogger().debug("Shutting down HSQLDB"); hsqlServer.setNoSystemExit(true); hsqlServer.stop(); hsqlServer.shutdown(); getLogger().debug("Shutting down HSQLDB: Done"); } BTW, I wonder if hsqlServer.stop() is needed at all in this case. If this works, please try also to remove the line "hsqlServer.stop();" > HSQLDB improper shutdown > ------------------------ > > Key: COCOON-1862 > URL: http://issues.apache.org/jira/browse/COCOON-1862 > Project: Cocoon > Type: Bug > Components: Blocks: HSQL Database > Versions: 2.1.8, 2.1.9 > Reporter: Igor Naumov > Priority: Minor > > On some J2EE servers (WebSphere, SAP NetWeaver), HSQLDB server that is started with Cocoon is not shut down properly when an application is stopped. > For some reason even though the server stops, the DB's lock and log files remain locked and that prevents the database startup when the application is started again. > If the ServerImpl for HSQLDB block explicitely closes all the databases, the locks are released and the problem does not occur. > To close the databases, the following code was added to cocoon-2.1.9\src\blocks\hsqldb\java\org\apache\cocoon\components\hsqldb\ServerImpl.java > @@ -35,6 +35,9 @@ import org.apache.avalon.framework.threa > import org.apache.cocoon.Constants; > import org.apache.cocoon.components.thread.RunnableManager; > > +import org.hsqldb.Database; /** Only needed for a close mode constant */ > +import org.hsqldb.DatabaseManager; > + > /** > * This class runs an instance of the HSQLDB HSQL protocol network database server. > * > @@ -145,6 +148,8 @@ if (null != runnableManager) > /** Stop the server */ > public void stop() { > getLogger().debug("Shutting down HSQLDB"); > + DatabaseManager.closeDatabases(Database.CLOSEMODE_COMPACT); > hsqlServer.stop(); > getLogger().debug("Shutting down HSQLDB: Done"); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira