Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 17787 invoked from network); 3 Feb 2008 16:17:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Feb 2008 16:17:42 -0000 Received: (qmail 91368 invoked by uid 500); 3 Feb 2008 16:17:33 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 91347 invoked by uid 500); 3 Feb 2008 16:17:33 -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 91338 invoked by uid 99); 3 Feb 2008 16:17:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2008 08:17:33 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2008 16:17:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JLhWp-0000bB-7Z for users@activemq.apache.org; Sun, 03 Feb 2008 08:17:11 -0800 Message-ID: <15254969.post@talk.nabble.com> Date: Sun, 3 Feb 2008 08:17:11 -0800 (PST) From: kawasaki To: users@activemq.apache.org Subject: Manual XA transaction management MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: xenhalflife@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hello all, I am trying to do the following: -the action of receiving the JMS message to participate in XA transaction (I want receive via MessageListener.onMessage to be atomic with save in Xa capable database; receive message and save it in my cusomt database). I have scanned AMQ source code, test cases and so on, have googled but cant figure out how to do this, and if this is actually possible. Here are detailed thoughts: I need to manually control transaction, so I will manuall call begin() and commit() of the UserTransaction object. So if one would be doing this in typical web app scenario, such as simple Tomcat deployment, thread started by Tomcat upon receiving request would call some method I define, and that method would contain manual transaction logic. When using AMQ same would happen if using asynchronous delivery (onMessage), client side part of AMQ would call from his thread onMessage() method of my listener. The things I cant figure out, is how to inject manual begin() and end() of transaction in this case, since when AMQ cliend side thread call onMessage(), I assume transaction is already started. If I put begin() in onMessage method, it seems it violated tx semantics, at least to me with my current limited knowledge on this matter. I am really confused about this part now, and would really appreciate any links/tips how to figure out how this works. Thanks in advance -- View this message in context: http://www.nabble.com/Manual-XA-transaction-management-tp15254969s2354p15254969.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.