summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/host-jetty
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 18:26:10 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 18:26:10 +0000
commitd4c6db045bb36ba20a9f0e1e99f54b0064381d78 (patch)
treebb71cae193c0223005e328b76003128eba4d2d9f /sca-java-2.x/trunk/modules/host-jetty
parentc6297b85e1e6e88dafd19d284bb4b7c1d8466c57 (diff)
TUSCANY-3856 - Adding support for 'portDefault' backdoor to avoid test failures...
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1086675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/host-jetty')
-rw-r--r--sca-java-2.x/trunk/modules/host-jetty/src/main/java/org/apache/tuscany/sca/http/jetty/JettyServer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/host-jetty/src/main/java/org/apache/tuscany/sca/http/jetty/JettyServer.java b/sca-java-2.x/trunk/modules/host-jetty/src/main/java/org/apache/tuscany/sca/http/jetty/JettyServer.java
index c4108cf8df..a7bfcfea2a 100644
--- a/sca-java-2.x/trunk/modules/host-jetty/src/main/java/org/apache/tuscany/sca/http/jetty/JettyServer.java
+++ b/sca-java-2.x/trunk/modules/host-jetty/src/main/java/org/apache/tuscany/sca/http/jetty/JettyServer.java
@@ -89,7 +89,7 @@ public class JettyServer implements ServletHost, LifeCycleListener {
// TODO - this static seems to be set by the JSORPC binding unit test
// doesn't look to be a great way of doing things
- //public static int portDefault = 8080;
+ public static int portDefault = 0;
private int defaultPort;
private int defaultSSLPort;
@@ -128,6 +128,10 @@ public class JettyServer implements ServletHost, LifeCycleListener {
this.workScheduler = workScheduler;
this.defaultPort = httpPortAllocator.getDefaultPort(HttpScheme.HTTP);
+ //handle backdoor to set specific default port in tests
+ if(portDefault > 0) {
+ this.defaultPort = portDefault;
+ }
this.defaultSSLPort = httpPortAllocator.getDefaultPort(HttpScheme.HTTPS);
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {