Test if the default implementation of the javax.resource.spi.ConnectionManager
provided implements the java.io.Serializable interface
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
if(!descriptor.getOutBoundDefined())
{
result.addNaDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.notApplicable(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA",
"Resource Adapter does not provide outbound communication"));
return result;
}
// let's get first the the default implementation of the ConnectionManager
//File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());
// File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
Class c = findImplementorOf(descriptor, "javax.resource.spi.ConnectionManager");
if (c!=null) {
// We found it, let's see if it implements the right interface
testImplementationOf(c, "java.io.Serializable", result);
return result;
}
// ooppss, no implementation of the default Connection Manager
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.connector.DefaultConnectionManagerExistence.failed",
"Error: There is no default implementation of the [ {0} ] provided",
new Object[] {"javax.resource.spi.ConnectionManager"}));
return result;