Package javax.naming

Examples of javax.naming.ContextNotEmptyException


      NamingContext nc = contextManager.getNamingContext(path);
      if (nc.size() > 0) {
        if (Trace.logger.isLoggable(BasicLevel.DEBUG))
          Trace.logger.log(BasicLevel.DEBUG,
                           " -> not empty: nc = " + nc);
        throw new ContextNotEmptyException();
      }
    } catch (MissingRecordException exc) {
      // else do nothing (idempotency)
      return;
    }
View Full Code Here


        } 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 {
            ne = new NamingException();
        }

        ne.setRootCause(e);
View Full Code Here

        {
            ne = new AuthenticationNotSupportedException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapContextNotEmptyException )
        {
            ne = new ContextNotEmptyException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapEntryAlreadyExistsException )
        {
            ne = new NameAlreadyBoundException( t.getLocalizedMessage() );
        }
View Full Code Here

        {
            ne = new AuthenticationNotSupportedException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapContextNotEmptyException )
        {
            ne = new ContextNotEmptyException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapEntryAlreadyExistsException )
        {
            ne = new NameAlreadyBoundException( t.getLocalizedMessage() );
        }
View Full Code Here

    public void destroySubcontext(final Name name) throws NamingException {
        final Name absoluteName = getAbsoluteName(name);
        if (!list(name).hasMore()) {
            unbind(name);
        } else {
            throw new ContextNotEmptyException(absoluteName.toString());
        }
    }
View Full Code Here

        }

        final Context context = (Context)entry;
        if( context.list( "" ).hasMoreElements() )
        {
            throw new ContextNotEmptyException( name.toString() );
        }
    }
View Full Code Here

        {
            ne = new AuthenticationNotSupportedException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapContextNotEmptyException )
        {
            ne = new ContextNotEmptyException( t.getLocalizedMessage() );
        }
        else if ( t instanceof LdapEntryAlreadyExistsException )
        {
            ne = new NameAlreadyBoundException( t.getLocalizedMessage() );
        }
View Full Code Here

            if ( ldapResult != null )
            {
                // NOT_ALLOWED_ON_NON_LEAF error (thrown when deleting an entry with children)
                if ( ResultCodeEnum.NOT_ALLOWED_ON_NON_LEAF.equals( ldapResult.getResultCode() ) )
                {
                    throw new ContextNotEmptyException( ldapResult.getDiagnosticMessage() );
                }
                // ENTRY_ALREADY_EXISTS error
                // (We need this conversion in the case where this error is thrown during an LDIF
                // import with the "Update existing entries" flag turned on)
                else if ( ResultCodeEnum.ENTRY_ALREADY_EXISTS.equals( ldapResult.getResultCode() ) )
View Full Code Here

      if (!list(name).hasMore())
      {
         unbind(name);
      }
      else
         throw new ContextNotEmptyException();
   }
View Full Code Here

      if (!list(name).hasMore())
      {
         unbind(name);
      }
      else
         throw new ContextNotEmptyException();
   }
View Full Code Here

TOP

Related Classes of javax.naming.ContextNotEmptyException

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.