activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1097289 - in /activemq/activemq-apollo/trunk: apollo-dto/src/main/java/org/apache/activemq/apollo/dto/ apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/
Date Thu, 28 Apr 2011 00:08:03 GMT
Author: chirino
Date: Thu Apr 28 00:08:03 2011
New Revision: 1097289

URL: http://svn.apache.org/viewvc?rev=1097289&view=rev
Log:
Does not really make sense to make max_command_length configurable.

Modified:
    activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompCodec.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java?rev=1097289&r1=1097288&r2=1097289&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/StompDTO.java
Thu Apr 28 00:08:03 2011
@@ -38,9 +38,6 @@ public class StompDTO extends ProtocolDT
     @XmlElement(name="add_user_header")
     public List<AddUserHeaderDTO> add_user_headers = new ArrayList<AddUserHeaderDTO>();
 
-    @XmlAttribute(name="max_command_length")
-    public Integer max_command_length;
-
     @XmlAttribute(name="max_header_length")
     public Integer max_header_length;
 

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompCodec.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompCodec.scala?rev=1097289&r1=1097288&r2=1097289&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompCodec.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompCodec.scala
Thu Apr 28 00:08:03 2011
@@ -34,6 +34,8 @@ import org.apache.activemq.apollo.broker
 
 object StompCodec extends Log {
 
+  var max_command_length = 20
+
   def encode(message: StompFrameMessage):MessageRecord = {
     val frame = message.frame
 
@@ -137,8 +139,6 @@ object StompCodec extends Log {
 class StompCodec extends ProtocolCodec {
 
   import StompCodec._
-
-  var max_command_length = 1024
   var max_header_length = 1024*10
   var max_headers = 1000
   var max_data_length = 1024 * 1024 * 100

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1097289&r1=1097288&r2=1097289&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Thu Apr 28 00:08:03 2011
@@ -352,7 +352,6 @@ class StompProtocolHandler extends Proto
     config = connection.connector.config.protocols.find( _.isInstanceOf[StompDTO]).map(_.asInstanceOf[StompDTO]).getOrElse(new
StompDTO)
 
     import OptionSupport._
-    config.max_command_length.foreach( codec.max_command_length = _ )
     config.max_data_length.foreach( codec.max_data_length = _ )
     config.max_header_length.foreach( codec.max_header_length = _ )
     config.max_headers.foreach( codec.max_headers = _ )
@@ -752,7 +751,7 @@ class StompProtocolHandler extends Proto
       if( !config.add_user_headers.isEmpty ){
         import collection.JavaConversions._
         config.add_user_headers.foreach { h =>
-          val matches = security_context.principles(h.kind)
+          val matches = security_context.principles(Option(h.kind).getOrElse("*"))
           if( !matches.isEmpty ) {
             h.separator match {
               case null=>



Mime
View raw message