Index: admin-cli/commands/src/java/com/sun/enterprise/cli/commands/CLIDescriptor.xml
===================================================================
RCS file: /cvs/glassfish/admin-cli/commands/src/java/com/sun/enterprise/cli/commands/CLIDescriptor.xml,v
retrieving revision 1.70.4.1
diff -u -r1.70.4.1 CLIDescriptor.xml
--- admin-cli/commands/src/java/com/sun/enterprise/cli/commands/CLIDescriptor.xml 23 Oct 2007 19:45:00 -0000 1.70.4.1
+++ admin-cli/commands/src/java/com/sun/enterprise/cli/commands/CLIDescriptor.xml 4 Aug 2008 20:29:52 -0000
@@ -246,6 +246,7 @@
+
@@ -4373,10 +4374,11 @@
-
+
+
Index: admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDatabaseCommand.java
===================================================================
RCS file: /cvs/glassfish/admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDatabaseCommand.java,v
retrieving revision 1.13
diff -u -r1.13 StartDatabaseCommand.java
--- admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDatabaseCommand.java 5 May 2007 05:25:12 -0000 1.13
+++ admin-cli/commands/src/java/com/sun/enterprise/cli/commands/StartDatabaseCommand.java 4 Aug 2008 18:36:58 -0000
@@ -44,6 +44,7 @@
import com.sun.enterprise.util.OS;
import java.io.File;
import java.io.IOException;
+import java.util.StringTokenizer;
/**
@@ -59,6 +60,8 @@
{
private final static String DB_HOME = "dbhome";
private final static String DATABASE_DIR_NAME = "databases";
+ private final static String JVM_OPTIONS = "jvmoptions";
+
private String dbHome;
/**
@@ -81,8 +84,9 @@
*/
public String[] startDatabaseCmd() throws Exception
{
+ String[] cmd = null;
if (OS.isDarwin()) {
- return new String [] {
+ cmd = new String [] {
sJavaHome+File.separator+"bin"+File.separator+"java",
"-Djava.library.path="+sInstallRoot+File.separator+"lib",
"-Dderby.storage.fileSyncTransactionLog=True",
@@ -94,7 +98,7 @@
};
}
else {
- return new String [] {
+ cmd = new String [] {
sJavaHome+File.separator+"bin"+File.separator+"java",
"-Djava.library.path="+sInstallRoot+File.separator+"lib",
"-cp",
@@ -104,6 +108,21 @@
dbHost, dbPort, "true", dbHome
};
}
+ String jvmOptionsStr = getOption(JVM_OPTIONS);
+ if (null != jvmOptionsStr) {
+ String[] jvmOptions = jvmOptionsStr.split("\\s");
+ String[] newCmd = new String[cmd.length + jvmOptions.length];
+ int i = 0;
+ newCmd[i++] = cmd[0];
+ for (int j = 0; j < jvmOptions.length; j++) {
+ newCmd[i++] = jvmOptions[j];
+ }
+ for (int j = 1; j < cmd.length; j++) {
+ newCmd[i++] = cmd[j];
+ }
+ cmd = newCmd;
+ }
+ return cmd;
}
Index: appserv-docs/sman/cat1/start-database.1
===================================================================
RCS file: /cvs/glassfish/appserv-docs/sman/cat1/start-database.1,v
retrieving revision 1.23
diff -u -r1.23 start-database.1
--- appserv-docs/sman/cat1/start-database.1 18 Jan 2007 07:50:03 -0000 1.23
+++ appserv-docs/sman/cat1/start-database.1 4 Aug 2008 21:32:10 -0000
@@ -4,7 +4,7 @@
start-database - starts the Java DB
SYNOPSIS
- start-database [--dbhost 0.0.0.0] [--dbport 1527] [--dbhome
+ start-database [--jvmoptions=""] [--dbhost 0.0.0.0] [--dbport 1527] [--dbhome
DERBY_INSTALL] [--echo=false] [--terse=false]
DESCRIPTION
@@ -42,6 +42,13 @@
This command is supported in local mode only.
OPTIONS
+ --jvmoptions The JVM options to pass to the JVM
+ that the database server is started
+ with. The default is no options are
+ passed. This can be used to set the
+ JVM memory options for example with
+ an invocation like:
+ --jvmooptions="-Xms128m -Xmx512m"
--dbhost The host name or IP address of the
Java DB server process. The default
is the IP address 0.0.0.0, which
Index: appserv-docs/sman/man1/start-database.1
===================================================================
RCS file: /cvs/glassfish/appserv-docs/sman/man1/start-database.1,v
retrieving revision 1.13
diff -u -r1.13 start-database.1
--- appserv-docs/sman/man1/start-database.1 30 Aug 2006 23:36:50 -0000 1.13
+++ appserv-docs/sman/man1/start-database.1 4 Aug 2008 21:36:41 -0000
@@ -55,6 +55,11 @@
&opts-tt;
+
+The JVM options to pass to the JVM that the database server is started
+with. The default is no options are passed. This can be used to set the JVM memory
+options for example with an invocation like: --jvmooptions="-Xms128m -Xmx512m"
+The host name or IP address of the Java DB server process.
The default is the IP address 0.0.0.0, which denotes all network interfaces