Examples of NameNotFoundException


Examples of javax.naming.NameNotFoundException

      int i = name.indexOf("/");
      String tok = i == -1 ? name : name.substring(0, i);
      Object value = map.get(tok);
      if (value == null)
      {
         throw new NameNotFoundException("Name not found: " + tok);
      }
      if (value instanceof InVMContext && i != -1)
      {
         return ((InVMContext)value).lookup(name.substring(i));
      }
View Full Code Here

Examples of javax.naming.NameNotFoundException

      {
         String tok = name.substring(0, i);
         InVMContext c = (InVMContext)map.get(tok);
         if (c == null)
         {
            throw new NameNotFoundException("Context not found: " + tok);
         }
         c.unbind(name.substring(i));
      }
   }
View Full Code Here

Examples of javax.naming.NameNotFoundException

   public Object lookup(String name) throws NamingException
   {
      Object value = bindings.get(name);
      if( value == null )
         throw new NameNotFoundException(name);
      return value;
   }
View Full Code Here

Examples of javax.naming.NameNotFoundException

   public void rename(String oldName, String newName) throws NamingException
   {
      Object value = bindings.remove(oldName);
      if( value == null )
         throw new NameNotFoundException(oldName);
      bindings.put(newName, value);
   }
View Full Code Here

Examples of javax.naming.NameNotFoundException

   }

   public void unbind(String name) throws NamingException
   {
      if( bindings.containsKey(name) == false )
         throw new NameNotFoundException(name);
      bindings.remove(name);
   }
View Full Code Here

Examples of javax.naming.NameNotFoundException

      {
         log.trace("Returned results size: "+ (rsp != null ? rsp.size() : 0));
      }
      if (rsp == null || rsp.size() == 0)
      {
         NameNotFoundException nnfe2 = new NameNotFoundException(name.toString());
         nnfe2.setRootCause(cause);
         throw nnfe2;
      }

      for (int i = 0; i < rsp.size(); i++)
      {
View Full Code Here

Examples of javax.naming.NameNotFoundException

        try {
            InitialContext ctx = new InitialContext(p);
            Object value = ctx.lookup(deploymentId);
            return value;
        } catch (NamingException e) {
            throw (NameNotFoundException) new NameNotFoundException().initCause(e);
        }
    }
View Full Code Here

Examples of javax.naming.NameNotFoundException

        {
            value = tryBindCorbaName(name);
        }

        if (value == null) {
            NameNotFoundException notFound = new NameNotFoundException(name.length() == 0 ? formatEmptyName() : name);
            if (!quiet) {
                NameServiceLog.getInstance().warnNameNotFound(logContext, notFound);
            }
            throw notFound;
        } else {
View Full Code Here

Examples of javax.naming.NameNotFoundException

            nb.cacheTimeout = System.currentTimeMillis() + lookupCacheTimeout;
            return nb;
        }
        catch (NotFound notFound)
        {
            throw new NameNotFoundException(name);
        }
        catch (Exception ex)
        {
            throw new javax.naming.NamingException(ExceptionUtil.getStackTrace(ex));
        }
View Full Code Here

Examples of javax.naming.NameNotFoundException

              NameParser parser = ctx.getNameParser(BASE);
          Name userDN = parser.parse(BASE);

          if (userDN == (Name) null)
          // This should not happen in theory
          throw new NameNotFoundException();
          else
          userDN.addAll(parser.parse(sr.getName()));
          user.put("userDN", userDN.toString());
                   
              // Get all available attribute types and their associated values.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.