activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1075559 - in /activemq/activemq-apollo/trunk: apollo-broker/ apollo-broker/src/main/filtered-resources/ apollo-broker/src/main/filtered-resources/org/ apollo-broker/src/main/filtered-resources/org/apache/ apollo-broker/src/main/filtered-re...
Date Mon, 28 Feb 2011 21:55:21 GMT
Author: chirino
Date: Mon Feb 28 21:55:20 2011
New Revision: 1075559

URL: http://svn.apache.org/viewvc?rev=1075559&view=rev
Log:
stomp CONNECTED frame now has a server header.

Added:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/broker/
    activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/broker/version.txt
      - copied, changed from r1075431, activemq/activemq-apollo/trunk/apollo-cli/src/main/filtered-resources/org/apache/activemq/apollo/cli/commands/version.txt
Removed:
    activemq/activemq-apollo/trunk/apollo-cli/src/main/filtered-resources/org/apache/activemq/apollo/cli/commands/version.txt
Modified:
    activemq/activemq-apollo/trunk/apollo-broker/pom.xml
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/pom.xml?rev=1075559&r1=1075558&r2=1075559&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/pom.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/pom.xml Mon Feb 28 21:55:20 2011
@@ -160,6 +160,23 @@
   </dependencies>
 
   <build>
+    
+    <resources>
+      <resource>
+        <directory>${project.basedir}/src/main/resources</directory>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>${project.basedir}/src/main/filtered-resources</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </resource>
+    </resources>
+    
     <plugins>
 
       <!-- Generate a test jar for the test cases in this package -->

Copied: activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/broker/version.txt
(from r1075431, activemq/activemq-apollo/trunk/apollo-cli/src/main/filtered-resources/org/apache/activemq/apollo/cli/commands/version.txt)
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/broker/version.txt?p2=activemq/activemq-apollo/trunk/apollo-broker/src/main/filtered-resources/org/apache/activemq/apollo/broker/version.txt&p1=activemq/activemq-apollo/trunk/apollo-cli/src/main/filtered-resources/org/apache/activemq/apollo/cli/commands/version.txt&r1=1075431&r2=1075559&rev=1075559&view=diff
==============================================================================
    (empty)

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala?rev=1075559&r1=1075558&r2=1075559&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
Mon Feb 28 21:55:20 2011
@@ -32,6 +32,7 @@ import java.net.InetSocketAddress
 import org.apache.activemq.apollo.broker.web._
 import collection.mutable.{HashSet, LinkedHashMap}
 import scala.util.Random
+import FileSupport._
 
 /**
  * <p>
@@ -177,6 +178,11 @@ object Broker extends Log {
 
     }.result
   }
+
+  val version = using(getClass().getResourceAsStream("version.txt")) { source=>
+    read_text(source)
+  }
+
 }
 
 /**

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala?rev=1075559&r1=1075558&r2=1075559&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
Mon Feb 28 21:55:20 2011
@@ -24,6 +24,7 @@ import java.io._
 import org.apache.activemq.apollo.util.FileSupport._
 import java.util.regex.{Pattern, Matcher}
 import org.apache.felix.service.command.CommandSession
+import org.apache.activemq.apollo.broker.Broker
 
 object Create {
   val IS_WINDOWS = System.getProperty("os.name").toLowerCase().trim().startsWith("win");
@@ -50,10 +51,6 @@ class Create extends Action {
 
   def execute(session: CommandSession) = {
 
-    val version = using(getClass().getResourceAsStream("version.txt")) { source=>
-      read_text(source)
-    }
-
     def println(value:Any) = session.getConsole.println(value)
     try {
       println("Creating apollo instance at: %s".format(directory))
@@ -152,7 +149,7 @@ class Create extends Action {
 
       if( filter ) {
         content = content.replaceAll(Pattern.quote("${host}"), Matcher.quoteReplacement(host))
-        content = content.replaceAll(Pattern.quote("${version}"), Matcher.quoteReplacement(version))
+        content = content.replaceAll(Pattern.quote("${version}"), Matcher.quoteReplacement(Broker.version))
       }
 
       // and then writing out in the new target encoding.

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala?rev=1075559&r1=1075558&r2=1075559&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
Mon Feb 28 21:55:20 2011
@@ -412,6 +412,7 @@ object Stomp {
   val VERSION = ascii("version")
   val SESSION = ascii("session")
   val RESPONSE_ID = ascii("response-id")
+  val SERVER = ascii("server")
 
   val BROWSER = ascii("browser")
   val EXCLUSIVE = ascii("exclusive")

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=1075559&r1=1075558&r2=1075559&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
Mon Feb 28 21:55:20 2011
@@ -571,6 +571,8 @@ class StompProtocolHandler extends Proto
 
       var connected_headers = ListBuffer((VERSION, protocol_version))
 
+      connected_headers += SERVER->encode_header("apache-apollo/"+Broker.version)
+
       session_id = encode_header(this.host.config.id + "-"+this.host.session_counter.incrementAndGet)
       connected_headers += SESSION->session_id
 



Mime
View raw message