You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2004/02/24 18:56:55 UTC
cvs commit: cocoon-2.1/src/blocks/hsqldb/java/org/apache/cocoon/components/hsqldb ServerImpl.java
andreas 2004/02/24 09:56:55
Modified: src/blocks/hsqldb/java/org/apache/cocoon/components/hsqldb
ServerImpl.java
Log:
fixed clash between -trace and -no_systems_exit arguments
Revision Changes Path
1.2 +12 -12 cocoon-2.1/src/blocks/hsqldb/java/org/apache/cocoon/components/hsqldb/ServerImpl.java
Index: ServerImpl.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/hsqldb/java/org/apache/cocoon/components/hsqldb/ServerImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServerImpl.java 9 Mar 2003 00:03:57 -0000 1.1
+++ ServerImpl.java 24 Feb 2004 17:56:55 -0000 1.2
@@ -88,7 +88,7 @@
private String port;
/** Arguments for running the server */
- private String arguments[] = new String[8];
+ private String arguments[] = new String[10];
/** Check if the server has already been started */
private boolean started = false;
@@ -108,11 +108,11 @@
arguments[0] = "-port";
arguments[1] = this.port = params.getParameter("port", "9002");
arguments[2] = "-silent";
- arguments[3] = params.getParameter("silent","true");
+ arguments[3] = params.getParameter("silent", "true");
arguments[4] = "-trace";
- arguments[5] = params.getParameter("trace","false");
- arguments[4] = "-no_system_exit";
- arguments[5] = "true";
+ arguments[5] = params.getParameter("trace", "false");
+ arguments[6] = "-no_system_exit";
+ arguments[7] = "true";
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Configure ServerImpl with port: " + arguments[1]
+ ", silent: " + arguments[3]
@@ -131,11 +131,11 @@
}
try {
- arguments[6] = "-database";
- arguments[7] = new File(dbPath).getCanonicalPath();
- arguments[7] += File.separator + "cocoondb";
+ arguments[8] = "-database";
+ arguments[9] = new File(dbPath).getCanonicalPath();
+ arguments[9] += File.separator + "cocoondb";
if (getLogger().isDebugEnabled()) {
- getLogger().debug("database is " + arguments[7]);
+ getLogger().debug("database is " + arguments[9]);
}
} catch (MalformedURLException e) {
getLogger().error("MalformedURLException - Could not get database directory ", e);
@@ -148,7 +148,7 @@
public void start() {
if (!started) {
// FIXME (VG): This dirty hack here is till shutdown issue is resolved
- File file = new File(arguments[7] + ".backup");
+ File file = new File(arguments[9] + ".backup");
if (file.exists() && file.delete()) {
getLogger().info("HSQLDB backup file has been deleted.");
}
@@ -191,7 +191,7 @@
try {
if (getLogger().isDebugEnabled()) {
getLogger().debug("HSQLDB Server arguments are as follows:");
- for(int i=0;i<8;i++) {
+ for(int i = 0; i < arguments.length; i++) {
getLogger().debug(i + " : " + arguments[i]);
}
}