Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8B96972C for ; Wed, 18 Apr 2012 12:41:26 +0000 (UTC) Received: (qmail 19410 invoked by uid 500); 18 Apr 2012 12:41:26 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 19382 invoked by uid 500); 18 Apr 2012 12:41:26 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 19374 invoked by uid 99); 18 Apr 2012 12:41:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 12:41:26 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 12:41:18 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SKUBr-0002sg-UD for users@activemq.apache.org; Wed, 18 Apr 2012 05:40:55 -0700 Date: Wed, 18 Apr 2012 05:40:55 -0700 (PDT) From: Vijesh To: users@activemq.apache.org Message-ID: <1334752855918-4567577.post@n4.nabble.com> In-Reply-To: <1334747938362-4567407.post@n4.nabble.com> References: <1334747938362-4567407.post@n4.nabble.com> Subject: Re: JMS + JDBC Need your input to design a better system MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit OOPS...I think I have a solution, it got clicked only when I looked through the example programs in the activemq sdk. - I think I shouldn't use MessageListener in this case, as each message becomes atomic in that case - Use the MessageConsumer and it's receive(timeout) method, so all mesages receiving before the timeout getting elapsed, can be now put in a single JMS and DB transaction, and the transaction can be committed each time this time out elapses. - Also this can be implemented for a threshold message count, which can be a member variable getting incremented, once the threshold reaches, the transaction commit can be triggered. That sounds a good approach, at the same time please let me know if you guys having a better plan. -- View this message in context: http://activemq.2283324.n4.nabble.com/JMS-JDBC-Need-your-input-to-design-a-better-system-tp4567407p4567577.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.