FileDocCategorySizeDatePackage
RemoteHomeInterfaceRmiIIOPReturn.javaAPI DocGlassfish v2 API4524Fri May 04 22:33:52 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.homeintf.remotehomeintf

RemoteHomeInterfaceRmiIIOPReturn

public class RemoteHomeInterfaceRmiIIOPReturn extends com.sun.enterprise.tools.verifier.tests.ejb.homeintf.HomeMethodTest
Enterprise beans home interface methods return type RMI-IIOP test. The following are the requirements for the enterprise Bean's home interface signature: The methods defined in this interface must follow the rules for RMI-IIOP. This means that their return values must be of valid types for RMI-IIOP.

Fields Summary
Constructors Summary
Methods Summary
protected java.lang.StringgetHomeInterfaceName(com.sun.enterprise.deployment.EjbDescriptor descriptor)

        return descriptor.getRemoteClassName();
    
protected java.lang.StringgetInterfaceType()

        return "remote";
    
protected java.lang.StringgetSuperInterface()

        return "javax.ejb.EJBHome";
    
protected voidrunIndividualHomeMethodTest(java.lang.reflect.Method method, com.sun.enterprise.deployment.EjbDescriptor descriptor, com.sun.enterprise.tools.verifier.Result result)

run an individual verifier test against a declared method of the remote interface.

param
descriptor the deployment descriptor for the bean
param
method the method to run the test on

        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        Class methodReturnType = method.getReturnType();
        
        // The methods arguments types must be legal types for
        // RMI-IIOP.  This means that their return values must
        // be of valid types for RMI-IIOP,
        if (RmiIIOPUtils.isValidRmiIIOPReturnType(methodReturnType)) {
            addGoodDetails(result, compName);
            result.passed(smh.getLocalString
                    (getClass().getName() + ".passed",
                    "[ {0} ] properly declares method with valid RMI-IIOP return type.",
                    new Object[] {method.getDeclaringClass().getName()}));
        } else {
            addErrorDetails(result, compName);
            result.failed(smh.getLocalString
                    (getClass().getName() + ".failed",
                    "Error: [ {0} ] method was found, but does not have valid " +
                    "RMI-IIOP return type.",
                    new Object[] {method.getName()}));
        }