import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
import javax.naming.NameParser;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
}
// Really not found
- throw new NamingException(sm.getString("resources.notFound", name));
+ throw new NameNotFoundException(
+ sm.getString("resources.notFound", name));
}
/**
}
// Really not found
- throw new NamingException(sm.getString("resources.notFound", name));
+ throw new NameNotFoundException(
+ sm.getString("resources.notFound", name));
}
}
// Really not found
- throw new NamingException(sm.getString("resources.notFound", name));
+ throw new NameNotFoundException(
+ sm.getString("resources.notFound", name));
}
/**
import javax.naming.Binding;
import javax.naming.NameAlreadyBoundException;
import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
File file = file(name);
if (file == null)
- throw new NamingException
- (sm.getString("resources.notFound", name));
+ throw new NameNotFoundException(
+ sm.getString("resources.notFound", name));
if (!file.delete())
throw new NamingException
File file = file(oldName);
if (file == null)
- throw new NamingException
+ throw new NameNotFoundException
(sm.getString("resources.notFound", oldName));
File newFile = new File(base, newName);
File file = file(name);
if (file == null)
- throw new NamingException
+ throw new NameNotFoundException
(sm.getString("resources.notFound", name));
return new NamingContextEnumeration(list(file).iterator());
public static final String HOST = "host";
+ /**
+ * Immutable name not found exception.
+ */
+ protected static final NameNotFoundException NOT_FOUND_EXCEPTION =
+ new ImmutableNameNotFoundException();
+
+
// ----------------------------------------------------------- Constructors
/**
* The string manager for this package.
*/
- protected static final StringManager sm = StringManager.getManager(Constants.Package);
+ protected static final StringManager sm =
+ StringManager.getManager(Constants.Package);
/**
/**
- * Immutable name not found exception.
- */
- protected NameNotFoundException notFoundException =
- new ImmutableNameNotFoundException();
-
-
- /**
* Non cacheable resources.
*/
protected String[] nonCacheable = { "/WEB-INF/lib/", "/WEB-INF/classes/" };
CacheEntry entry = cacheLookup(name.toString());
if (entry != null) {
if (!entry.exists) {
- throw notFoundException;
+ throw NOT_FOUND_EXCEPTION;
}
if (entry.resource != null) {
// Check content caching.
CacheEntry entry = cacheLookup(name);
if (entry != null) {
if (!entry.exists) {
- throw notFoundException;
+ throw NOT_FOUND_EXCEPTION;
}
if (entry.resource != null) {
return entry.resource;
CacheEntry entry = cacheLookup(name.toString());
if (entry != null) {
if (!entry.exists) {
- throw notFoundException;
+ throw NOT_FOUND_EXCEPTION;
}
return entry.attributes;
}
CacheEntry entry = cacheLookup(name);
if (entry != null) {
if (!entry.exists) {
- throw notFoundException;
+ throw NOT_FOUND_EXCEPTION;
}
return entry.attributes;
}
import javax.naming.InvalidNameException;
import javax.naming.Name;
import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;
return new NamingContextEnumeration(list(entries).iterator());
Entry entry = treeLookup(name);
if (entry == null)
- throw new NamingException
+ throw new NameNotFoundException
(sm.getString("resources.notFound", name));
return new NamingContextEnumeration(list(entry).iterator());
}
default timeout configurable using the <code>asyncTimeout</code>
attribute on the connector. (pero/markt)
</fix>
+ <fix>
+ <bug>49600</bug>: Make exceptions returned by the
+ <code>ProxyDirContext</code> consistent for resources that weren't found
+ by checking the <code>DirContext</code> or the cache. Test case based on
+ a patch provided by Marc Guillemot. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">