/** * Configures the selected search client using the selected configuration reader. * * <p>The configuration reader is select deploy-time - by configuration in the application's * beans.xml. * * @param client search client to use * @param configReader the selected configuration mechanism * @throws MissingConfigurationContextException if this object is injected before there is a Faces * context for example in a Servlet filter. */ public void configureClient(SearchClient client, ConfigurationReader configReader) throws MissingConfigurationContextException { logger.debug(Utils.objectId(this) + " will configure search client for the session"); try { client.configure(configReader); } catch (MissingConfigurationContextException mcce) { logger.info("No Faces context is available to the configurator at this time of invocation"); throw mcce; } catch (ConfigurationException e) { logger.debug("Pz2Service adding configuration error"); errors.addConfigurationError( new ConfigurationError("Search Client", "Configuration", e.getMessage())); } logger.info(configReader.document()); pzresp.getSp().resetAuthAndBeyond(true); }