FileDocCategorySizeDatePackage
InteractionSpecSerializable.javaAPI DocGlassfish v2 API4750Fri May 04 22:33:30 BST 2007com.sun.enterprise.tools.verifier.tests.connector.cci

InteractionSpecSerializable

public class InteractionSpecSerializable extends ConnectionFactoryTest implements com.sun.enterprise.tools.verifier.tests.connector.ConnectorCheck
Test whether the implementation of the InteractionSpec interface also implements the Serializable interface
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
public Resultcheck(com.sun.enterprise.deployment.ConnectorDescriptor descriptor)

Test if the javax.resource.cci.InterfactionSpec implementation provided in the rar file also implements the java.io.Serializable interface

paramm
descriptor deployment descriptor for the rar file
return
result object containing the result of the individual test performed

                
        Result result = getInitializedResult();
	ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        
        if (isCCIImplemented(descriptor, result)) {
            //File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());
//            File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
            Class is = findImplementorOf(descriptor, "javax.resource.cci.InteractionSpec");
            if (is !=null) {
                testImplementationOf(is, "java.io.Serializable", result);
                return result;
            } else {
		result.addNaDetails(smh.getLocalString
				  ("tests.componentNameConstructor",
				   "For [ {0} ]",
				   new Object[] {compName.toString()}));
                result.notApplicable(smh.getLocalString
    	            ("com.sun.enterprise.tools.verifier.tests.connector.cci.InteractionSpecJavaBeansCompliance.nonexist",
                    "Error: While the CCI interfaces are implemented, the javax.resource.cci.InteractionSpec is not"));         
                return result;            
            }
        } else {
	    result.addNaDetails(smh.getLocalString
				  ("tests.componentNameConstructor",
				   "For [ {0} ]",
				   new Object[] {compName.toString()}));
	    result.notApplicable(smh.getLocalString
    	        ("com.sun.enterprise.tools.verifier.tests.connector.cci.InteractionExistence.notapp",
                 "NotApplicable : The CCI interfaces do not seem to be implemented by this resource adapter"));                    
        }
        return result;