[ https://issues.apache.org/jira/browse/CAMEL-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149281#comment-13149281 ]
Babak Vahdat edited comment on CAMEL-4668 at 11/13/11 12:11 PM: ---------------------------------------------------------------- @Prebsen, thanks for you comment, but the patch you attached reveals exactly the same behaviour as my attached patch also does, as you added the following assertion: {code} List<?> foundSendEmails = jpaTemplate.find(SELECT_ALL_STRING); assertTrue("Expect table 3 elements in SendEmail, was: " + foundSendEmails.size(), foundSendEmails.size() == 3); {code} And this is *exactly* what I do *NOT* expect. Apparently according to what Claus said, the transaction should have been *rollbacked*. So after the routing of those 3 payloads completes the transaction through the spring's JpaTransactionManager should have been *rollbacked*, *but it's NOT*, as there're three rows on that table having the addresses 'f...@beer.org', 'b...@beer.org', and 'kab...@beer.org'. Maybe it's because of my poor english why I don't get the point. Anyone available who could explain it to me in german, or may be even better in my mother tongue persian :-) Thanks anyway. was (Author: bvahdat): @Prebsen, thanks for you comment, but the patch you attached reveals exactly the same behaviour as my attached patch also does, as you added the following assertion: {code} List<?> foundSendEmails = jpaTemplate.find(SELECT_ALL_STRING); assertTrue("Expect table 3 elements in SendEmail, was: " + foundSendEmails.size(), foundSendEmails.size() == 3); {code} And this is *exactly* what I do *NOT* expect. Apparently according to what Claus said, the transaction has been already *rollbacked*. So after the routing completes the transaction through the spring's JpaTransactionManager should have been *rollbacked*, *but it's NOT*, as there're three rows on that table having the addresses 'f...@beer.org', 'b...@beer.org', and 'kab...@beer.org'. Maybe it's because of my poor english why I don't get the point. Anyone available who could explain it to me in german, or may be even better in my mother tongue persian :-) Thanks anyway. > 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 > > Attachments: JpaTXRollbackTest.patch, JpaTXRollbackTest2.patch > > > 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