@SuppressWarnings("unchecked") @Override protected void init(Hashtable<?,?> environment) throws NamingException { // the jdk initial context already worked out the env, no need to do it again myProps = (Hashtable<Object, Object>) environment; if (myProps != null && myProps.get(Context.INITIAL_CONTEXT_FACTORY) != null) { // user has specified initial context factory; try to get it getDefaultInitCtx(); } }
@Override protected Context getURLOrDefaultInitCtx(String name) throws NamingException { String scheme = getURLScheme(name); if (scheme != null && !scheme.equals("java")) { ObjectFactory factory = urlContextFactories.get(scheme); if (factory != null) { try { return (Context) factory.getObjectInstance(null, null, null, myProps); }catch(NamingException e) { throw e; } catch (Exception e) { NamingException n = new NamingException(e.getMessage()); n.initCause(e); throw n; } } else { Context ctx = delegate.getInitialContext(myProps); if(ctx!=null) { return ctx; } } } return getDefaultInitCtx(); }
@Override protected Context getURLOrDefaultInitCtx(Name name) throws NamingException { if (name.size() > 0) { return getURLOrDefaultInitCtx(name.get(0)); } return getDefaultInitCtx(); }
@SuppressWarnings("unchecked") @Override protected void init(Hashtable<?,?> environment) throws NamingException { // the jdk initial context already worked out the env, no need to do it again myProps = (Hashtable<Object, Object>) environment; if (myProps != null && myProps.get(Context.INITIAL_CONTEXT_FACTORY) != null) { // user has specified initial context factory; try to get it getDefaultInitCtx(); } }
@SuppressWarnings("unchecked") @Override protected void init(Hashtable<?,?> environment) throws NamingException { // the jdk initial context already worked out the env, no need to do it again myProps = (Hashtable<Object, Object>) environment; if (myProps != null && myProps.get(Context.INITIAL_CONTEXT_FACTORY) != null) { // user has specified initial context factory; try to get it getDefaultInitCtx(); } }
@Override protected Context getURLOrDefaultInitCtx(Name name) throws NamingException { if (name.size() > 0) { return getURLOrDefaultInitCtx(name.get(0)); } return getDefaultInitCtx(); }
@Override protected Context getURLOrDefaultInitCtx(Name name) throws NamingException { if (name.size() > 0) { return getURLOrDefaultInitCtx(name.get(0)); } return getDefaultInitCtx(); }
@Override protected Context getURLOrDefaultInitCtx(String name) throws NamingException { String scheme = getURLScheme(name); if (scheme != null && !scheme.equals("java")) { ObjectFactory factory = urlContextFactories.get(scheme); if (factory != null) { try { return (Context) factory.getObjectInstance(null, null, null, myProps); }catch(NamingException e) { throw e; } catch (Exception e) { NamingException n = new NamingException(e.getMessage()); n.initCause(e); throw n; } } else { Context ctx = delegate.getInitialContext(myProps); if(ctx!=null) { return ctx; } } } return getDefaultInitCtx(); }
@Override protected Context getURLOrDefaultInitCtx(String name) throws NamingException { String scheme = getURLScheme(name); if (scheme != null && !scheme.equals("java")) { ObjectFactory factory = urlContextFactories.get(scheme); if (factory != null) { try { return (Context) factory.getObjectInstance(null, null, null, myProps); }catch(NamingException e) { throw e; } catch (Exception e) { NamingException n = new NamingException(e.getMessage()); n.initCause(e); throw n; } } else { Context ctx = delegate.getInitialContext(myProps); if(ctx!=null) { return ctx; } } } return getDefaultInitCtx(); }