From: Niels Erik G. Nielsen The library does require that a configuration scheme is chosen - in beans.xml as described below. But the library does NOT impose any mandatory parameters in order to start up (except for those required for
+ * bootstrapping the configuration). The library does know of certain parameters, if it encounters them.
+ *
+ * The known parameters are TYPE (service type) PAZPAR2_URL, SERVICE_ID, and SERVICE_PROXY_URL The built-in configuration schemes are: It must be determined deploy-time what configuration scheme to use, by selecting the preferred
+ * mechanism in the application's beans.xml. In this example the MasterKey configuration scheme is injected: For the web.xml configuration scheme (choosing WebXmlConfigReader in beans.xml)
+ * to pre-define the URL of the Pazpar2 to use, the configuration could be: For the Mk2ConfigReader scheme to work, the web.xml must then contain pointers to the configuration directory
+ * and properties file.
+ * In this example the configuration directory is in the web application itself (war://testconfig). A more regular
+ * example would put it in a separate directory to not have it overwritten by each deployment of the war. The jsfdemo.properties file might look like this for running against a
+ * local Pazpar2 service: Some of the other know parameters in this format could be: It's possible to implement a custom configuration scheme by either ignoring whatever scheme is
+ * injected and then applying the required values otherwise, OR by extending the ConfigurationReader
+ * and inject that class in beans.xml instead of any of the two predefined options. The extended
+ * class must construct a Configuration object -- which is basically a set of key-value pairs --
+ * and then set the desired values and hand it off to the Configurable (currently Pz2Service, Pz2Client,
+ * ServiceProxyClient Finally it's possible to set the URL runtime even from the UI pages.
+ *
+ *
+ *
+ * <beans xmlns="http://java.sun.com/xml/ns/javaee"
+ * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ * xsi:schemaLocation="
+ * http://java.sun.com/xml/ns/javaee
+ * http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+ * <alternatives>
+ * <class>com.indexdata.mkjsf.config.Mk2ConfigReader</class>
+ * <!-- Options Mk2ConfigReader -->
+ * <!-- WebXmlConfigReader -->
+ * </alternatives>
+ * </beans>
+ *
+ *
+ *
+ * <context-param>
+ * <param-name>PAZPAR2_URL</param-name>
+ * <param-value>http://localhost:8004/</param-value>
+ * </context-param>
+ *
+ *
+ *
+ * <context-param>
+ * <param-name>MASTERKEY_ROOT_CONFIG_DIR</param-name>
+ * <param-value>war://testconfig</param-value>
+ * </context-param>
+ * <context-param>
+ * <description>
+ * The sub directory to hold config file(s) for this Masterkey component.
+ * </description>
+ * <param-name>MASTERKEY_COMPONENT_CONFIG_DIR</param-name>
+ * <param-value>/jsfdemo</param-value>
+ * </context-param>
+ * <context-param>
+ * <param-name>MASTERKEY_CONFIG_FILE_NAME</param-name>
+ * <param-value>jsfdemo.properties</param-value>
+ * </context-param>
+ * <context-param>
+ * <description>
+ * Defines the lifespan of configuration parameters as retrieved
+ * from the file pointed to by MASTERKEY_CONFIG_FILE_NAME.
+ * Can be SERVLET (cached) or REQUEST (read for every request).
+ * Will default to SERVLET.
+ * </description>
+ * <param-name>MASTERKEY_CONFIG_LIFE_TIME</param-name>
+ * <param-value>REQUEST</param-value>
+ * </context-param>
+ *
+ *
+ * pz2client.PAZPAR2_URL = http://localhost:8004/
+ *
+ *
+ * service.TYPE = SP
+ * proxyclient.SERVICE_PROXY_URL = http://localhost:8080/service-proxy/
+ *
+ *
+ *
- * Pz2Service is exposed to the UI as 'pz2'. However, if the service is pre-configured,
- * the Faces pages might never need to reference 'pz2' explicitly. Indirectly they UI will,
- * though, if the polling mechanism in the tag <pz2utils:pz2watch> is used.
+ * Pz2Service is exposed to the UI as pz2
. However, if the service is pre-configured,
+ * the Faces pages might never need to reference pz2
explicitly. Indirectly they will,
+ * though, if the polling mechanism in the tag <pz2utils:pz2watch>
is used.
*
*
**/