Removing JNDI code from ServletContextResourceResolver
@@ -28,7 +28,6 @@ import java.net.URL;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import javax.naming.InitialContext;
import javax.servlet.ServletContext;
import org.apache.cxf.resource.ResourceResolver;
@@ -56,24 +55,6 @@ public class ServletContextResourceResolver implements ResourceResolver {
public final <T> T resolve(final String entryName, final Class<T> clz) {
- Object obj = null;
- try {
- if (entryName != null) {
- InitialContext ic = new InitialContext();
- try {
- obj = ic.lookup(entryName);
- } finally {
- ic.close();
- }
- }
- } catch (Throwable e) {
- //do nothing
- }
-
- if (obj != null && clz.isInstance(obj)) {
- return clz.cast(obj);
- }
-
if (clz.isAssignableFrom(URL.class)) {
if (urlMap.containsKey(entryName)) {
return clz.cast(urlMap.get(entryName));
