[jboss-cvs] JBossAS SVN: r57471 - projects/test/trunk/test/src/main/org/jboss/test/util/server
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 6 12:13:44 EDT 2006
Author: rrajesh
Date: 2006-10-06 12:13:43 -0400 (Fri, 06 Oct 2006)
New Revision: 57471
Modified:
projects/test/trunk/test/src/main/org/jboss/test/util/server/Server.java
projects/test/trunk/test/src/main/org/jboss/test/util/server/ServerController.java
Log:
Reverted changes for JBQA-292
Modified: projects/test/trunk/test/src/main/org/jboss/test/util/server/Server.java
===================================================================
--- projects/test/trunk/test/src/main/org/jboss/test/util/server/Server.java 2006-10-06 15:02:50 UTC (rev 57470)
+++ projects/test/trunk/test/src/main/org/jboss/test/util/server/Server.java 2006-10-06 16:13:43 UTC (rev 57471)
@@ -126,8 +126,7 @@
for (Iterator iter = arguments.iterator(); iter.hasNext();)
{
Argument argument = (Argument) iter.next();
- if (!argument.getValue().equals(""))
- args.append("\"" + argument.getValue() + "\"" + " ");
+ args.append(argument.getValue() + " ");
}
return args.toString();
}
@@ -153,8 +152,7 @@
for (Iterator iter = jvmArguments.iterator(); iter.hasNext();)
{
Argument argument = (Argument) iter.next();
- if (!argument.getValue().equals(""))
- args.append("\"" + argument.getValue() + "\"" + " ");
+ args.append(argument.getValue() + " ");
}
return args.toString();
}
@@ -180,7 +178,7 @@
for (Iterator iter = sysProperties.iterator(); iter.hasNext();)
{
Property property = (Property) iter.next();
- args.append("-D" + property.getKey() + "=" + "\"" + property.getValue() + "\"" + " ");
+ args.append("-D" + property.getKey() + "=" + property.getValue() + " ");
}
return args.toString();
}
@@ -222,7 +220,7 @@
/**
* Has the server been intentionally stopped?
- *
+ *
* @return whether the server is stopped
*/
public boolean isStopped()
@@ -232,7 +230,7 @@
/**
* Get the process.
- *
+ *
* @return the process
*/
public Process getProcess()
@@ -242,8 +240,8 @@
/**
* Where is the HTTP service listening?
- *
- * @return whether the service is listening
+ *
+ * @return whether the service is listening
* @throws MalformedURLException for a malformed url
*/
public URL getHttpUrl() throws MalformedURLException
@@ -253,7 +251,7 @@
/**
* The URl for the RMI listener.
- *
+ *
* @return the rmi url
*/
public String getRmiUrl()
@@ -330,7 +328,7 @@
/**
* Get the rmiPort
- *
+ *
* @return the rmi port
*/
public Integer getRmiPort()
@@ -339,7 +337,7 @@
}
/**
* Where should the server's std err log go?
- *
+ *
* @return the error log file
*/
public File getErrorLog()
@@ -349,7 +347,7 @@
/**
* Where should the servers's std out go?
- *
+ *
* @return the output log file
*/
public File getOutputLog()
@@ -379,7 +377,7 @@
/**
* Set the output log's writer
- *
+ *
* @param outlog the log writer
*/
public void setOutWriter(PrintWriter outlog)
Modified: projects/test/trunk/test/src/main/org/jboss/test/util/server/ServerController.java
===================================================================
--- projects/test/trunk/test/src/main/org/jboss/test/util/server/ServerController.java 2006-10-06 15:02:50 UTC (rev 57470)
+++ projects/test/trunk/test/src/main/org/jboss/test/util/server/ServerController.java 2006-10-06 16:13:43 UTC (rev 57471)
@@ -34,7 +34,7 @@
/**
* Starts, stops, and (eventually) reboots server instances.
- *
+ *
* @author <a href="ryan.campbell at jboss.com">Ryan Campbell</a>
* @version $Revision$
*/
@@ -43,15 +43,15 @@
private static final String SHUTDOWN_CLASS = "org.jboss.Shutdown";
- private static final String MAIN = "org.jboss.Main";
-
+ private static final String MAIN = "org.jboss.Main";
+
private ServerController()
{
}
/**
* Start the server and pump its output and error streams.
- *
+ *
* @param server
* @param manager
* @throws IOException
@@ -100,7 +100,7 @@
* cause the spawned process' threads to block when this process
* blocks. So if uncomment following line, then the ServerTestHarness
* will block abnormally, thus causing the tests not to run correctly.
- *
+ *
* Is this true for our environment? - rcampbell
*/
server.setProcess(process);
@@ -117,7 +117,7 @@
}
- /**
+ /**
* Delete & create log files
* @param logFile
* @throws IOException
@@ -136,7 +136,7 @@
logFile.createNewFile();
}
- /**
+ /**
* Create the command line to execute
*
* @param server the server
@@ -146,22 +146,22 @@
*/
private static String getStartCommandLine(Server server, ServerManager manager) throws IOException
{
- String execCmd = "\"" + manager.getJavaExecutable() + "\"" + " -cp " + "\"" + manager.getStartClasspath() + "\"" + " ";
+ String execCmd = manager.getJavaExecutable() + " -cp " + manager.getStartClasspath() + " ";
execCmd = execCmd + server.getJvmArgs() + server.getSysProperties();
execCmd = execCmd + " " + MAIN + " -c " + server.getConfig() + " -b " + server.getHost();
-
+
if (manager.getUdpGroup() != null && ! manager.getUdpGroup().equals(""))
{
- execCmd = execCmd + " -u " + manager.getUdpGroup();
+ execCmd = execCmd + " -u " + manager.getUdpGroup();
}
execCmd = execCmd + " " + server.getArgs();
return execCmd;
}
- /**
+ /**
* Wait until the jboss instance is full initialized
* @param server
- * @param manager
+ * @param manager
* @throws IOException
*/
private static void waitForServer(Server server, ServerManager manager) throws IOException
@@ -192,9 +192,9 @@
}
/**
- * Check if the server is fully intialized by trying to
+ * Check if the server is fully intialized by trying to
* open a connection to tomcat.
- *
+ *
* @param server the server
* @return whether it is started
* @throws IOException for any error
@@ -250,7 +250,7 @@
/**
* Stop the server using shutdown.jar.
* Process.destroy() the server if it fails to shutdown.
- *
+ *
* @param server
* @param manager
* @throws IOException
@@ -292,9 +292,9 @@
}
/**
- * Wait for the server to shutdown.
+ * Wait for the server to shutdown.
* @param server
- * @param manager
+ * @param manager
* @return true if server process ends before timeout
*/
private static boolean waitOnShutdown(Server server, ServerManager manager)
@@ -302,7 +302,7 @@
int shutdownTimeout = manager.getShutdownTimeout();
System.out.println("shutdownTimeout will be="+shutdownTimeout);
for (int tries = 0; tries < shutdownTimeout; tries++)
- {
+ {
try
{
if (!server.isRunning())
@@ -319,7 +319,7 @@
return false;
}
- /**
+ /**
* Get the server shutdown command line.
*
* @param server the server
@@ -329,7 +329,7 @@
*/
private static String getStopCommandLine(Server server, ServerManager manager) throws IOException
{
- String execCmd ="\"" + manager.getJavaExecutable() + "\"" + " -cp " + "\"" + manager.getStopClasspath() + "\"" + " ";
+ String execCmd = manager.getJavaExecutable() + " -cp " + manager.getStopClasspath() + " ";
execCmd = execCmd + SHUTDOWN_CLASS + " --server " + server.getRmiUrl();
execCmd = execCmd + " --shutdown";
return execCmd;
@@ -337,7 +337,7 @@
/**
* Close the streams of a process.
- *
+ *
* @param process
*/
private static void closeAllStreams(Process process)
@@ -355,7 +355,7 @@
/**
* A OutputPumper. Redirect std err & out to log files.
- *
+ *
* @author <a href="ryan.campbell at jboss.com">Ryan Campbell</a>
* @version $Revision$
*/
More information about the jboss-cvs-commits
mailing list