Properties names defined in the resource adapter config-propery should
be unique per resource adapter
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
Set properties = descriptor.getConfigProperties();
Iterator iterator = properties.iterator();
// let's add the propery name
HashSet<String> hs = new HashSet<String>();
while (iterator.hasNext()) {
EnvironmentProperty ep = (EnvironmentProperty) iterator.next();
if (hs.add(ep.getName())==false) {
// duplicate name...
result.addErrorDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.failed(smh.getLocalString(getClass().getName() + ".failed",
"Error: More than one propery has a duplicate name [ {0} ] in the deployment descriptors",
new Object[] {ep.getName()}));
return result;
}
}
// success
result.addGoodDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.passed(smh.getLocalString(getClass().getName() + ".passed",
"There are no config properties with a duplicate name"));
return result;