public static Object tryNamedProxies(String name) throws NamingException { Object obj = null; for (NamedNamingObjectProxy proxy : proxies) { obj = proxy.handle(name); if (obj != null) { break; } } return obj; } }
public Object handle(String name) throws NamingException { Object result = null; // see if CDI is active, use BeanManager to obtain Validator/ValidatorFactory if (cdiNamingProxy != null) { result = cdiNamingProxy.handle(name); if (result != null) { return result; } } if (nameForValidator.equals(name)) { result = getValidator(); } else if (nameForValidatorFactory.equals(name)) { result = getValidatorFactory(); } return result; }