It is considered best practices to use unique package names with Java code and not use default Java packages. WebLogic allows this practice for EJB classes. However, WebSphere traditional and Liberty will not deploy an EJB contained in a default Java package.
This rule flags enterprise Java beans defined in default Java packages. The Java classes are identified either from the interface it implements or by the annotations used with it.
The rule flags any class that implements one of the following EJB interfaces:
It also flags any class annotated with one of the following EJB annotations:
If analysis shows results from this rule in your application, create a uniquely named Java package to put the Java bean and its related classes. Refactor the code to move the classes to the new package. Take care to update any references from other source code or from text files such as the ejb-jar.xml.