activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1029829 - in /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker: Router.scala Sink.scala
Date Mon, 01 Nov 2010 20:53:00 GMT
Author: chirino
Date: Mon Nov  1 20:52:59 2010
New Revision: 1029829

URL: http://svn.apache.org/viewvc?rev=1029829&view=rev
Log:
Fixing session shutdown.  If a session as closed while a producer was blocked we would remain
blocked.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala?rev=1029829&r1=1029828&r2=1029829&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
Mon Nov  1 20:52:59 2010
@@ -374,6 +374,12 @@ case class DeliveryProducerRoute(val rou
       val rc = targets.contains(x.consumer)
       if( rc ) {
         debug("producer route detaching from conusmer.")
+        if( !overflowSessions.isEmpty ) {
+          overflowSessions = overflowSessions.filterNot( _ == x )
+          if( overflowSessions.isEmpty ) {
+            drainer.run
+          }
+        }
         x.close
       }
       rc

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala?rev=1029829&r1=1029828&r2=1029829&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
Mon Nov  1 20:52:59 2010
@@ -273,7 +273,10 @@ class SinkMux[T](val target:Sink[T], val
   }
 
   def close(session:Sink[T]) = {
-    session.asInstanceOf[SinkMux[T]#Session].close
+    val s = session.asInstanceOf[SinkMux[T]#Session]
+    s.producer_queue {
+      s.close
+    }
   }
 
   protected def createSession(producer_queue:DispatchQueue) = new Session(producer_queue)



Mime
View raw message