return newResource;
}
private CustomResource createConfigBean(Resources param, Properties properties) throws PropertyVetoException,
TransactionFailure {
CustomResource newResource = param.createChild(CustomResource.class);
newResource.setJndiName(jndiName);
newResource.setFactoryClass(factoryClass);
newResource.setResType(resType);
newResource.setEnabled(enabled);
if (description != null) {
newResource.setDescription(description);
}
if (properties != null) {
for (Map.Entry e : properties.entrySet()) {
Property prop = newResource.createChild(Property.class);
prop.setName((String) e.getKey());
prop.setValue((String) e.getValue());
newResource.getProperty().add(prop);
}
}
return newResource;
}