From commits-return-16633-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Thu Jul 14 14:01:07 2011 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 0D6297B87 for ; Thu, 14 Jul 2011 14:01:07 +0000 (UTC) Received: (qmail 35139 invoked by uid 500); 14 Jul 2011 14:01:07 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 35071 invoked by uid 500); 14 Jul 2011 14:01:06 -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 35053 invoked by uid 99); 14 Jul 2011 14:01:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jul 2011 14:01:06 +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; Thu, 14 Jul 2011 14:01:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 57BC62388980 for ; Thu, 14 Jul 2011 14:00:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1146720 - /activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala Date: Thu, 14 Jul 2011 14:00:43 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110714140043.57BC62388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Thu Jul 14 14:00:42 2011 New Revision: 1146720 URL: http://svn.apache.org/viewvc?rev=1146720&view=rev Log: Simpler commit handling. Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1146720&r1=1146719&r2=1146720&view=diff ============================================================================== --- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala (original) +++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala Thu Jul 14 14:00:42 2011 @@ -1131,23 +1131,19 @@ class StompProtocolHandler extends Proto } def commit(on_complete: => Unit) = { - - val uow = if( host.store!=null ) { - host.store.create_uow - } else { - null - } - - queue.foreach{ _(uow) } - if( uow!=null ) { + if( host.store!=null ) { + val uow = host.store.create_uow +// println("UOW starting: "+uow.asInstanceOf[DelayingStoreSupport#DelayableUOW].uow_id) uow.on_complete { +// println("UOW completed: "+uow.asInstanceOf[DelayingStoreSupport#DelayableUOW].uow_id) on_complete } + queue.foreach{ _(uow) } uow.release } else { + queue.foreach{ _(null) } on_complete } - } def rollback = {