/** * 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; }
public static void bindToENC () throws NamingException { Transaction txEntry = (Transaction)NamingEntryUtil.lookupNamingEntry(null, Transaction.USER_TRANSACTION); if ( txEntry != null ) { txEntry.bindToComp(); } else { throw new NameNotFoundException( USER_TRANSACTION + " not found" ); } }
public static void bindToENC () throws NamingException { Transaction txEntry = (Transaction)NamingEntryUtil.lookupNamingEntry(null, Transaction.USER_TRANSACTION); if ( txEntry != null ) { txEntry.bindToComp(); } else { throw new NameNotFoundException( USER_TRANSACTION + " not found" ); } }
public static void bindToENC () throws NamingException { Transaction txEntry = (Transaction)NamingEntryUtil.lookupNamingEntry(null, Transaction.USER_TRANSACTION); if ( txEntry != null ) { txEntry.bindToComp(); } else { throw new NameNotFoundException( USER_TRANSACTION + " not found" ); } }
public static void bindToENC () throws NamingException { Transaction txEntry = (Transaction)NamingEntryUtil.lookupNamingEntry(null, Transaction.USER_TRANSACTION); if ( txEntry != null ) { txEntry.bindToComp(); } else { throw new NameNotFoundException( USER_TRANSACTION + " not found" ); } }
public static void bindToENC () throws NamingException { Transaction txEntry = (Transaction)NamingEntryUtil.lookupNamingEntry(null, Transaction.USER_TRANSACTION); if ( txEntry != null ) { txEntry.bindToComp(); } else { throw new NameNotFoundException( USER_TRANSACTION + " not found" ); } }
NamingEntry ne = NamingEntryUtil.lookupNamingEntry(scope, name); NamingEntry defaultNE = NamingEntryUtil.lookupNamingEntry(context.getServer(), nameInEnvironment); if (defaultNE==null) defaultNE = NamingEntryUtil.lookupNamingEntry(null, nameInEnvironment);
NamingEntry ne = NamingEntryUtil.lookupNamingEntry(scope, name); NamingEntry defaultNE = NamingEntryUtil.lookupNamingEntry(context.getServer(), nameInEnvironment); if (defaultNE==null) defaultNE = NamingEntryUtil.lookupNamingEntry(null, nameInEnvironment);
NamingEntry ne = NamingEntryUtil.lookupNamingEntry(scope, name); NamingEntry defaultNE = NamingEntryUtil.lookupNamingEntry(context.getServer(), nameInEnvironment); if (defaultNE==null) defaultNE = NamingEntryUtil.lookupNamingEntry(null, nameInEnvironment);
NamingEntry ne = NamingEntryUtil.lookupNamingEntry(scope, name); NamingEntry defaultNE = NamingEntryUtil.lookupNamingEntry(context.getServer(), nameInEnvironment); if (defaultNE==null) defaultNE = NamingEntryUtil.lookupNamingEntry(null, nameInEnvironment);
NamingEntry ne = NamingEntryUtil.lookupNamingEntry(scope, name); NamingEntry defaultNE = NamingEntryUtil.lookupNamingEntry(context.getServer(), nameInEnvironment); if (defaultNE==null) defaultNE = NamingEntryUtil.lookupNamingEntry(null, nameInEnvironment);