Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC26410C1F for ; Fri, 5 Dec 2014 09:44:45 +0000 (UTC) Received: (qmail 97883 invoked by uid 500); 5 Dec 2014 09:44:45 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 97814 invoked by uid 500); 5 Dec 2014 09:44:45 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 97780 invoked by uid 99); 5 Dec 2014 09:44:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2014 09:44:44 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cschneider111@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-wg0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2014 09:44:18 +0000 Received: by mail-wg0-f48.google.com with SMTP id y19so418937wgg.7 for ; Fri, 05 Dec 2014 01:42:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/6odq6lnyiPjf/QiLF0hW/HBXZAdYfn8wbR882tR//U=; b=FoT5hmo5+qA92tcsaF+Z6Poq7YgH2ptOSzLv3VYvMEGhQhrEhj/9zU3i77+EDfG8bt u4c+VDVJ5c21koPNRs+Q+F73Xd44EOLv8d692ng/Cio/81XDY47JA2tQQRw3wn4nb2k7 ICA1pIF9CnfQ82QL9PleGgzH136K6aATdOonpgebWaKiK+DqKQAsGWsoBUoz23PzwdRv X2BEy9VXR8vdrCHh/DQHTpTmwYTB7+40+8UpFXHf83xZ0Lvu/NNxEV8wGUEkc6I/6t9g RMkHuEsmK3paRYEECsQy4jr3A1OzSZjK5Dkl4HJqpCVEek0IOUs4538hA4CN1+jeppvo 67Aw== X-Received: by 10.180.82.226 with SMTP id l2mr2636138wiy.61.1417772567508; Fri, 05 Dec 2014 01:42:47 -0800 (PST) Received: from [192.168.0.113] (HSI-KBW-46-223-17-135.hsi.kabel-badenwuerttemberg.de. [46.223.17.135]) by mx.google.com with ESMTPSA id l3sm44161727wje.12.2014.12.05.01.42.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 01:42:46 -0800 (PST) Sender: Christian Schneider Message-ID: <54817E15.5050709@die-schneider.net> Date: Fri, 05 Dec 2014 10:42:45 +0100 From: Christian Schneider User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: dev@cxf.apache.org Subject: Re: Cxf 2.7 JMS destination change what happens when checked exception is thrown from service impl References: <5480D4BF.7060408@die-schneider.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Honestly I am not sure about the code in getRollbackRuntimeException (in your code). Maybe Dan knows. He added the code. I was never sure how well the transactions in cxf 2 really worked. I just checked the code in CXF 3. There I decided to completely avoid rolling back transactions for request/reply. I think the reason is that the caller expects a reply. The issue is that if you roll back then the message broker will retry a number of times and then move the message to a dead letter queue. So in this case the caller would get no reply at all. This is why I decided that a request/reply will always return the exception to the caller. I have not found any materials on the net if this is the right choice. So we should discuss this here. Christian On 05.12.2014 07:33, Jason Pell wrote: > Hi Christian, > > I have added a test case to my github branch which demonstrates the session > issue and fails as a result. The session in the session holder is the > same as the session passed into the onMessage method. > > In the jms systests: > > org.apache.cxf.systest.jms.tx.JMSTransactionClientServerSameSessionTest > > Currently when it executes, a soap fault is returned immediately. What > actually should be happening is a rollback of the message occurs, and the > GreeterImplWithTransaction then flips the boolean flag > and returns a valid result. > > I have debugged this test and it fails to perform the rollback because of > this test: > > boolean trans = resourceHolder == null || > !resourceHolder.containsSession(session); > > The resourceHolder does contain the session. Where as for all other test > cases (and my own which use both websphere mq and activemq), the sessions > do not match. > > I need to understand exactly why the resource holder having the session > means trans = false.... > > Thanks > -- Christian Schneider http://www.liquid-reality.de Open Source Architect http://www.talend.com