Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-980

@ApplicationException inheritance

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • 3.1.x
    • None
    • None

    Description

      When @ApplicationException(rollback = true) is annotated on an exception thrown by a session bean then all is well - the client receives the exception.
      But if the annotation is moved up to a superclass of the exception then all is not well - the client receives EJBTransactionRolledbackException.

      In the app server I am porting from the following worked OK, and I believe it is the correct behaviour:

      public interface DogServiceRemote {
      void createDog(Dog dog) throws BusinessException;
      }

      @ApplicationException(rollback = true)
      abstract public class BusinessException extends Exception {
      ...
      }

      public class ValueRequiredException extends BusinessException {
      ...
      }

      where createDog(...) throws many different subclasses of BusinessException, none of which is annotated with @ApplicationException.

      Attachments

        Issue Links

          Activity

            People

              jlaskowski Jacek Laskowski
              geoffcallender Geoff Callender
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: