activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] activemq git commit: [AMQ-5517] Start stubbing in some of the extra params and such that will be needed to support jetty 9
Date Tue, 13 Jan 2015 14:27:05 GMT
[AMQ-5517] Start stubbing in some of the extra params and such that will be needed to support
jetty 9


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/bc2e2d9a
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/bc2e2d9a
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/bc2e2d9a

Branch: refs/heads/trunk
Commit: bc2e2d9a414e3f672bb3250111fe81508c6878ef
Parents: 2c68116
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Jan 13 09:14:14 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Jan 13 09:24:50 2015 -0500

----------------------------------------------------------------------
 .../transport/SecureSocketConnectorFactory.java         |  3 ++-
 .../activemq/transport/SocketConnectorFactory.java      |  3 ++-
 .../activemq/transport/http/HttpTransportServer.java    |  2 +-
 .../activemq/transport/https/HttpsTransportServer.java  | 11 -----------
 .../apache/activemq/transport/ws/WSTransportServer.java |  2 +-
 .../activemq/transport/wss/WSSTransportServer.java      | 12 ------------
 .../apache/activemq/transport/ws/WSTransportTest.java   |  4 ++--
 .../apache/activemq/transport/wss/WSSTransportTest.java |  3 ++-
 .../test/java/org/apache/activemq/web/tool/Main.java    |  9 +--------
 pom.xml                                                 |  4 +++-
 10 files changed, 14 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/SecureSocketConnectorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/SecureSocketConnectorFactory.java
b/activemq-http/src/main/java/org/apache/activemq/transport/SecureSocketConnectorFactory.java
index 49ee08c..6c98cac 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/SecureSocketConnectorFactory.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/SecureSocketConnectorFactory.java
@@ -22,6 +22,7 @@ import org.apache.activemq.broker.SslContext;
 import org.apache.activemq.transport.https.Krb5AndCertsSslSocketConnector;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ssl.SslConnector;
 import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
@@ -49,7 +50,7 @@ public class SecureSocketConnectorFactory extends SocketConnectorFactory
{
     }
 
     @Override
-    public Connector createConnector() throws Exception {
+    public Connector createConnector(Server server) throws Exception {
         IntrospectionSupport.setProperties(this, getTransportOptions());
         SslConnector sslConnector;
         if (Krb5AndCertsSslSocketConnector.isKrb(auth)) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/SocketConnectorFactory.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/SocketConnectorFactory.java
b/activemq-http/src/main/java/org/apache/activemq/transport/SocketConnectorFactory.java
index 6eb04f0..36b800b 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/SocketConnectorFactory.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/SocketConnectorFactory.java
@@ -20,13 +20,14 @@ import java.util.Map;
 
 import org.apache.activemq.util.IntrospectionSupport;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.nio.SelectChannelConnector;
 
 public class SocketConnectorFactory {
 
     private Map<String, Object> transportOptions;
 
-    public Connector createConnector() throws Exception {
+    public Connector createConnector(Server server) throws Exception {
         SelectChannelConnector connector = new SelectChannelConnector();
         IntrospectionSupport.setProperties(connector, transportOptions, "");
         return connector;

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
index 18cc1a9..0c7ecd9 100755
--- a/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
@@ -79,7 +79,7 @@ public class HttpTransportServer extends WebTransportServerSupport {
     protected void doStart() throws Exception {
         server = new Server();
         if (connector == null) {
-            connector = socketConnectorFactory.createConnector();
+            connector = socketConnectorFactory.createConnector(server);
         }
 
         URI boundTo = bind();

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
b/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
index ea447f4..f31bf4b 100755
--- a/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
@@ -21,23 +21,12 @@ import java.net.URI;
 import org.apache.activemq.broker.SslContext;
 import org.apache.activemq.transport.SecureSocketConnectorFactory;
 import org.apache.activemq.transport.http.HttpTransportServer;
-import org.eclipse.jetty.server.Connector;
 
 public class HttpsTransportServer extends HttpTransportServer {
-    private SslContext context;
 
     public HttpsTransportServer(URI uri, HttpsTransportFactory factory, SslContext context)
{
         super(uri, factory);
-        this.context = context;
         this.socketConnectorFactory = new SecureSocketConnectorFactory(context);
     }
 
-    public void doStart() throws Exception {
-        Connector sslConnector = socketConnectorFactory.createConnector();
-        
-        setConnector(sslConnector);
-
-        super.doStart();
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
index 496ed62..4b75c9a 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSTransportServer.java
@@ -52,7 +52,7 @@ public class WSTransportServer extends WebTransportServerSupport {
         server = new Server();
 
         if (connector == null) {
-            connector = socketConnectorFactory.createConnector();
+            connector = socketConnectorFactory.createConnector(server);
         }
 
         URI boundTo = bind();

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/main/java/org/apache/activemq/transport/wss/WSSTransportServer.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/wss/WSSTransportServer.java
b/activemq-http/src/main/java/org/apache/activemq/transport/wss/WSSTransportServer.java
index efa6c55..d73fd05 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/wss/WSSTransportServer.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/wss/WSSTransportServer.java
@@ -21,24 +21,12 @@ import java.net.URI;
 import org.apache.activemq.broker.SslContext;
 import org.apache.activemq.transport.SecureSocketConnectorFactory;
 import org.apache.activemq.transport.ws.WSTransportServer;
-import org.eclipse.jetty.server.Connector;
 
 public class WSSTransportServer extends WSTransportServer {
-    private SslContext context;
 
     public WSSTransportServer(URI location, SslContext context) {
         super(location);
-        this.context = context;
         this.socketConnectorFactory = new SecureSocketConnectorFactory(context);
     }
 
-    @Override
-    protected void doStart() throws Exception {
-
-        Connector sslConnector = socketConnectorFactory.createConnector();
-
-        setConnector(sslConnector);
-
-        super.doStart();
-    }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
b/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
index 58df4cc..92bc1cb 100644
--- a/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/transport/ws/WSTransportTest.java
@@ -96,7 +96,7 @@ public class WSTransportTest {
     protected Server createWebServer() throws Exception {
         Server server = new Server();
 
-        Connector connector = createJettyConnector();
+        Connector connector = createJettyConnector(server);
         connector.setServer(server);
 
         WebAppContext context = new WebAppContext();
@@ -129,7 +129,7 @@ public class WSTransportTest {
         return proxyPort;
     }
 
-protected Connector createJettyConnector() {
+    protected Connector createJettyConnector(Server server) {
         SelectChannelConnector connector = new SelectChannelConnector();
         connector.setPort(getProxyPort());
         return connector;

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-http/src/test/java/org/apache/activemq/transport/wss/WSSTransportTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/wss/WSSTransportTest.java
b/activemq-http/src/test/java/org/apache/activemq/transport/wss/WSSTransportTest.java
index 775c0ab..ef61140 100644
--- a/activemq-http/src/test/java/org/apache/activemq/transport/wss/WSSTransportTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/transport/wss/WSSTransportTest.java
@@ -18,12 +18,13 @@ package org.apache.activemq.transport.wss;
 
 import org.apache.activemq.transport.ws.WSTransportTest;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ssl.SslSocketConnector;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 
 public class WSSTransportTest extends WSTransportTest {
     @Override
-    protected Connector createJettyConnector() {
+    protected Connector createJettyConnector(Server server) {
         SslSocketConnector sslConnector = new SslSocketConnector();
         SslContextFactory contextFactory = sslConnector.getSslContextFactory();
         contextFactory.setKeyStorePath("src/test/resources/server.keystore");

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
----------------------------------------------------------------------
diff --git a/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java b/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
index 7a419c3..ab9d482 100644
--- a/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
+++ b/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
@@ -19,7 +19,6 @@ package org.apache.activemq.web.tool;
 
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
 import org.eclipse.jetty.webapp.WebAppContext;
 
 /**
@@ -48,10 +47,7 @@ public final class Main {
         }
         System.out.println("Starting Web Server on port: " + port);
         System.setProperty("jetty.port", "" + port);
-        Server server = new Server();
-        SelectChannelConnector connector = new SelectChannelConnector();
-        connector.setPort(port);
-        connector.setServer(server);
+        Server server = new Server(port);
 
         //System.setProperty("webconsole.type","properties");
         //System.setProperty("webconsole.jms.url","tcp://localhost:61616");
@@ -63,9 +59,6 @@ public final class Main {
         context.setContextPath(WEBAPP_CTX);
         context.setServer(server);
         server.setHandler(context);
-        server.setConnectors(new Connector[] {
-            connector
-        });
         server.start();
 
         System.out.println();

http://git-wip-us.apache.org/repos/asf/activemq/blob/bc2e2d9a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c4d7cd8..1c4daea 100755
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,9 @@
     <jasypt-version>1.9.2</jasypt-version>
     <jaxb-bundle-version>2.2.1.1_2</jaxb-bundle-version>
     <jdom-version>1.0</jdom-version>
-    <jetty-version>8.1.15.v20140411</jetty-version>
+    <jetty9-version>9.2.6.v20141205</jetty9-version>
+    <jetty8-version>8.1.16.v20140903</jetty8-version>
+    <jetty-version>${jetty8-version}</jetty-version>
     <jmdns-version>3.4.1</jmdns-version>
     <jsp-version>2.1.v20100127</jsp-version>
     <jstl-version>1.1.2</jstl-version>


Mime
View raw message