camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Preben Asmussen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4668) JpaConsumer - Should rollback if processing of an exchange failed
Date Sat, 12 Nov 2011 12:18:51 GMT

    [ 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<ObjectName> objNameSet = mBeanServer.queryNames(new ObjectName("org.apache.camel:type=routes,name=\"foo\",*"),
null);
        ObjectName managedObjName = new ArrayList<ObjectName>(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

        

Mime
View raw message