Starting with the Java EE 6.0 specification, application exceptions are inherited by subclass exception classes by default.
This behavior is configurable on the @ApplicationException annotation or in the
<application-exception>
element of an ejb-jar.xml file.
This rule flags the javax.ejb.ApplicationException annotation if it does not have a defined inherited attribute,
and it flags the <application-exception> element in an ejb-jar.xml file
that does not have a defined inherited element.
@ApplicationException annotation:
In Java EE 5.0, ExceptionB is not considered an ApplicationException, but in Java EE 6.0
ExceptionB is an ApplicationException because it extends from the ExceptionA class.
Java EE 6.0 added the inherited attribute with default value of true,
so all inherited classes are also ApplicationException.
You can preserve the Java EE 5.0 behavior in the following ways:
inherited = false to the annotation.inherited
sub-element of the application-exception element to false. If you have an existing
version 3.0 deployment descriptor, you must migrate to a version 3.1 deployment descriptor and XSD schema
and set the inherited sub-element of the application-exception element to false.com.ibm.websphere.ejbcontainer.EE5Compatibility to maintain Java EE 5 compatibility.For more information, see the following resources: