com.acciente.induction.init
Class ConfigLoaderInitializer
java.lang.Object
com.acciente.induction.init.ConfigLoaderInitializer
public class ConfigLoaderInitializer
- extends java.lang.Object
This class manages the loading of a config loader (yes, the config loader itself
is configurable, and the parameter specifying its name is in a sense a bootstrap
parameter value).
This class also defines the names of any config parameters that may defined
directly in the web.xml where the dispatcher servlet is defined. There are few
parameters that can be defined directly in the web.xml, since most of the
configuration used to initialize the displatcher is expected to be in an XML
file named using the convention [servlet-name]-induction.xml residing in the
same location as the web.xml file.
Currently the only parameter that may be defined in the web.xml is one that
allows reading the configuration using a custom configuration reader class
in which case no [servlet-name]-induction.xml is expected. In fact the
[servlet-name]-induction.xml is what is loaded by the default configuration
reader implementation.
Any parameter are expected to be
prefixed by the name of given to the dispatcher servlet. For example if the
dispatcher servlet is named myapp, the an example of a parameter name
in the web.xml would look like: myapp.config-loader-class
Method Summary |
static ConfigLoader |
getConfigLoader(javax.servlet.ServletConfig oServletConfig,
Logger oLogger)
Loads the configuration parameters used to configure every module in this dispatcher servlet. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_LOADER_CLASS
public static final java.lang.String CONFIG_LOADER_CLASS
- See Also:
- Constant Field Values
ConfigLoaderInitializer
public ConfigLoaderInitializer()
getConfigLoader
public static ConfigLoader getConfigLoader(javax.servlet.ServletConfig oServletConfig,
Logger oLogger)
throws java.lang.ClassNotFoundException,
java.lang.reflect.InvocationTargetException,
ConstructorNotFoundException,
com.acciente.commons.reflect.ParameterProviderException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
- Loads the configuration parameters used to configure every module in this dispatcher servlet.
- Parameters:
oLogger
- provides access to the dispatcher's primary loggeroServletConfig
- provides access to the dispatcher's servlet config
- Returns:
- a container with configuration values
- Throws:
java.lang.ClassNotFoundException
- propagated exception
ConstructorNotFoundException
- propagated exception
java.lang.IllegalAccessException
- propagated exception
java.lang.InstantiationException
- propagated exception
java.lang.reflect.InvocationTargetException
- propagated exception
Log
Mar 15, 2008 APR - created
com.acciente.commons.reflect.ParameterProviderException
Copyright (c) 2008 Acciente, LLC. All rights reserved.