0

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>

1 Answers1

-1

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

user3714601
  • 1,156
  • 9
  • 27
  • That's wrong, WEB-INF is the correct directory. That link doesn't say anything about META-INF either – Alkanshel Oct 07 '18 at 18:17
  • @Amalgovinus, in fact TS never mentioned that web module is concerned, so was the answer. But I agree that it would make sense to check out module type first. – user3714601 Oct 08 '18 at 08:59