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

RemoteHomeInterfaceRmiIIOPException

public class RemoteHomeInterfaceRmiIIOPException extends com.sun.enterprise.tools.verifier.tests.ejb.homeintf.HomeMethodTest
Enterprise beans home interface methods exceptions 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 throws clause must include the java.rmi.RemoteException.

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

      
      Class[] methodExceptionTypes = method.getExceptionTypes();
      ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
      
      // The methods arguments types must be legal types for
      // RMI-IIOP.  This means that their exception values must
      // throw java.rmi.RemoteException
      // methods must also throw java.rmi.RemoteException
      if (RmiIIOPUtils.isValidRmiIIOPException(methodExceptionTypes)) {
          // this is the right exception for method, throws RemoteException
          addGoodDetails(result, compName);
          result.passed(smh.getLocalString
                  (getClass().getName() + ".passed",
                  "[ {0} ] method properly throws java.rmi.RemoteException.",
                  new Object[] {method.getName()}));
      } else {
          addErrorDetails(result, compName);
          result.failed(smh.getLocalString
                  (getClass().getName() + ".failed",
                  "Error: [ {0} ] method was found, but does not properly throw " +
                  "java.rmi.RemoteException.",
                  new Object[] {method.getName()}));
      }