Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23C2E4BF8 for ; Mon, 9 May 2011 11:08:39 +0000 (UTC) Received: (qmail 21791 invoked by uid 500); 9 May 2011 11:08:39 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 21726 invoked by uid 500); 9 May 2011 11:08:38 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 21719 invoked by uid 99); 9 May 2011 11:08:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 11:08:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 11:08:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2D55B2388906; Mon, 9 May 2011 11:08:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1100959 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java Date: Mon, 09 May 2011 11:08:15 -0000 To: commits@activemq.apache.org From: gtully@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110509110815.2D55B2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gtully Date: Mon May 9 11:08:14 2011 New Revision: 1100959 URL: http://svn.apache.org/viewvc?rev=1100959&view=rev Log: https://issues.apache.org/jira/browse/AMQ-3305 - fix regression, only ask store for size while we are active, such that we don't get errors on stop Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java?rev=1100959&r1=1100958&r2=1100959&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java Mon May 9 11:08:14 2011 @@ -62,7 +62,9 @@ public abstract class AbstractStoreCurso } protected void resetSize() { - this.size = getStoreSize(); + if (isStarted()) { + this.size = getStoreSize(); + } this.storeHasMessages=this.size > 0; }