activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1506864 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
Date Thu, 25 Jul 2013 09:40:29 GMT
Author: chirino
Date: Thu Jul 25 09:40:28 2013
New Revision: 1506864

URL: http://svn.apache.org/r1506864
Log:
More fixes for APLO-325: Applying Christian Posta's patch which allows making the WS message
size configurable.

Modified:
    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/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=1506864&r1=1506863&r2=1506864&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
Thu Jul 25 09:40:28 2013
@@ -84,8 +84,17 @@ object WebSocketTransportFactory extends
     @BeanProperty
     var cors_origin:String = null
 
+    @BeanProperty
+    var max_text_message_size: Int = -1
+
+    @BeanProperty
+    var max_binary_message_size:Int = -1
+
+    @BeanProperty
+    var max_idle_time: Int = -1
+
     var broker: Broker = _
-    var blocking_executor: Executor = _
+
 
     def set_broker(value: Broker) = broker = value
 
@@ -206,6 +215,17 @@ object WebSocketTransportFactory extends
 
     def fire_accept = accept_dispatch_queue {
       val transport = pending_connects.poll()
+
+      if(max_text_message_size != -1){
+        transport.connection.setMaxTextMessageSize(max_text_message_size)
+      }
+      if(max_binary_message_size != -1){
+        transport.connection.setMaxBinaryMessageSize(max_binary_message_size)
+      }
+      if(max_idle_time != -1){
+        transport.connection.setMaxIdleTime(max_idle_time)
+      }
+
       if (transport != null) {
         if (service_state.is_started) {
           transportServerListener.onAccept(transport)



Mime
View raw message