private Map createResource (String[] resourcesNames, IBatchProcessor ibProcessor) throws IOException {
Map resources = new HashMap();
String type = null;
Parameters parameters = ibProcessor.getProcessosParameters();
Record resourceConfigParams = new Record();
String resourceName;
StringBuffer resourceFullName = new StringBuffer();
try {
for (int i = 0; i < resourcesNames.length; i++) {
resourceName = resourcesNames[i];
resourceFullName.append("resource.").append(resourceName).append(".");
type = parameters.getString(resourceFullName + "type");
Logger _logger = Logger.getDefault().getWrapper();
resourceConfigParams.setValue("loggerInstance", _logger);
Vector properties = parameters.getVector(resourceFullName + "properties");
for (int j = 0; j < properties.size(); j++) {
String name = (String) properties.get(j);
String value = parameters.getString(resourceFullName + name);
if (value == null) continue;
resourceConfigParams.setValue(name, value);
}
Class newClass = Class.forName(type);
Resource res = (Resource) newClass.newInstance();
res.setId(resourceName);