[ http://issues.apache.org/jira/browse/COCOON-1862?page=all ]

Antonio Gallardo updated COCOON-1862:
-------------------------------------


Are in the AS another hsqldb versions?

> 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

Reply via email to