1 23 package com.sun.enterprise.tools.verifier.tests.ejb.homeintf.remotehomeintf; 24 25 import com.sun.enterprise.tools.verifier.tests.ejb.homeintf.HomeMethodTest; 26 import com.sun.enterprise.tools.verifier.tests.ejb.RmiIIOPUtils; 27 import com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor; 28 import com.sun.enterprise.tools.verifier.Result; 29 import com.sun.enterprise.deployment.EjbDescriptor; 30 31 import java.lang.reflect.Method ; 32 33 44 public class RemoteHomeInterfaceRmiIIOPException extends HomeMethodTest { 45 46 55 protected void runIndividualHomeMethodTest( Method method,EjbDescriptor descriptor, Result result) { 56 57 Class [] methodExceptionTypes = method.getExceptionTypes(); 58 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 59 60 if (RmiIIOPUtils.isValidRmiIIOPException(methodExceptionTypes)) { 65 addGoodDetails(result, compName); 67 result.passed(smh.getLocalString 68 (getClass().getName() + ".passed", 69 "[ {0} ] method properly throws java.rmi.RemoteException.", 70 new Object [] {method.getName()})); 71 } else { 72 addErrorDetails(result, compName); 73 result.failed(smh.getLocalString 74 (getClass().getName() + ".failed", 75 "Error: [ {0} ] method was found, but does not properly throw " + 76 "java.rmi.RemoteException.", 77 new Object [] {method.getName()})); 78 } 79 } 80 protected String getHomeInterfaceName(EjbDescriptor descriptor) { 81 return descriptor.getRemoteClassName(); 82 } 83 84 protected String getInterfaceType() { 85 return "remote"; 86 } 87 88 protected String getSuperInterface() { 89 return "javax.ejb.EJBHome"; 90 } 91 } 92 | Popular Tags |