Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 91930 invoked from network); 23 Apr 2008 17:46:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 17:46:40 -0000 Received: (qmail 2050 invoked by uid 500); 23 Apr 2008 17:46:41 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 2020 invoked by uid 500); 23 Apr 2008 17:46:41 -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 2009 invoked by uid 99); 23 Apr 2008 17:46:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 10:46:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 17:46:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F34B61A9832; Wed, 23 Apr 2008 10:46:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r650956 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java Date: Wed, 23 Apr 2008 17:46:12 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080423174615.F34B61A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Wed Apr 23 10:46:05 2008 New Revision: 650956 URL: http://svn.apache.org/viewvc?rev=650956&view=rev Log: synchronize the asyncWrite method. To avoid the following reported stack trace: Running org.apache.activemq.broker.region.cursors.CursorDurableTest Exception in thread "Persistence Adaptor Task" java.lang.NullPointerException at org.apache.activemq.store.amq.AMQMessageStore$4.execute(AMQMessageStore.java:381) at org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:44) at org.apache.activemq.store.amq.AMQMessageStore.doAsyncWrite(AMQMessageStore.java:374) at org.apache.activemq.store.amq.AMQMessageStore.asyncWrite(AMQMessageStore.java:341) at org.apache.activemq.store.amq.AMQMessageStore$1.iterate(AMQMessageStore.java:95) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 303.672 sec <<< FAILURE! Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java?rev=650956&r1=650955&r2=650956&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQMessageStore.java Wed Apr 23 10:46:05 2008 @@ -328,7 +328,7 @@ * @return * @throws IOException */ - void asyncWrite() { + synchronized void asyncWrite() { try { CountDownLatch countDown; lock.lock();