Package javax.naming

Examples of javax.naming.CannotProceedException


  }

  public void testGetContinuationContext_OBJ_name_null_h()
      throws NamingException {
    log.setMethod("testGetContinuationContext_OBJ_name_null_h()");
    CannotProceedException cpe = new CannotProceedException();
    cpe.setResolvedObj("resolved object");
    cpe.setAltName(new CompositeName("abc/abc"));
    Hashtable<String, String> h = new Hashtable<String, String>();
    h
        .put(Context.OBJECT_FACTORIES,
            "org.apache.harmony.jndi.tests.javax.naming.spi.NamingManagerTest$MockContextObjectFactory");
    cpe.setEnvironment(h);
    Context r = NamingManager.getContinuationContext(cpe);
    assertTrue(r instanceof MockContext);
  }
View Full Code Here


  }

  public void testGetContinuationContext_OBJ_name_context_null()
      throws NamingException {
    log.setMethod("testGetContinuationContext_OBJ_name_context_null()");
    CannotProceedException cpe = new CannotProceedException();
    Object obj = "resolved object";
    cpe.setResolvedObj(obj);
    CompositeName altName = new CompositeName("abc/abc");
    cpe.setAltName(altName);
    MockContext context = new MockContext(new Hashtable<String, Object>());
    cpe.setAltNameCtx(context);
    try {
      NamingManager.getContinuationContext(cpe);
      fail();
    } catch (CannotProceedException e) {
      assertCPE(cpe, altName, context, null, e, obj);
View Full Code Here

            } else if (ctx instanceof Reference)
            {
               // Federation
               if (((Reference)ctx).get("nns") != null)
               {
                  CannotProceedException cpe = new CannotProceedException();
                  cpe.setResolvedObj(ctx);
                  cpe.setRemainingName(name.getSuffix(1));
                  throw cpe;
               } else
               {
                  throw new NotContextException();
               }
View Full Code Here

         } else if (ctx instanceof Reference)
         {
            // Federation
            if (((Reference)ctx).get("nns") != null)
            {
               CannotProceedException cpe = new CannotProceedException();
               cpe.setResolvedObj(ctx);
               cpe.setRemainingName(name.getSuffix(1));
               throw cpe;
            } else
            {
               throw new NotContextException();
            }
View Full Code Here

         } else if (ctx instanceof Reference)
         {
            // Federation
            if (((Reference)ctx).get("nns") != null)
            {
               CannotProceedException cpe = new CannotProceedException();
               cpe.setResolvedObj(ctx);
               cpe.setRemainingName(name.getSuffix(1));
               throw cpe;
            } else
            {
               throw new NotContextException();
            }
View Full Code Here

         } else if (ctx instanceof Reference)
         {
            // Federation
            if (((Reference)ctx).get("nns") != null)
            {
               CannotProceedException cpe = new CannotProceedException();
               cpe.setResolvedObj(ctx);
               cpe.setRemainingName(name.getSuffix(1));
               throw cpe;
            }
           
            result = new ResolveResult(ctx, name.getSuffix(1));
         } else
View Full Code Here

         } else if (ctx instanceof Reference)
         {
            // Federation
            if (((Reference)ctx).get("nns") != null)
            {
               CannotProceedException cpe = new CannotProceedException();
               cpe.setResolvedObj(ctx);
               cpe.setRemainingName(name.getSuffix(1));
               throw cpe;
            } else
            {
               throw new NotContextException();
            }
View Full Code Here

         } else if (ctx instanceof Reference)
         {
            // Federation
            if (((Reference)ctx).get("nns") != null)
            {
               CannotProceedException cpe = new CannotProceedException();
               cpe.setResolvedObj(ctx);
               cpe.setRemainingName(name.getSuffix(1));
               throw cpe;
            } else
            {
               throw new NotContextException();
            }
View Full Code Here

            else if (ctx instanceof Reference)
            {
               // Federation
               if (((Reference)ctx).get("nns") != null)
               {
                  CannotProceedException cpe = new CannotProceedException();
                  cpe.setResolvedObj(ctx);
                  cpe.setRemainingName(subCtxName);
                  throw cpe;
               }
               else
               {
                  ex = new NotContextException();
View Full Code Here

      if(isBinded(name)) {
        Object subCtx = getObject(name, credence);
        if(subCtx != null && subCtx instanceof NamingServer) {
          ((NamingServer)subCtx).bind(name.getSuffix(1), object, className, credence);
        } else {
          throw new CannotProceedException(name.get(0) + "is not a valid namespace.");
        }
      } else {
        throw new NameNotFoundException(name.get(0) + "is not bound.");
      }
    } else {
View Full Code Here

TOP

Related Classes of javax.naming.CannotProceedException

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.