vgritsenko 2002/07/23 20:38:46
Modified: src/java/org/apache/cocoon/components/hsqldb Tag:
cocoon_2_0_3_branch ServerImpl.java
Log:
update hsqldb; implement proper shutdown
Revision Changes Path
No revision
No revision
1.10.2.1 +7 -11
xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/ServerImpl.java
Index: ServerImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/ServerImpl.java,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- ServerImpl.java 22 Feb 2002 07:00:07 -0000 1.10
+++ ServerImpl.java 24 Jul 2002 03:38:45 -0000 1.10.2.1
@@ -112,6 +112,8 @@
arguments[3] = params.getParameter("silent","true");
arguments[4] = "-trace";
arguments[5] = params.getParameter("trace","false");
+ arguments[4] = "-no_system_exit";
+ arguments[5] = "true";
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Configure ServerImpl with port: " + arguments[1]
+ ", silent: " + arguments[3]
@@ -162,10 +164,7 @@
/** Stop the server */
public void stop() {
if (started) {
- // TODO: Execute shutdown. Now HSQLDB have a System.exit() call
-/*
try {
- System.out.println("Shutting down HSQLDB");
getLogger().debug("Shutting down HSQLDB");
Connection connection =
DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:" + this.port, "sa", "");
Statement statement = connection.createStatement();
@@ -173,14 +172,12 @@
try {
connection.close();
} catch (SQLException e) {
- System.out.println("Shutting down HSQLDB: Ignoring exception: "
+ e);
+ getLogger().debug("Shutting down HSQLDB: Ignoring exception: "
+ e);
}
} catch (Exception e){
- System.out.println("Shutting down HSQLDB: Exception.");
- e.printStackTrace();
+ getLogger().error("Error while shutting down HSQLDB", e);
}
- System.out.println("Shutting down HSQLDB: Done");
-*/
+ getLogger().debug("Shutting down HSQLDB: Done");
}
}
@@ -196,8 +193,7 @@
org.hsqldb.Server.main(arguments);
} catch(Exception e){
- System.out.println("run got exception: ");
- e.printStackTrace();
+ getLogger().error("Got exception", e);
} finally {
started = false;
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]