"Could not find admin-ojbect-interface names (resTypes) from ConnectorRuntime for resource adapter.", cre);
String msg = localStrings.getLocalString(
"admin.mbeans.rmb.null_ao_intf",
"Resource Adapter {0} does not contain any resource type for admin-object. Please specify another res-adapter.",
raName) + " " + cre.getLocalizedMessage();
return new ResourceStatus(ResourceStatus.FAILURE, msg);
}
if (resTypes == null || resTypes.length <= 0) {
String msg = localStrings.getLocalString("admin.mbeans.rmb.null_ao_intf",
"Resource Adapter {0} does not contain any resource type for admin-object. Please specify another res-adapter.", raName);
return new ResourceStatus(ResourceStatus.FAILURE, msg);
}
int count = 0;
for (int i = 0; i < resTypes.length; i++) {
if (resTypes[i].equals(resType)) {
isValidAdminObject = true;
count++;
}
}
if(count > 1){
String msg = localStrings.getLocalString(
"admin.mbeans.rmb.multiple_admin_objects.found.for.restype",
"Need to specify admin-object classname parameter (--classname) as multiple admin objects " +
"use this resType [ {0} ]", resType);
return new ResourceStatus(ResourceStatus.FAILURE, msg);
}
}else{
try{
isValidAdminObject = connectorRuntime.hasAdminObject(raName, resType, className);
} catch (ConnectorRuntimeException cre) {
Logger.getLogger(AdminObjectManager.class.getName()).log(Level.SEVERE,
"Could not find admin-object-interface names (resTypes) and admin-object-classnames from " +
"ConnectorRuntime for resource adapter.", cre);
String msg = localStrings.getLocalString(
"admin.mbeans.rmb.ao_intf_impl_check_failed",
"Could not determine admin object resource information of Resource Adapter [ {0} ] for" +
"resType [ {1} ] and classname [ {2} ] ",
raName, resType, className) + " " + cre.getLocalizedMessage();
return new ResourceStatus(ResourceStatus.FAILURE, msg);
}
}
if (!isValidAdminObject) {
String msg = localStrings.getLocalString("admin.mbeans.rmb.invalid_res_type",
"Invalid Resource Type: {0}", resType);
return new ResourceStatus(ResourceStatus.FAILURE, msg);
}
return new ResourceStatus(ResourceStatus.SUCCESS, "");
}