Arch4J 1.1

org.arch4j.util
Class StartupProvider

java.lang.Object
  |
  +--org.arch4j.util.StartupProvider

public class StartupProvider
extends Object

This class is the main service provider for startup services. The services are accessed via the static getProvider() method. This class is used to programmatically set additional System properties as if they had been entered as -D paramters on the VM command line. These are the set of properties that need to be available to initialize property management.

This is especially useful for web applications or EJB services living within an application server container. It is undesirable to set VM parameters for the application server only to be used by the application. Therefore, a servlet can be initialized with properties and loaded when the web application container is started. It then uses this class to store the properties in the System which makes them available to refresh the property provider as if it had been initially configured from the command line parameters.

Version:
$Revision: 1.1 $
Author:
Ross E. Greinke

Method Summary
static StartupProvider getProvider()
          Returns the single instance of the StartupProvider.
 void refresh()
          Triggers a refresh of the property framework.
static void resetProvider()
          Reset the single instance of the StartupProvider.
 void setProperties(Properties properties)
          Adds the given set of properties to the System, as if they had been entered on the VM command line with the -D parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProvider

public static StartupProvider getProvider()
Returns the single instance of the StartupProvider.

Returns:
The single instance of the StartupProvider.

resetProvider

public static void resetProvider()
Reset the single instance of the StartupProvider.


setProperties

public void setProperties(Properties properties)
Adds the given set of properties to the System, as if they had been entered on the VM command line with the -D parameter. This method also triggers a refresh of the property framework.

Parameters:
properties - The additional properties to store.

refresh

public void refresh()
Triggers a refresh of the property framework.


Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.