Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-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 0D24A9F5A for ; Sat, 12 Nov 2011 12:19:16 +0000 (UTC) Received: (qmail 25934 invoked by uid 500); 12 Nov 2011 12:19:15 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 25898 invoked by uid 500); 12 Nov 2011 12:19:15 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 25890 invoked by uid 99); 12 Nov 2011 12:19:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2011 12:19:15 +0000 X-ASF-Spam-Status: No, hits=-1999.9 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD,URI_HEX X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Nov 2011 12:19:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8A98A56C73 for ; Sat, 12 Nov 2011 12:18:51 +0000 (UTC) Date: Sat, 12 Nov 2011 12:18:51 +0000 (UTC) From: "Preben Asmussen (Commented) (JIRA)" To: dev@camel.apache.org Message-ID: <1382505569.24095.1321100331569.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <461067437.20960.1321015611619.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4668) JpaConsumer - Should rollback if processing of an exchange failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149055#comment-13149055 ] Preben Asmussen commented on CAMEL-4668: ---------------------------------------- @Claus Regarding the jmx statistics I added this to your test: MBeanServer mBeanServer = context.getManagementStrategy().getManagementAgent().getMBeanServer(); Set objNameSet = mBeanServer.queryNames(new ObjectName("org.apache.camel:type=routes,name=\"foo\",*"), null); ObjectName managedObjName = new ArrayList(objNameSet).get(0); Long exchangesCompleted = (Long) mBeanServer.invoke(managedObjName, "getExchangesCompleted", null, null); Long exchangesFailed = (Long) mBeanServer.invoke(managedObjName, "getExchangesFailed", null, null); assertTrue("Should be 0 since they are rolled back, was : " + exchangesCompleted, 0 == exchangesCompleted); assertTrue("Should be >=2, was: " + exchangesFailed , exchangesFailed >= 2); Now the test fails since there are completed exchanges. Shouldn't the jmx statistics reflect that the exchange actual did not complete (rolled back) as the test implies ? > JpaConsumer - Should rollback if processing of an exchange failed > ----------------------------------------------------------------- > > Key: CAMEL-4668 > URL: https://issues.apache.org/jira/browse/CAMEL-4668 > Project: Camel > Issue Type: Bug > Components: camel-jpa > Affects Versions: 2.7.4, 2.8.2 > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Fix For: 2.7.5, 2.8.3, 2.9.0 > > > If a JPA consumer pickup X messages and then one of those messages fails to be processed and throws an exception, then the JPA consumer should detect this and mark the TX as rollback. > Currently there is a flaw which causes the JPA consumer to commit the batch. > See nabble > http://camel.465427.n5.nabble.com/Misleading-jmx-statistics-on-jpa-component-tp4960503p4960503.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira