activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r658127 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region: Queue.java Topic.java
Date Tue, 20 May 2008 07:01:42 GMT
Author: rajdavies
Date: Tue May 20 00:01:42 2008
New Revision: 658127

URL: http://svn.apache.org/viewvc?rev=658127&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1717

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=658127&r1=658126&r2=658127&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Tue May 20 00:01:42 2008
@@ -424,6 +424,11 @@
         final ConnectionContext context = producerExchange.getConnectionContext();
         synchronized (sendLock) {
             if (store != null && message.isPersistent()) {
+                if (isProducerFlowControl() && context.isProducerFlowControl() )
{
+                    if (systemUsage.isSendFailIfNoSpace() && systemUsage.getStoreUsage().isFull())
{
+                        throw new javax.jms.ResourceAllocationException("Usage Manager Store
is Full");
+                    }
+                }
                 while (!systemUsage.getStoreUsage().waitForSpace(1000)) {
                     if (context.getStopping().get()) {
                         throw new IOException(

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java?rev=658127&r1=658126&r2=658127&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java
Tue May 20 00:01:42 2008
@@ -385,6 +385,11 @@
 
         if (topicStore != null && message.isPersistent()
                 && !canOptimizeOutPersistence()) {
+            if (isProducerFlowControl() && context.isProducerFlowControl() ) {
+                if (systemUsage.isSendFailIfNoSpace() && systemUsage.getStoreUsage().isFull())
{
+                    throw new javax.jms.ResourceAllocationException("Usage Manager Store
is Full");
+                }
+            }
             while (!systemUsage.getStoreUsage().waitForSpace(1000)) {
                 if (context.getStopping().get()) {
                     throw new IOException("Connection closed, send aborted.");



Mime
View raw message