activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1413930 - in /activemq/activemq-apollo/trunk: ./ apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/ apollo-web/src/main/scala/org/apache/activemq/apollo/web/
Date Mon, 26 Nov 2012 23:30:18 GMT
Author: chirino
Date: Mon Nov 26 23:30:16 2012
New Revision: 1413930

URL: http://svn.apache.org/viewvc?rev=1413930&view=rev
Log:
Upgrade to the latest stable release of Jetty.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/JettyWebServer.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/JerseyServlet.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
    activemq/activemq-apollo/trunk/pom.xml

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/JettyWebServer.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/JettyWebServer.scala?rev=1413930&r1=1413929&r2=1413930&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/JettyWebServer.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/JettyWebServer.scala
Mon Nov 26 23:30:16 2012
@@ -36,6 +36,7 @@ import org.eclipse.jetty.servlet.{Filter
 import org.apache.activemq.apollo.broker.web.{AllowAnyOriginFilter, WebServer, WebServerFactory}
 import javax.servlet._
 import org.eclipse.jetty.util.log.Slf4jLog
+import java.util
 
 /**
  * <p>
@@ -211,8 +212,9 @@ class JettyWebServer(val broker:Broker) 
                 }
 
                 val connector = new SslSelectChannelConnector
-                connector.setSslContext(sslContext)
-                connector.setWantClientAuth(true)
+                val ssl_settings = connector.getSslContextFactory;
+                ssl_settings.setSslContext(sslContext)
+                ssl_settings.setWantClientAuth(true)
                 connector
             }
 
@@ -228,9 +230,10 @@ class JettyWebServer(val broker:Broker) 
             context.setWar(webapp_path.getCanonicalPath)
             context.setClassLoader(Broker.class_loader)
 
+            val ALL = util.EnumSet.allOf(classOf[DispatcherType])
             if( cors_origin!=null && !cors_origin.trim().isEmpty ) {
               val origins = cors_origin.split(",").map(_.trim()).toSet
-              context.addFilter(new FilterHolder(new AllowAnyOriginFilter(origins)), "/*",
FilterMapping.DEFAULT)
+              context.addFilter(new FilterHolder(new AllowAnyOriginFilter(origins)), "/*",
ALL)
             }
             context.addFilter(new FilterHolder(new Filter(){
               def init(p1: FilterConfig) {}
@@ -239,7 +242,7 @@ class JettyWebServer(val broker:Broker) 
                 request.setAttribute("APOLLO_BROKER", broker)
                 chain.doFilter(request, response)
               }
-            }), "/*", FilterMapping.DEFAULT)
+            }), "/*", ALL)
 
             if( broker.tmp !=null ) {
               context.setTempDirectory(broker.tmp)

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala?rev=1413930&r1=1413929&r2=1413930&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
Mon Nov 26 23:30:16 2012
@@ -42,6 +42,8 @@ import java.security.cert.X509Certificat
 import org.apache.activemq.apollo.broker.web.AllowAnyOriginFilter
 import org.eclipse.jetty.servlet.{FilterMapping, FilterHolder, ServletHolder, ServletContextHandler}
 import org.eclipse.jetty.util.log.Slf4jLog
+import java.util
+import javax.servlet.DispatcherType
 
 /**
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
@@ -129,8 +131,9 @@ object WebSocketTransportFactory extends
               SSLContext.getDefault
             }
             val connector = new SslSelectChannelConnector
-            connector.setSslContext(sslContext)
-            connector.setWantClientAuth(true)
+            val ssl_settings = connector.getSslContextFactory;
+            ssl_settings.setSslContext(sslContext)
+            ssl_settings.setWantClientAuth(true)
             connector
         }
         connector.setHost(host)
@@ -138,9 +141,11 @@ object WebSocketTransportFactory extends
 
         var context = new ServletContextHandler(ServletContextHandler.NO_SECURITY)
         context.setContextPath(prefix)
+
         if( cors_origin!=null && !cors_origin.trim().isEmpty ) {
+          val ALL = util.EnumSet.allOf(classOf[DispatcherType])
           val origins = cors_origin.split(",").map(_.trim()).toSet
-          context.addFilter(new FilterHolder(new AllowAnyOriginFilter(origins)), "/*", FilterMapping.DEFAULT)
+          context.addFilter(new FilterHolder(new AllowAnyOriginFilter(origins)), "/*", ALL)
         }
         context.addServlet(new ServletHolder(this), "/")
 
@@ -188,7 +193,7 @@ object WebSocketTransportFactory extends
           transportServerListener.onAccept(transport)
         } else {
           blockingExecutor {
-            transport.connection.disconnect();
+            transport.connection.close();
           }
         }
       }
@@ -271,7 +276,7 @@ object WebSocketTransportFactory extends
         inbound.synchronized {
           inbound.notify();
         }
-        connection.disconnect()
+        connection.close()
         dispatch_queue {
           protocolCodec = null
           on_completed.run()

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/JerseyServlet.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/JerseyServlet.scala?rev=1413930&r1=1413929&r2=1413930&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/JerseyServlet.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/JerseyServlet.scala
Mon Nov 26 23:30:16 2012
@@ -42,7 +42,7 @@ class JerseyServlet extends ServletConta
       return original_config.getServletContext
     }
 
-    def getInitParameterNames: Enumeration[_] = {
+    def getInitParameterNames: Enumeration[String] = {
       import collection.JavaConversions._
       return new java.util.Vector(custom_config_map.keys).elements();
     }

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala?rev=1413930&r1=1413929&r2=1413930&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/StaticContentFilter.scala
Mon Nov 26 23:30:16 2012
@@ -91,9 +91,9 @@ class StaticContentFilter extends Filter
     var servletPath: String = null;
     var pathInfo: String = null;
 
-    if (request.getAttribute(Dispatcher.INCLUDE_REQUEST_URI) != null) {
-      servletPath = request.getAttribute(Dispatcher.INCLUDE_SERVLET_PATH).asInstanceOf[String]
-      pathInfo = request.getAttribute(Dispatcher.INCLUDE_PATH_INFO).asInstanceOf[String]
+    if (request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null) {
+      servletPath = request.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH).asInstanceOf[String]
+      pathInfo = request.getAttribute(RequestDispatcher.INCLUDE_PATH_INFO).asInstanceOf[String]
       if (servletPath == null) {
         servletPath = request.getServletPath();
         pathInfo = request.getPathInfo();

Modified: activemq/activemq-apollo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/pom.xml?rev=1413930&r1=1413929&r2=1413930&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/pom.xml (original)
+++ activemq/activemq-apollo/trunk/pom.xml Mon Nov 26 23:30:16 2012
@@ -70,7 +70,7 @@
     <howl-version>0.1.8</howl-version>
     <hsqldb-version>1.7.2.2</hsqldb-version>
     <jdom-version>1.0</jdom-version>
-    <jetty-version>7.6.1.v20120215</jetty-version>
+    <jetty-version>8.1.8.v20121106</jetty-version>
     <jmock-version>1.0.1</jmock-version>
     <junit-version>4.10</junit-version>
     <jxta-version>2.0</jxta-version>



Mime
View raw message