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