/** * Link a name in a webapp's java:/comp/evn namespace to a pre-existing * resource. The pre-existing resource can be either in the webapp's * naming environment, or in the container's naming environment. Webapp's * environment takes precedence over the server's namespace. * * @param scope the scope of the lookup * @param asName the name to bind as * @param mappedName the name from the environment to link to asName * @throws NamingException */ public static boolean bindToENC (Object scope, String asName, String mappedName) throws NamingException { if (asName==null||asName.trim().equals("")) throw new NamingException ("No name for NamingEntry"); if (mappedName==null || "".equals(mappedName)) mappedName=asName; NamingEntry entry = lookupNamingEntry (scope, mappedName); if (entry == null) return false; entry.bindToENC(asName); return true; }
/** * Link a name in a webapp's java:/comp/evn namespace to a pre-existing * resource. The pre-existing resource can be either in the webapp's * naming environment, or in the container's naming environment. Webapp's * environment takes precedence over the server's namespace. * * @param scope the scope of the lookup * @param asName the name to bind as * @param mappedName the name from the environment to link to asName * @throws NamingException */ public static boolean bindToENC (Object scope, String asName, String mappedName) throws NamingException { if (asName==null||asName.trim().equals("")) throw new NamingException ("No name for NamingEntry"); if (mappedName==null || "".equals(mappedName)) mappedName=asName; NamingEntry entry = lookupNamingEntry (scope, mappedName); if (entry == null) return false; entry.bindToENC(asName); return true; }
/** * Link a name in a webapp's java:/comp/evn namespace to a pre-existing * resource. The pre-existing resource can be either in the webapp's * naming environment, or in the container's naming environment. Webapp's * environment takes precedence over the server's namespace. * * @param scope the scope of the lookup * @param asName the name to bind as * @param mappedName the name from the environment to link to asName * @throws NamingException */ public static boolean bindToENC (Object scope, String asName, String mappedName) throws NamingException { if (asName==null||asName.trim().equals("")) throw new NamingException ("No name for NamingEntry"); if (mappedName==null || "".equals(mappedName)) mappedName=asName; NamingEntry entry = lookupNamingEntry (scope, mappedName); if (entry == null) return false; entry.bindToENC(asName); return true; }
/** * Link a name in a webapp's java:/comp/evn namespace to a pre-existing * resource. The pre-existing resource can be either in the webapp's * naming environment, or in the container's naming environment. Webapp's * environment takes precedence over the server's namespace. * * @param scope the scope of the lookup * @param asName the name to bind as * @param mappedName the name from the environment to link to asName * @return true if bind success, false if not bound * @throws NamingException if unable to bind */ public static boolean bindToENC (Object scope, String asName, String mappedName) throws NamingException { if (asName==null||asName.trim().equals("")) throw new NamingException ("No name for NamingEntry"); if (mappedName==null || "".equals(mappedName)) mappedName=asName; NamingEntry entry = lookupNamingEntry (scope, mappedName); if (entry == null) return false; entry.bindToENC(asName); return true; }
/** * Link a name in a webapp's java:/comp/evn namespace to a pre-existing * resource. The pre-existing resource can be either in the webapp's * naming environment, or in the container's naming environment. Webapp's * environment takes precedence over the server's namespace. * * @param scope the scope of the lookup * @param asName the name to bind as * @param mappedName the name from the environment to link to asName * @throws NamingException */ public static boolean bindToENC (Object scope, String asName, String mappedName) throws NamingException { if (asName==null||asName.trim().equals("")) throw new NamingException ("No name for NamingEntry"); if (mappedName==null || "".equals(mappedName)) mappedName=asName; NamingEntry entry = lookupNamingEntry (scope, mappedName); if (entry == null) return false; entry.bindToENC(asName); return true; }
defaultNE.bindToENC(name); else throw new IllegalStateException("Nothing to bind for name " + name);
defaultNE.bindToENC(name); else throw new IllegalStateException("Nothing to bind for name "+nameInEnvironment);
defaultNE.bindToENC(name); else throw new IllegalStateException("Nothing to bind for name "+nameInEnvironment);
defaultNE.bindToENC(name); else throw new IllegalStateException("Nothing to bind for name "+nameInEnvironment);
defaultNE.bindToENC(name); else throw new IllegalStateException("Nothing to bind for name "+nameInEnvironment);