Package javax.naming

Examples of javax.naming.Context.lookupLink()


    public Object lookupLink(String name) throws NamingException {
        ResolveResult result = getRootURLContext(name, environment);
        Context context = (Context) result.getResolvedObj();

        try {
            return context.lookupLink(result.getRemainingName());
        } finally {
            context.close();
        }
    }
View Full Code Here


        if (name.size() == 1) {
            return lookupLink(name.get(0));
        }
        Context context = getContinuationContext(name);
        try {
            return context.lookupLink(name.getSuffix(1));
        } finally {
            context.close();
        }
    }
View Full Code Here

    public Object lookupLink(String name) throws NamingException {
        ResolveResult result = getRootURLContext(name, environment);
        Context context = (Context) result.getResolvedObj();

        try {
            return context.lookupLink(result.getRemainingName());
        } finally {
            context.close();
        }
    }
View Full Code Here

        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

        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

        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

        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

      catch (NameNotFoundException e)
      {
         Context haCtx = InitialContextFactory.getHAContext(jndiContext);
         if(haCtx == null)
            throw e;
         object = haCtx.lookupLink(binding);
      }
     
      return object;
   }
}
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.