bruno duarte
bruno duarte

Reputation: 33

ejb transaction rollback of application exceptions does not work

my team is having problems due to transactions that do not rollback after application exceptions. I created a configuration so that all exceptions that were subclasses of Exception would generate rollback, but the configuration did not work. Does anyone know what I did wrong? I put the fallowing configuration in ejb-jar file inside WEB-INF

<assembly-descriptor>
        <application-exception>
            <exception-class>java.lang.Exception</exception-class>
            <rollback>true</rollback>
            <inherited>true</inherited>
        </application-exception>
    </assembly-descriptor>

Upvotes: 0

Views: 306

Answers (1)

user3714601
user3714601

Reputation: 1271

The configuration you use must be included into META-INF/ejb-jar.xml, you can find and example here:

https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/cejb_app_exception.html

Upvotes: -1

Related Questions