} catch (final URISyntaxException e) {
throw new OpenEJBException("Unable to parse URI parameters '" + uri + "'. URISyntaxException: " + e.getMessage());
}
if (object instanceof AbstractService) {
final AbstractService service = (AbstractService) object;
service.setId(id);
service.setType(map.remove("type"));
service.setProvider(map.remove("provider"));
service.setClassName(map.remove("class-name"));
service.setConstructor(map.remove("constructor"));
service.setFactoryName(map.remove("factory-name"));
final String cp = map.remove("classpath");
if (null != cp) {
service.setClasspath(cp);
}
if (object instanceof Resource) {
final String aliases = map.remove("aliases");
if (aliases != null) {
((Resource) object).getAliases().addAll(Arrays.asList(aliases.split(",")));
}
}
service.getProperties().putAll(map);
} else if (object instanceof Deployments) {
final Deployments deployments = (Deployments) object;
deployments.setDir(map.remove("dir"));
deployments.setFile(map.remove("jar"));
final String cp = map.remove("classpath");