Version 3

    Why doesn't
    CreateException
    rollback the transaction?

     

    Because

    javax.ejb.CreateException

    is an application exception. It extends

    java.lang.Exception

    . The container only rollsback for "system" exceptions. i.e. those that extend

    java.rmi.RemoteException

    ,

    java.lang.RuntimeException

    (like

    javax.ejb.EJBException

    ) and

    java.lang.Error

    .

     

    See the ejb spec for more information.

     

    javadoc for CreateException