activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1146720 - /activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Date Thu, 14 Jul 2011 14:00:43 GMT
Author: chirino
Date: Thu Jul 14 14:00:42 2011
New Revision: 1146720

URL: http://svn.apache.org/viewvc?rev=1146720&view=rev
Log:
Simpler commit handling.

Modified:
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

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=1146720&r1=1146719&r2=1146720&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 Jul 14 14:00:42 2011
@@ -1131,23 +1131,19 @@ class StompProtocolHandler extends Proto
     }
 
     def commit(on_complete: => Unit) = {
-
-      val uow = if( host.store!=null ) {
-        host.store.create_uow
-      } else {
-        null
-      }
-
-      queue.foreach{ _(uow) }
-      if( uow!=null ) {
+      if( host.store!=null ) {
+        val uow = host.store.create_uow
+//        println("UOW starting: "+uow.asInstanceOf[DelayingStoreSupport#DelayableUOW].uow_id)
         uow.on_complete {
+//          println("UOW completed: "+uow.asInstanceOf[DelayingStoreSupport#DelayableUOW].uow_id)
           on_complete
         }
+        queue.foreach{ _(uow) }
         uow.release
       } else {
+        queue.foreach{ _(null) }
         on_complete
       }
-
     }
 
     def rollback = {



Mime
View raw message