activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r391819 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq: ActiveMQSession.java ActiveMQSessionExecutor.java
Date Wed, 05 Apr 2006 21:23:36 GMT
Author: chirino
Date: Wed Apr  5 14:23:34 2006
New Revision: 391819

URL: http://svn.apache.org/viewcvs?rev=391819&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-662

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?rev=391819&r1=391818&r2=391819&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
Wed Apr  5 14:23:34 2006
@@ -1544,7 +1544,7 @@
      * @return true - if there are unconsumed messages.
      */
     public boolean hasUncomsumedMessages() {
-        return !executor.isEmpty();
+        return executor.hasUncomsumedMessages();
     }
 
     /**

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java?rev=391819&r1=391818&r2=391819&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java
Wed Apr  5 14:23:34 2006
@@ -61,7 +61,7 @@
     }
 
     private void wakeup() {
-        if( !dispatchedBySessionPool && !messageQueue.isClosed() && messageQueue.isRunning()
&& !messageQueue.isEmpty() ) {
+        if( !dispatchedBySessionPool && hasUncomsumedMessages() ) {
             try {
                 taskRunner.wakeup();
             } catch (InterruptedException e) {
@@ -75,8 +75,8 @@
         wakeup();
     }
 
-    boolean hasUncomsumedMessages() {
-        return !messageQueue.isEmpty();
+    public boolean hasUncomsumedMessages() {
+        return !messageQueue.isClosed() && messageQueue.isRunning() && !messageQueue.isEmpty();
     }
 
     /**



Mime
View raw message