Author: davsclaus
Date: Sat Sep  8 09:08:24 2012
New Revision: 1382255

URL: http://svn.apache.org/viewvc?rev=1382255&view=rev
Log:
AMQ-4031: Do not check for temporary journal store limit for non persistent 
broker. Thanks to Johno Crawford for the patch.

Modified:
    
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java

Modified: 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: 
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=1382255&r1=1382254&r2=1382255&view=diff
==============================================================================
--- 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
 (original)
+++ 
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
 Sat Sep  8 09:08:24 2012
@@ -1901,19 +1901,21 @@ public class BrokerService implements Se
                           " only has " + dirFreeSpace / (1024 * 1024) + " mb 
of usable space");
             }
 
-            long maxJournalFileSize;
+            if (isPersistent()) {
+                long maxJournalFileSize;
 
-            if (usage.getTempUsage().getStore() != null) {
-                maxJournalFileSize = 
usage.getTempUsage().getStore().getJournalMaxFileLength();
-            } else {
-                maxJournalFileSize = 
org.apache.kahadb.journal.Journal.DEFAULT_MAX_FILE_LENGTH;
-            }
+                if (usage.getTempUsage().getStore() != null) {
+                    maxJournalFileSize = 
usage.getTempUsage().getStore().getJournalMaxFileLength();
+                } else {
+                    maxJournalFileSize = 
org.apache.kahadb.journal.Journal.DEFAULT_MAX_FILE_LENGTH;
+                }
 
-            if (storeLimit < maxJournalFileSize) {
-                LOG.error("Temporary Store limit is " + storeLimit / (1024 * 
1024) +
-                          " mb, whilst the max journal file size for the 
temporary store is: " +
-                          maxJournalFileSize / (1024 * 1024) + " mb, " +
-                          "the temp store will not accept any data when 
used.");
+                if (storeLimit < maxJournalFileSize) {
+                    LOG.error("Temporary Store limit is " + storeLimit / (1024 
* 1024) +
+                              " mb, whilst the max journal file size for the 
temporary store is: " +
+                              maxJournalFileSize / (1024 * 1024) + " mb, " +
+                              "the temp store will not accept any data when 
used.");
+                }
             }
         }
     }


Reply via email to