You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/01/26 00:28:22 UTC
svn commit: r903009 - in /incubator/wookie/trunk: ant/ivy-java-common.xml
build.properties src/org/apache/wookie/server/Start.java
Author: scottbw
Date: Mon Jan 25 23:28:22 2010
New Revision: 903009
URL: http://svn.apache.org/viewvc?rev=903009&view=rev
Log:
Committing patch for WOOKIE-86 allowing port to be configured when running server in standalone mode (thanks to Ross Gardler for the patch)
Modified:
incubator/wookie/trunk/ant/ivy-java-common.xml
incubator/wookie/trunk/build.properties
incubator/wookie/trunk/src/org/apache/wookie/server/Start.java
Modified: incubator/wookie/trunk/ant/ivy-java-common.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/ant/ivy-java-common.xml?rev=903009&r1=903008&r2=903009&view=diff
==============================================================================
--- incubator/wookie/trunk/ant/ivy-java-common.xml (original)
+++ incubator/wookie/trunk/ant/ivy-java-common.xml Mon Jan 25 23:28:22 2010
@@ -105,6 +105,7 @@
fork="true"
failonerror="true">
<jvmarg line="${jvmargs}"/>
+ <arg value="${run.args}"/>
</java>
</target>
Modified: incubator/wookie/trunk/build.properties
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/build.properties?rev=903009&r1=903008&r2=903009&view=diff
==============================================================================
--- incubator/wookie/trunk/build.properties (original)
+++ incubator/wookie/trunk/build.properties Mon Jan 25 23:28:22 2010
@@ -30,3 +30,4 @@
#standalone server configuration
main.class.name=org.apache.wookie.server.Start
jvmargs=
+run.args=port=8080
Modified: incubator/wookie/trunk/src/org/apache/wookie/server/Start.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/server/Start.java?rev=903009&r1=903008&r2=903009&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/server/Start.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/server/Start.java Mon Jan 25 23:28:22 2010
@@ -29,10 +29,17 @@
public class Start {
static final private Logger logger = Logger.getLogger(Start.class);
+ private static int port = 8080;
private static Server server;
public static void main(String[] args) throws Exception {
+ for (int i = 0; i < args.length; i++) {
+ String arg = args[0];
+ if (arg.startsWith("port=")) {
+ port = new Integer(arg.substring(5));
+ }
+ }
configureDatabase();
configureServer();
startServer();
@@ -65,12 +72,12 @@
logger.info("Starting Wookie Server");
server.start();
server.join();
- logger.info("point your browser at http://localhost:8080/wookie");
+ logger.info("point your browser at http://localhost:" + port + "/wookie");
}
private static void configureServer() throws Exception {
logger.info("Configuring Jetty server");
- server = new Server(8080);
+ server = new Server(port);
WebAppContext context = new WebAppContext();
context.setServer(server);
context.setContextPath("/wookie");