activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1391559 - in /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty: JettyWebServer.scala WebSocketTransportFactory.scala
Date Fri, 28 Sep 2012 17:20:37 GMT
Author: chirino
Date: Fri Sep 28 17:20:37 2012
New Revision: 1391559

URL: http://svn.apache.org/viewvc?rev=1391559&view=rev
Log:
Fixes APLO-264: NPE in Jetty - broker fails to start

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

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=1391559&r1=1391558&r2=1391559&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
Fri Sep 28 17:20:37 2012
@@ -35,6 +35,7 @@ import java.lang.String
 import org.eclipse.jetty.servlet.{FilterMapping, FilterHolder}
 import org.apache.activemq.apollo.broker.web.{AllowAnyOriginFilter, WebServer, WebServerFactory}
 import javax.servlet._
+import org.eclipse.jetty.util.log.Slf4jLog
 
 /**
  * <p>
@@ -147,6 +148,10 @@ class JettyWebServer(val broker:Broker) 
       import FileSupport._
       import collection.JavaConversions._
 
+      // Explicitly set the Jetty Log impl to avoid
+      // the NPE raised at https://issues.apache.org/jira/browse/APLO-264
+      org.eclipse.jetty.util.log.Log.setLog(new Slf4jLog());
+
       val config = broker.config
 
       val webapp_path = webapp(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=1391559&r1=1391558&r2=1391559&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
Fri Sep 28 17:20:37 2012
@@ -41,6 +41,7 @@ import java.io.{EOFException, IOExceptio
 import java.security.cert.X509Certificate
 import org.apache.activemq.apollo.broker.web.AllowAnyOriginFilter
 import org.eclipse.jetty.servlet.{FilterMapping, FilterHolder, ServletHolder, ServletContextHandler}
+import org.eclipse.jetty.util.log.Slf4jLog
 
 /**
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
@@ -90,6 +91,10 @@ object WebSocketTransportFactory extends
     protected def _start(on_completed: Task) = blockingExecutor {
       this.synchronized {
 
+        // Explicitly set the Jetty Log impl to avoid
+        // the NPE raised at https://issues.apache.org/jira/browse/APLO-264
+        org.eclipse.jetty.util.log.Log.setLog(new Slf4jLog());
+
         IntrospectionSupport.setProperties(this, URISupport.parseParamters(uri));
 
         accept_dispatch_queue = dispatchQueue.createQueue("accept: " + uri);



Mime
View raw message