Examples of lookupLink()


Examples of javax.naming.Context.lookupLink()

    ResolveResult r = findContextFor(name);
    Context ctx = (Context) r.getResolvedObj();
    String rname = r.getRemainingName().toString();

    // Resolve the name in its proper context
    return ctx.lookupLink(rname);
  }

  /**
   * Retrieves the parser associated with the named context.
   * In a federation of namespaces, different naming systems will
View Full Code Here

Examples of javax.naming.Context.lookupLink()

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         Object obj = ctx2.lookupLink(ObjectBinder.NAME);
         if (obj instanceof MarshalledValuePair)
            obj = ((MarshalledValuePair) obj).get();
         assertEquals(ObjectBinder.VALUE, obj);
      }
      catch (NamingException e)
View Full Code Here

Examples of javax.naming.Context.lookupLink()

    }
    Context ctx = getContext();
    try {
      Any param = parameters[0];
      if (param instanceof AnyName) {
        return Any.create(ctx.lookupLink((Name)param.toObject()));
      } else {
        return Any.create(ctx.lookupLink(param.toString()));
      }
    } catch (NamingException e) {
      throw context.exception(e);
View Full Code Here

Examples of javax.naming.Context.lookupLink()

    try {
      Any param = parameters[0];
      if (param instanceof AnyName) {
        return Any.create(ctx.lookupLink((Name)param.toObject()));
      } else {
        return Any.create(ctx.lookupLink(param.toString()));
      }
    } catch (NamingException e) {
      throw context.exception(e);
    }
  }
View Full Code Here

Examples of javax.naming.Context.lookupLink()

        Context context = EnterpriseNamingContext.createEnterpriseNamingContext(map);

        Name stringName = context.getNameParser("").parse("string");
        assertEquals(STRING_VAL, context.lookup("string"));
        assertEquals(STRING_VAL, context.lookup(stringName));
        assertEquals(STRING_VAL, context.lookupLink("string"));
        assertEquals(STRING_VAL, context.lookupLink(stringName));

        Name nestedContextStringName = context.getNameParser("").parse("nested/context/string");
        assertEquals(STRING_VAL, context.lookup("nested/context/string"));
        assertEquals(STRING_VAL, context.lookup(nestedContextStringName));
View Full Code Here

Examples of javax.naming.Context.lookupLink()

        Name stringName = context.getNameParser("").parse("string");
        assertEquals(STRING_VAL, context.lookup("string"));
        assertEquals(STRING_VAL, context.lookup(stringName));
        assertEquals(STRING_VAL, context.lookupLink("string"));
        assertEquals(STRING_VAL, context.lookupLink(stringName));

        Name nestedContextStringName = context.getNameParser("").parse("nested/context/string");
        assertEquals(STRING_VAL, context.lookup("nested/context/string"));
        assertEquals(STRING_VAL, context.lookup(nestedContextStringName));
        assertEquals(STRING_VAL, context.lookupLink("nested/context/string"));
View Full Code Here

Examples of javax.naming.Context.lookupLink()

        assertEquals(STRING_VAL, context.lookupLink(stringName));

        Name nestedContextStringName = context.getNameParser("").parse("nested/context/string");
        assertEquals(STRING_VAL, context.lookup("nested/context/string"));
        assertEquals(STRING_VAL, context.lookup(nestedContextStringName));
        assertEquals(STRING_VAL, context.lookupLink("nested/context/string"));
        assertEquals(STRING_VAL, context.lookupLink(nestedContextStringName));
    }

    public void testList() throws Exception {
        Map map = new HashMap();
View Full Code Here

Examples of javax.naming.Context.lookupLink()

        Name nestedContextStringName = context.getNameParser("").parse("nested/context/string");
        assertEquals(STRING_VAL, context.lookup("nested/context/string"));
        assertEquals(STRING_VAL, context.lookup(nestedContextStringName));
        assertEquals(STRING_VAL, context.lookupLink("nested/context/string"));
        assertEquals(STRING_VAL, context.lookupLink(nestedContextStringName));
    }

    public void testList() throws Exception {
        Map map = new HashMap();
        map.put("one", new Integer(1));
View Full Code Here

Examples of javax.naming.Context.lookupLink()

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         Object obj = ctx2.lookupLink(ObjectBinder.NAME);
         if (obj instanceof MarshalledValuePair)
            obj = ((MarshalledValuePair) obj).get();
         assertEquals(ObjectBinder.VALUE, obj);
      }
      catch (NamingException e)
View Full Code Here

Examples of javax.naming.Context.lookupLink()

          }
        }

        public Object lookupLink(String name) {
          try {
            return namingContext.lookupLink(name);
          } catch (NamingException nce) {
            throw new RuntimeException("Can't delegate naming context operation", nce);
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.