}
private ReferenceLocationInfo buildLocationInfo(final JndiReference reference) {
final String lookupName = reference.getLookupName();
if (lookupName != null) {
final ReferenceLocationInfo location = new ReferenceLocationInfo();
location.jndiName = lookupName;
return location;
}
final String mappedName = reference.getMappedName();
if (mappedName != null && mappedName.startsWith("jndi:")) {
final ReferenceLocationInfo location = new ReferenceLocationInfo();
final String name = mappedName.substring(5);
if (name.startsWith("ext://")) {
final URI uri = URLs.uri(name);
location.jndiProviderId = uri.getHost();