1 23 28 29 package com.sun.enterprise.tools.verifier.tests.connector; 30 31 import java.io.File ; 32 import com.sun.enterprise.tools.verifier.Result; 33 import com.sun.enterprise.tools.verifier.Verifier; 34 import com.sun.enterprise.deployment.ConnectorDescriptor; 35 import com.sun.enterprise.tools.verifier.tests.*; 36 37 38 45 public class DefaultConnectionManagerSerializable extends ConnectorTest implements ConnectorCheck { 46 47 48 57 public Result check(ConnectorDescriptor descriptor) { 58 59 Result result = getInitializedResult(); 60 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 61 if(!descriptor.getOutBoundDefined()) 62 { 63 result.addNaDetails(smh.getLocalString 64 ("tests.componentNameConstructor", 65 "For [ {0} ]", 66 new Object [] {compName.toString()})); 67 result.notApplicable(smh.getLocalString 68 ("com.sun.enterprise.tools.verifier.tests.connector.managed.notApplicableForInboundRA", 69 "Resource Adapter does not provide outbound communication")); 70 return result; 71 } 72 73 Class c = findImplementorOf(descriptor, "javax.resource.spi.ConnectionManager"); 77 78 if (c!=null) { 79 testImplementationOf(c, "java.io.Serializable", result); 81 return result; 82 } 83 result.addErrorDetails(smh.getLocalString 85 ("tests.componentNameConstructor", 86 "For [ {0} ]", 87 new Object [] {compName.toString()})); 88 result.failed(smh.getLocalString 89 ("com.sun.enterprise.tools.verifier.tests.connector.DefaultConnectionManagerExistence.failed", 90 "Error: There is no default implementation of the [ {0} ] provided", 91 new Object [] {"javax.resource.spi.ConnectionManager"})); 92 return result; 93 } 94 } 95 | Popular Tags |