This rule is defined by the following XPath expression:
//ClassOrInterfaceDeclaration[ ( (./ImplementsList/ClassOrInterfaceType[ends-with(@Image,'SessionBean')]) or (./ImplementsList/ClassOrInterfaceType[ends-with(@Image,'EJBHome')]) or (./ImplementsList/ClassOrInterfaceType[ends-with(@Image,'EJBLocalObject')]) or (./ImplementsList/ClassOrInterfaceType[ends-with(@Image,'EJBLocalHome')]) or (./ExtendsList/ClassOrInterfaceType[ends-with(@Image,'EJBObject')]) ) and (./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration[ (./FieldDeclaration[@Static = 'true']) and (./FieldDeclaration[@Final = 'false']) ]) ]
Example:
public class SomeEJB extends EJBObject implements EJBLocalHome { private static int BAD_STATIC_FIELD; private static final int GOOD_STATIC_FIELD; }