ConfigFactorypublic class ConfigFactory extends Object This SPI mechanism allows getting web services Management configuration. Thi
provider can be implemented using any configuration storage mechanism
underneath. |
Fields Summary |
---|
public static final String | CONFIG_PROVIDER_NAMEEnvironment property name to customize Repository Provider | public static final String | CONFIG_DEFAULT_PROVIDER |
Constructors Summary |
---|
private ConfigFactory()Make ConfigFactory private, only one sigleton object is available.
|
Methods Summary |
---|
public static com.sun.enterprise.admin.wsmgmt.config.spi.ConfigFactory | getConfigFactory()Returns the ConfigFactory singleton.
return new ConfigFactory();
| public ConfigProvider | getConfigProvider()Returns the ConfigProvider instance. If
-Dconfig.provider.classname is defined, that class is loaded and
returned as the repository provider. If there is an error finding or
loading the class, the default provider class is returned.
String implName = System.getProperty(CONFIG_PROVIDER_NAME);
if ( implName == null ) {
Class repClass = Class.forName(CONFIG_DEFAULT_PROVIDER);
Object o = repClass.newInstance();
return (ConfigProvider)o;
} else {
Class repClass = Class.forName(implName);
Object o = repClass.newInstance();
return (ConfigProvider)o;
}
|
|