aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan Cheong Tyng Huei (JIRA)" <>
Subject [jira] [Created] (ARIES-1548) JTA container managed transaction rollback not working for jaxrs endpoint
Date Sat, 07 May 2016 02:07:12 GMT
Allan Cheong Tyng Huei created ARIES-1548:

             Summary: JTA container managed transaction rollback not working for jaxrs endpoint
                 Key: ARIES-1548
             Project: Aries
          Issue Type: Bug
          Components: Transaction
         Environment: JBoss Fuse 6.2.1, JDK7
Testing environment Windows 7 x64
            Reporter: Allan Cheong Tyng Huei

Rest Endpoint

<jaxrs:server id="jaxrs" 

        <ref component-id="service1" />
        <ref component-id="serviceX" />
        <ref component-id="runtimeExceptionMapper" />

<route id="secureBridgeRoute">
    <from uri="jetty:;matchOnUriPrefix=true&amp;minThreads=8&amp;maxThreads=16"
    <transacted ref="JTA_TRANSACTION" />
    <to uri="jetty:;throwExceptionOnFailure=true"

<bean id="dao1" class="com.example.Dao1" activation="eager">
    <jpa:context unitname="PU" property="entityManager" type="TRANSACTION" />
Service bean

<bean id="service1" class="com.example.Service1" activation="eager">
    <property name="dao1" ref="dao1" />
    <property name="dao2" ref="dao2" />
    <tx:transaction method="*" value="Required" />
Service bean method pseudocode

public void create(entity1, entity2) {
When dao2 persist failed, the transaction did not get rolled back. Entity1 is inserted into
the DB.

Additional information

1) TransactionManager definition

<reference id="platformTransactionManager" interface="org.springframework.transaction.PlatformTransactionManager"
<bean id="JTA_TRANSACTION" class="org.apache.camel.spring.spi.SpringTransactionPolicy">
    <property name="transactionManager" ref="platformTransactionManager" />
    <property name="propagationBehaviorName" value="PROPAGATION_REQUIRED" />

2) My persistent unit is of type JTA and hibernate as the provider.

3) I have an ExceptionMapper, which when I look into it, the stacktrace shows the transaction
indeed is marked for rollback.

4) The service beans are not separated to another bundle.

5) Hibernate autocommit is NOT true.

This message was sent by Atlassian JIRA

View raw message