You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2014/01/31 17:16:55 UTC

[1/2] git commit: Fix some bugs that were generating error messages in the tests.

Updated Branches:
  refs/heads/trunk db8de8bb9 -> 5feb3ca58


Fix some bugs that were generating error messages in the tests.

Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/1831367f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/1831367f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/1831367f

Branch: refs/heads/trunk
Commit: 1831367ffb2e3920cfae5a167bdcd059bc5825c7
Parents: db8de8b
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Fri Jan 31 11:13:43 2014 -0500
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Fri Jan 31 11:13:43 2014 -0500

----------------------------------------------------------------------
 .../activemq/apollo/stomp/StompProtocolHandler.scala      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/1831367f/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
----------------------------------------------------------------------
diff --git a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
index f928a0e..bf1a0ca 100644
--- a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
+++ b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
@@ -1759,8 +1759,10 @@ class StompProtocolHandler extends ProtocolHandler {
     val txid = require_transaction_header(headers)
     val tx = transactions.get(txid).getOrElse(die("transaction not active: %d".format(txid)))
     tx.commit {
-      remove_tx_queue(txid)
-      send_receipt(headers)
+      queue {
+        remove_tx_queue(txid)
+        send_receipt(headers)
+      }
     }
   }
 
@@ -1837,7 +1839,7 @@ class StompProtocolHandler extends ProtocolHandler {
 
   def create_tx_queue(txid:AsciiBuffer):TransactionQueue = {
     if ( transactions.contains(txid) ) {
-      die("transaction allready started")
+      die("transaction already started")
     } else {
       val queue = new TransactionQueue
       transactions.put(txid, queue)
@@ -1850,7 +1852,7 @@ class StompProtocolHandler extends ProtocolHandler {
   }
 
   def remove_tx_queue(txid:AsciiBuffer):TransactionQueue = {
-    transactions.remove(txid).getOrElse(die("transaction not active: %d".format(txid)))
+    transactions.remove(txid).getOrElse(die("transaction not active: %s".format(txid)))
   }
 
 }


[2/2] git commit: Lets simplify things related to APLO-324

Posted by ch...@apache.org.
Lets simplify things related to APLO-324

Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/5feb3ca5
Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/5feb3ca5
Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/5feb3ca5

Branch: refs/heads/trunk
Commit: 5feb3ca58f2d552ed5050eb12315893bac311b61
Parents: 1831367
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Fri Jan 31 11:16:36 2014 -0500
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Fri Jan 31 11:16:36 2014 -0500

----------------------------------------------------------------------
 .../activemq/apollo/stomp/StompProtocolHandler.scala   | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/5feb3ca5/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
----------------------------------------------------------------------
diff --git a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
index bf1a0ca..de90b43 100644
--- a/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
+++ b/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
@@ -950,18 +950,7 @@ class StompProtocolHandler extends ProtocolHandler {
       })
       trace("stomp protocol resources released")
 
-      val route_values = producer_routes.values().toSeq.toArray;
-      waiting_on = ()=> {
-        val routes = route_values.flatMap { route =>
-          if( route.routing_items > 0 ) {
-            Some(route.dest+"("+route.routing_items+")")
-          } else {
-            None
-          }
-        }.mkString(", ")
-        "Delivery competition to: "+routes
-      }
-
+      waiting_on = ()=> { "Producer delivery competition" }
       on_routing_empty {
         producer_routes.values().foreach{ route=>
           host.dispatch_queue {