Result result = getInitializedResult();
ComponentNameConstructor compName = new ComponentNameConstructor(descriptor);
boolean oneFailed = false;
SunConnector sc = descriptor.getSunDescriptor();
if(sc == null)
{
result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable1",
"NOT APPLICABLE [ASCONNECTOR]: sun-ra.xml descriptor object could not be obtained"));
}
else{
ResourceAdapter ra = sc.getResourceAdapter();
String idleTimeout = ra.getAttributeValue("idle-timeout-in-seconds");
if(idleTimeout.length()==0)
{
result.failed(smh.getLocalString(getClass().getName()+".failed1",
"FAILED [AS-CONNECTOR resource-adapter] : idle-timeout-in-seconds cannot be empty"));
}
else
{
try
{
long value = Long.valueOf(idleTimeout).longValue();
if(value < 0 || value > Long.MAX_VALUE)
{
result.failed(smh.getLocalString(getClass().getName()+".failed2",
"FAILED [AS-CONNECTOR resource-adapter] : idle-timeout-in-seconds cannot be {0}. It should be between 0 and {1}",
new Object[]{new Long(value),new Long(Long.MAX_VALUE)}));
}
else
{
result.passed(smh.getLocalString(getClass().getName()+".passed",
"PASSED [AS-CONNECTOR resource-adapter] : idle-timeout-in-seconds is {0}",
new Object[]{new Long(value)}));
}
}
catch(NumberFormatException nfex)
{
Verifier.debug(nfex);
result.failed(smh.getLocalString(getClass().getName()+".failed3",
"FAILED [AS-CONNECTOR resource-adapter] : The value {0} for idle-timeout-in-seconds is not a valid Long number",new Object[]{idleTimeout}));
}
}
}
return result;