}
if (serviceInfo.originAppName != null && !serviceInfo.originAppName.isEmpty() && !"/".equals(serviceInfo.originAppName)
&& !serviceInfo.id.startsWith("global")) {
final String baseJndiName = serviceInfo.id.substring(serviceInfo.originAppName.length() + 1);
serviceInfo.aliases.add(baseJndiName);
final ContextualJndiReference ref = new ContextualJndiReference(baseJndiName);
ref.addPrefix(serviceInfo.originAppName);
bindResource(baseJndiName, ref);
}
// Update the config tree
config.facilities.resources.add(serviceInfo);