/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
final Object resolvedObject = resolveResult.getResolvedObj(); throw notAContextException(absoluteName.getPrefix(absoluteName.size() - resolveResult.getRemainingName().size())); return ((NamingContext)namingContext).lookup(resolveResult.getRemainingName(), dereference); } else { return namingContext.lookup(resolveResult.getRemainingName());
public Object lookup(String name) throws NamingException { ResolveResult res = getRootURLContext(name, myEnv); Context ctx = (Context)res.getResolvedObj(); try { return ctx.lookup(res.getRemainingName()); } finally { ctx.close(); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
@Override public void bind(String name, Object obj) throws NamingException { ResolveResult res = getRootURLContext(name, env); Context context = (Context) res.getResolvedObj(); try { context.bind(res.getRemainingName(), obj); } finally { context.close(); } }
return new ResolveResult(obj, suffix(lower, lookupName));
@Override public void unbind(String name) throws NamingException { ResolveResult res = getRootURLContext(name, env); Context context = (Context) res.getResolvedObj(); try { context.unbind(res.getRemainingName()); } finally { context.close(); } }
@Override protected ResolveResult createContext(String urlPrefix, String urlSuffix) throws NamingException { // get the default initial context, this should be the root (should already been initialized and not null) Context ctx = InitialContextFactoryImpl.getRootInitialContext(); if (urlSuffix.startsWith("comp/env/")) { urlSuffix = urlSuffix.substring("comp/env/".length()); } Name remainingName = NameParserImpl.DEFAULT.parse(urlSuffix); return new ResolveResult(ctx, remainingName); } }
@Override public void rebind(String name, Object obj) throws NamingException { ResolveResult res = getRootURLContext(name, env); Context context = (Context) res.getResolvedObj(); try { context.rebind(res.getRemainingName(), obj); } finally { context.close(); } }
/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
public void bind(String name, Object obj) throws NamingException { ResolveResult res = getRootURLContext(name, myEnv); Context ctx = (Context)res.getResolvedObj(); try { ctx.bind(res.getRemainingName(), obj); } finally { ctx.close(); } }
/** * This method is used by the iiop and iiopname URL Context factories. */ public static ResolveResult createUsingURL(String url, Hashtable env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable) env.clone(); } ctx._env = env; String rest = ctx.initUsingUrl(env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name // will yield its INS syntax, rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
public void rebind(String name, Object obj) throws NamingException { ResolveResult res = getRootURLContext(name, myEnv); Context ctx = (Context)res.getResolvedObj(); try { ctx.rebind(res.getRemainingName(), obj); } finally { ctx.close(); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
private static Object getUsingURL(String url, Hashtable<?,?> env) throws NamingException { ResolveResult res = getUsingURLIgnoreRest(url, env); Context ctx = (Context)res.getResolvedObj(); try { return ctx.lookup(res.getRemainingName()); } finally { ctx.close(); } }
/** * This method is used by the iiop and iiopname URL Context factories. */ @SuppressWarnings("unchecked") public static ResolveResult createUsingURL(String url, Hashtable<?,?> env) throws NamingException { CNCtx ctx = new CNCtx(); if (env != null) { env = (Hashtable<?,?>) env.clone(); } ctx._env = (Hashtable<String, java.lang.Object>)env; String rest = ctx.initUsingUrl( env != null ? (org.omg.CORBA.ORB) env.get("java.naming.corba.orb") : null, url, env); // rest is the INS name // Return the parsed form to prevent subsequent lookup // from parsing the string as a composite name // The caller should be aware that a toString() of the name, // which came from the environment will yield its INS syntax, // rather than a composite syntax return new ResolveResult(ctx, parser.parse(rest)); }
@Override public Object lookup(String name) throws NamingException { ResolveResult res = getRootURLContext(name, env); Context context = (Context) res.getResolvedObj(); try { return context.lookup(res.getRemainingName()); } finally { context.close(); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }
public void unbind(String name) throws NamingException { ResolveResult res = getRootURLContext(name, myEnv); Context ctx = (Context)res.getResolvedObj(); try { ctx.unbind(res.getRemainingName()); } finally { ctx.close(); } }
protected Object foundReferenceInsteadOfContext(final BindingNode bindingNode) throws NamingException { final Name remainingName = targetName.getSuffix(bindingNode.fullName.size()); final Object boundObject = bindingNode.binding.getObject(); checkReferenceForContinuation(remainingName, boundObject); return new ResolveResult(boundObject, remainingName); } }