cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Naumov (JIRA)" <>
Subject [jira] Commented: (COCOON-1862) HSQLDB improper shutdown
Date Wed, 21 Jun 2006 17:46:32 GMT
    [ ] 

Igor Naumov commented on COCOON-1862:

Unfortunately hsqlServer.shutdown();  does not fix the problem. I think I tried it before
(plus combinations of it and close() and stop() ), and I just tested it again - the lock file
is not released. I believe it has something to do with the shutdown() method being asynchronous,
and my particular J2EE server (SAP NetWeaver) is doing something funny when stopping an application.
I think Tomcat does not have this problem.

It might be considered an HSQL problem (they should shutdown properly), but since there is
a workaround for the Cocoon codebase, I would prefer to have it fixed there until may be it
will be fixed in HSQL. May be we can have a parameter for hsqldb block to close Databases
optionally (may be even set it to off by default).

> HSQLDB improper shutdown
> ------------------------
>          Key: COCOON-1862
>          URL:
>      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\
> @@ -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:
For more information on JIRA, see:

View raw message