ejb3/src/main/java/org/jboss/as/ejb3/util/EjbValidationsUtil.java
public static Collection<MdbValidityStatus> assertEjbClassValidity(final ClassInfo mdbClass)
            throws DeploymentUnitProcessingException {
        Collection<MdbValidityStatus> mdbComplianceIssueList = new ArrayList<>(MdbValidityStatus.values().length);
        final String className = mdbClass.name().toString();
        verifyModifiers(className, mdbClass.flags(), mdbComplianceIssueList);
        for (MethodInfo method : mdbClass.methods()) {
            if ("onMessage".equals(method.name())) {
                verifyOnMessageMethod(className, method.flags(), mdbComplianceIssueList);
            }

            if ("finalize".equals(method.name())) {
                EjbLogger.DEPLOYMENT_LOGGER.mdbCantHaveFinalizeMethod(className);
                mdbComplianceIssueList.add(MdbValidityStatus.MDB_SHOULD_NOT_HAVE_FINALIZE_METHOD);
            }
        }
        return mdbComplianceIssueList;
    }
public static Collection<MdbValidityStatus> assertEjbClassValidity(final ClassInfo mdbClass)
            throws DeploymentUnitProcessingException {
        Collection<MdbValidityStatus> mdbComplianceIssueList = new ArrayList<>(MdbValidityStatus.values().length);
        final String className = mdbClass.name().toString();
        verifyModifiers(className, mdbClass.flags(), mdbComplianceIssueList);
        for (MethodInfo method : mdbClass.methods()) {
            if ("onMessage".equals(method.name())) {
                verifyOnMessageMethod(className, method.flags(), mdbComplianceIssueList);
            }

            if ("finalize".equals(method.name())) {
                EjbLogger.DEPLOYMENT_LOGGER.mdbCantHaveFinalizeMethod(className);
                mdbComplianceIssueList.add(MdbValidityStatus.MDB_SHOULD_NOT_HAVE_FINALIZE_METHOD);
            }
        }
        return mdbComplianceIssueList;
    }
public static Collection < MdbValidityStatus > assertEjbClassValidity ( final ClassInfo mdbClass ) throws DeploymentUnitProcessingException { Collection < MdbValidityStatus > mdbComplianceIssueList = new ArrayList <> ( MdbValidityStatus . values ( ) . length ) ; final String className = mdbClass . name ( ) . toString ( ) ; verifyModifiers ( className , mdbClass . flags ( ) , mdbComplianceIssueList ) ; for ( MethodInfo method : mdbClass . methods ( ) ) { if ( "onMessage" . equals ( method . name ( ) ) ) { verifyOnMessageMethod ( className , method . flags ( ) , mdbComplianceIssueList ) ; } if ( "finalize" . equals ( method . name ( ) ) ) { EjbLogger . DEPLOYMENT_LOGGER . mdbCantHaveFinalizeMethod ( className ) ; mdbComplianceIssueList . add ( MdbValidityStatus . MDB_SHOULD_NOT_HAVE_FINALIZE_METHOD ) ; } } return mdbComplianceIssueList ; }
Returns true if the passed <code>mdbClass</code> meets the requirements set by the EJB3 spec about bean implementation
classes. The passed <code>mdbClass</code> must not be an interface and must be public and not final and not abstract. If
it passes these requirements then this method returns true. Else it returns false.

@param mdbClass The MDB class
@return
@throws DeploymentUnitProcessingException
Returns true if the passed <code > mdbClass< / code > meets the requirements set by the EJB3 spec about bean implementation classes . The passed <code > mdbClass< / code > must not be an interface and must be public and not final and not abstract . If it passes these requirements then this method returns true . Else it returns false .