private static synchronized void initStreamHandlerFactory() { // Register a stream handler factory for the JNDI protocol URLStreamHandlerFactory streamHandlerFactory = new DirContextURLStreamHandlerFactory(); synchronized (WebappLoader.class) { if (first) { first = false; try { URL.setURLStreamHandlerFactory(streamHandlerFactory); } catch (Exception e) { // Log and continue anyway, this is not critical log.log(Level.SEVERE, LogFacade.REGISTERING_JNDI_STREAM_HANDLER_EXCEPTION, e); } catch (Throwable t) { // This is likely a dual registration if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Dual registration of jndi stream handler: " + t.getMessage()); } } } } }
DirContextURLStreamHandlerFactory.getInstance(); if (first) { first = false;
DirContextURLStreamHandlerFactory.getInstance(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;
new DirContextURLStreamHandlerFactory(); if (first) { first = false;