Package javax.naming

Examples of javax.naming.NotContextException


         {
            return Collections.list(new InitialContext().list(name));
         }
         catch (NamingException e)
         {
            throw new NotContextException(ctxName+ " not a context");
         }
      }
     
      try
      {
View Full Code Here


         {
            return Collections.list(new InitialContext().listBindings(name));
         }
         catch (NamingException e)
         {
            throw new NotContextException(ctxName+ " not a context");
         }
      }
     
      try
      {
View Full Code Here

      }
     
      boolean exists = this.m_cache.getRoot().hasChild(pctx);
      if (!exists)
      {
         throw new NotContextException(name.getPrefix(size - 1).toString());
      }

      Fqn<String> newf = new Fqn<String>(pctx, Fqn.fromString(newctx));
      try
      {
View Full Code Here

      }
  
      boolean exists = this.m_cache.getRoot().hasChild(ctx);
      if (!exists)
      {
         throw new NotContextException(name.getPrefix(size - 1).toString() + " not a context");
         // note - NamingServer throws a CannotProceedException if the client attempts to bind
         //        to a Reference object having an "nns" address.  This implementation simply
         //        throws the NotContextException that's used when "nns" isn't present.
      }
      if (!rebind)
View Full Code Here

    protected void checkUnbindContext( final Name name, final Object entry )
        throws NamingException
    {
        if( !isDestroyableContext( entry ) )
        {
            throw new NotContextException( name.toString() );
        }

        final Context context = (Context)entry;
        if( context.list( "" ).hasMoreElements() )
        {
View Full Code Here

        if( 1 != name.size() )
        {
            if( !( object instanceof Context ) )
            {
                throw new NotContextException( atom.toString() );
            }

            object = ( (Context)object ).lookup( name.getSuffix( 1 ) );
        }

        if( !( object instanceof Context ) )
        {
            throw new NotContextException( name.toString() );
        }

        //((Context)object).close();
        return (Context)object;
    }
View Full Code Here

    protected DirContext checkAndCast(Context ctx) throws NamingException {
        if (!(ctx instanceof DirContext)) {
            if (ctx == null) {
                throw new NoInitialContextException();
            } else {
                throw new NotContextException(
                    "Not an instance of DirContext");
            }
        }
       
        return (DirContext) ctx;
View Full Code Here

    protected LdapContext checkAndCast(Context ctx) throws NamingException {
        if (!(ctx instanceof LdapContext)) {
            if (ctx == null) {
                throw new NoInitialContextException();
            } else {
                throw new NotContextException("Not an instance of LdapContext");
            }
        }

        return (LdapContext) ctx;
    }
View Full Code Here

    protected EventDirContext checkAndCast(Context ctx) throws NamingException {
        if (!(ctx instanceof EventDirContext)) {
            if (ctx == null) {
                throw new NoInitialContextException();
            } else {
                throw new NotContextException(
                    "Not an instance of EventDirContext");
            }
        }
       
        return (EventDirContext) ctx;
View Full Code Here

    protected EventContext checkAndCast(Context ctx) throws NamingException {
        if (!(ctx instanceof EventContext)) {
            if (ctx == null) {
                throw new NoInitialContextException();
            } else {
                throw new NotContextException(
                    "Not an instance of EventContext");
            }
        }
       
        return (EventContext) ctx;
View Full Code Here

TOP

Related Classes of javax.naming.NotContextException

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.