@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(); }
/** * Get an initial context instance. * * @param environment The naming environment * @return A naming context instance * @throws NamingException */ public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException { return new InitialContext(environment); } }
InitialContext.addUrlContextFactory("corbaloc", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("corbaname", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("IOR", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("iiopname", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("iiop", JBossCNCtxFactory.INSTANCE);
@Override protected Context getURLOrDefaultInitCtx(Name name) throws NamingException { if (name.size() > 0) { return getURLOrDefaultInitCtx(name.get(0)); } return getDefaultInitCtx(); }
final String componentName = resolutionContext.getComponentName(); final boolean compUsesModule = resolutionContext.isCompUsesModule(); final String scheme = org.jboss.as.naming.InitialContext.getURLScheme(lookupName); if (scheme == null) {
public void rebind(Name name, Object object) throws NamingException { final ParsedName parsedName = parse(name); final Context namespaceContext = findContext(name, parsedName); if (namespaceContext == null) super.rebind(parsedName.remaining(), object); else namespaceContext.rebind(parsedName.remaining(), object); }
public Object lookup(final Name name, boolean dereference) throws NamingException { final ParsedName parsedName = parse(name); if (parsedName.namespace() == null) { if (factory != null) { try { return ((Context) factory.getObjectInstance(null, name, this, getEnvironment())).lookup(name); }catch(NamingException e) { throw e; Context ctx = NamingManager.getURLContext(scheme, getEnvironment()); if(ctx!=null){ return ctx.lookup(name); final Context namespaceContext = findContext(name, parsedName); if (namespaceContext == null) return super.lookup(parsedName.remaining(),dereference);
@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(); }
final String componentName = resolutionContext.getComponentName(); final boolean compUsesModule = resolutionContext.isCompUsesModule(); final String scheme = org.jboss.as.naming.InitialContext.getURLScheme(lookupName); if (scheme == null) {
public void bind(Name name, Object object) throws NamingException { final ParsedName parsedName = parse(name); final Context namespaceContext = findContext(name, parsedName); if (namespaceContext == null) super.bind(parsedName.remaining(), object); else namespaceContext.bind(parsedName.remaining(), object); }
@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(); }
final String componentName = resolutionContext.getComponentName(); final boolean compUsesModule = resolutionContext.isCompUsesModule(); final String scheme = org.jboss.as.naming.InitialContext.getURLScheme(lookupName); if (scheme == null) {
/** * Get an initial context instance. * * @param environment The naming environment * @return A naming context instance * @throws NamingException */ public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException { return new InitialContext(environment); } }
InitialContext.addUrlContextFactory("corbaloc", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("corbaname", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("IOR", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("iiopname", JBossCNCtxFactory.INSTANCE); InitialContext.addUrlContextFactory("iiop", JBossCNCtxFactory.INSTANCE);
public void unbind(Name name) throws NamingException { final ParsedName parsedName = parse(name); final Context namespaceContext = findContext(name, parsedName); if (namespaceContext == null) super.unbind(parsedName.remaining()); else namespaceContext.unbind(parsedName.remaining()); }
@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(); }