/** * Resolve the final object and wrap any non-NamingException errors in a * NamingException with the cause passed as the root cause. * @param obj - raw value obtained from the naming server * @param name - the name passed to the lookup op * @param env - the env of NamingContext that the op was called on * @return the fully resolved object * @throws NamingException */ private Object getObjectInstanceWrapFailure(Object obj, Name name, Hashtable env) throws NamingException { try { return getObjectInstance(obj, name, env); } catch (NamingException e) { throw e; } catch (Exception e) { NamingException ex = new NamingException("Could not dereference object"); ex.setRootCause(e); throw ex; } }
link = getObjectInstance(link, name, null);