DirContext resources = context.getResources();
if (resources != null) {
String fullPath = context.getName() + path;
String hostName = context.getParent().getName();
try {
resources.lookup(path);
return new URL
("jndi", null, 0, getJNDIUri(hostName, fullPath),
new DirContextURLStreamHandler(resources));
} catch (Exception e) {
// Ignore