Package javax.naming

Examples of javax.naming.NameNotFoundException


        throws NamingException {

        File file = file(name);

        if (file == null)
            throw new NameNotFoundException
                (sm.getString("resources.notFound", name));

        return new NamingContextEnumeration(list(file).iterator());

    }
View Full Code Here


        throws NamingException {
        if (name.isEmpty())
            return new NamingContextEnumeration(list(entries).iterator());
        Entry entry = treeLookup(name);
        if (entry == null)
            throw new NameNotFoundException
                (sm.getString("resources.notFound", name));
        return new NamingContextEnumeration(list(entry).iterator());
    }
View Full Code Here

      if (bpName.hasComponent()) {
        String componentId = bpName.getComponentId();
        try {
          result = blueprintContainer.getComponentInstance(componentId);
        } catch (NoSuchComponentException nsce) {
          throw new NameNotFoundException(nsce.getMessage());
        }
      } else {
        result = new BlueprintURLContext(_callersBundle, bpName, _env);
      }
    } finally {
View Full Code Here

    AbstractName target;
    try {
        target = resolveTargetName();
    } catch (GBeanNotFoundException e) {
        throw (NameNotFoundException) new NameNotFoundException("Could not resolve name query: " + abstractNameQueries).initCause(e);
    }

    Object entityManagerFactory;
    try {
        entityManagerFactory = kernel.getAttribute(target, "entityManagerFactory");
View Full Code Here

                return ejbDeployment.getEJBHome();
            } else {
                return ejbDeployment.getEJBLocalHome();
            }
        } catch (GBeanNotFoundException e) {
            throw (NameNotFoundException) new NameNotFoundException().initCause(e);
        }
    }
View Full Code Here

        }
        AbstractName containerName;
        try {
            containerName = resolveTargetName();
        } catch (GBeanNotFoundException e) {
            throw (NameNotFoundException) new NameNotFoundException("Could not resolve gbean from name query: " + abstractNameQueries).initCause(e);
        }
        Kernel kernel = getKernel();
        Object proxy;
        try {
            //TODO configid objectname might well be wrong kind of thing.
View Full Code Here

            }
         }
      }
      else if (obj == null)
      {
         throw new NameNotFoundException("No object has been binded with the name '" + name + "'");
      }
      return obj;
   }
View Full Code Here

      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
         if (tmpObjects.remove(name) == null)
         {
            throw new NameNotFoundException("No object has been binded with the name '" + name + "'");
         }
         setBindings(tmpObjects);
      }
   }
View Full Code Here

         {
            throw new NameAlreadyBoundException("An object has already been binded with the name '" + name2 + "'");
         }
         else if ((value = tmpObjects.remove(name1)) == null)
         {
            throw new NameNotFoundException("No object has been binded with the name '" + name1 + "'");
         }
         tmpObjects.put(name2, value);
         setBindings(tmpObjects);
      }
   }
View Full Code Here

      String dsName = wsEntry.getContainer().getParameterValue(JDBCWorkspaceDataContainer.SOURCE_NAME);

      final DataSource ds = (DataSource)new InitialContext().lookup(dsName);
      if (ds == null)
      {
         throw new NameNotFoundException("Data source " + dsName + " not found");
      }

      Connection jdbcConn = SecurityHelper.doPrivilegedSQLExceptionAction(new PrivilegedExceptionAction<Connection>()
      {
         public Connection run() throws Exception
View Full Code Here

TOP

Related Classes of javax.naming.NameNotFoundException

Copyright © 2018 www.massapicom. 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.