Package javax.naming

Examples of javax.naming.InvalidNameException


    */
   public void rename(String name1, String name2) throws NamingException
   {
      if (name1.isEmpty() || name2.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object value;
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
View Full Code Here


    */
   public Object lookup(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object obj = getBindings().get(name);
      if (obj instanceof Reference)
      {
         synchronized (obj)
View Full Code Here

   private void bind(String name, Object value, boolean checkIfExists) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      // Call getStateToBind for using any state factories
      value = NamingManager.getStateToBind(value, NAME_PARSER.parse(name), this, getInternalEnv());

      if (value instanceof Context)
View Full Code Here

    */
   public void unbind(String name) throws NamingException
   {
      if (name.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
         if (tmpObjects.remove(name) == null)
View Full Code Here

    */
   public void rename(String name1, String name2) throws NamingException
   {
      if (name1.isEmpty() || name2.isEmpty())
      {
         throw new InvalidNameException("Cannot bind empty name");
      }
      Object value;
      synchronized (getMutex())
      {
         Map<String, Object> tmpObjects = new HashMap<String, Object>(getBindings());
View Full Code Here

    }

    public Object lookup(String name) throws NamingException {
        Object binding = null;
        if (name == null || name.length() == 0)
            throw new InvalidNameException("name cannot be null or empty");

        if (name.equals(ACTIVE_SUBJECT))
            binding = getSubject();
        else if (name.equals(AUTHENTICATION_MGR))
            binding = getAuthenticationManager();
View Full Code Here

            }

            ne.setRemainingName(org.jboss.as.jacorb.naming.jndi.CNNameParser.cosNameToName(rest));

        } else if (e instanceof InvalidName) {
            ne = new InvalidNameException();
        } else if (e instanceof AlreadyBound) {
            ne = new NameAlreadyBoundException();
        } else if (e instanceof NotEmpty) {
            ne = new ContextNotEmptyException();
        } else {
View Full Code Here

   public void linkMembership(User user, Group g, MembershipType mt, boolean broadcast) throws Exception
   {
      if (g == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because group is null");
      }

      if (mt == null)
      {
         throw new InvalidNameException("Can not create membership record for " + user.getUserName()
            + " because membership type is null");
      }

      if (getIdentitySession().getRoleManager().getRoleType(mt.getName()) == null)
      {
View Full Code Here

        // of the workingDirectory followed by the suffix
        if ( ( suffix == null ) || ( suffix.isEmpty() ) )
        {
            String msg = I18n.err( I18n.ERR_150 );
            LOG.error( msg );
            throw new InvalidNameException( msg );
        }

        if ( !suffix.isNormalized() )
        {
            suffix.normalize( schemaManager.getNormalizerMapping() );
View Full Code Here

        {
            ne = new InvalidAttributeValueException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapInvalidDnException )
        {
            ne = new InvalidNameException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapInvalidSearchFilterException )
        {
            ne = new InvalidSearchFilterException( t.getLocalizedMessage() );
        }
View Full Code Here

TOP

Related Classes of javax.naming.InvalidNameException

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.