Home » geronimo-2.2-source-release » org.apache.geronimo.kernel.config » [javadoc | source]
org.apache.geronimo.kernel.config
public interface: ConfigurationManager [javadoc | source]

All Known Implementing Classes:
    ConfigurationManagerImpl, DeploymentConfigurationManager, KernelConfigurationManager, SimpleConfigurationManager, EditableKernelConfigurationManager, EditableConfigurationManager

Encapsulates logic for dealing with configurations. Configurations have a lifecycle with three states: installed, loaded, and running. Installed means that the configuration is present in the server's repository. Loaded means that the Configuration GBean (including the configuration's ClassLoader) is running. Running means that all the GBeans in the Configuration are running. From a user perspective, there's not much difference between installed and loaded if the configuration has not been started (it still shows up as not running). However, certain operations will cause a configuration to be loaded but not started. For example, if ModuleA depends on ModuleB, then when ModuleA is distributed ModuleB will normally be loaded (to fire up the ClassLoader and validate ModuleA). But ModuleB will not be started at that point. It can be started manually or it will be started automatically when ModuleA is started. When a Configuration is not loaded, only its ConfigurationData is available for inspection. It's normally not possible to inspect the GBeans in the configuration because there's no ClassLoader that could be used to load the classes needed by the GBeanDatas in the configuration. Once the configuration has been loaded, it's ClassLoader is available so the GBeanDatas can be loaded and inspected. But the GBean instances are not instantiated and started until the configuration is started.
Method from org.apache.geronimo.kernel.config.ConfigurationManager Summary:
getArtifactResolver,   getConfiguration,   getInstalled,   getLoaded,   getRepositories,   getRunning,   getStoreForConfiguration,   getStores,   isConfiguration,   isInstalled,   isLoaded,   isOnline,   isRunning,   listConfigurations,   listConfigurations,   listStores,   loadConfiguration,   loadConfiguration,   loadConfiguration,   loadConfiguration,   reloadConfiguration,   reloadConfiguration,   reloadConfiguration,   reloadConfiguration,   reloadConfiguration,   reloadConfiguration,   restartConfiguration,   restartConfiguration,   setOnline,   sort,   startConfiguration,   startConfiguration,   stopConfiguration,   stopConfiguration,   uninstallConfiguration,   unloadConfiguration,   unloadConfiguration
Method from org.apache.geronimo.kernel.config.ConfigurationManager Detail:
 public ArtifactResolver getArtifactResolver()
    Gets the common ArtifactResolver in case the caller wants to use this directly. It is configured for all the repositories known to this configuration manager, etc.
 public Configuration getConfiguration(Artifact configurationId)
    Gets a loaded Configuration (does not see unloaded configurations).
 public Artifact[] getInstalled(Artifact query)
    Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances installed into the server environment. That is, are there any matches in the configuration store, regardless of whether they're loaded or running? Note that this always returns an empty array if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public Artifact[] getLoaded(Artifact query)
    Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances loaded. Note that this always returns an empty array if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public Collection<Repository> getRepositories()
 public Artifact[] getRunning(Artifact query)
    Given an artifact that's not fully resolved (e.g. some parts are missing), check whether there are any instances running. Note that this always returns an empty array if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public ConfigurationStore getStoreForConfiguration(Artifact configuration)
    Gets the configuration store responsible for the specified configuration, or null if there is none. The configuration need not be loaded or running; this just checks which store holds the data for it.
 public ConfigurationStore[] getStores()
    Get all the ConfigurationStores known to this manager at present
 public boolean isConfiguration(Artifact artifact)
    Is the specified artifact a configuration?
 public boolean isInstalled(Artifact configurationId)
    Is the specified configuration installed into the server environment? That is, does it exist in the configuration store, regardless of whether it's loaded or running? Note that this always returns false if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public boolean isLoaded(Artifact configurationId)
    Is the specified configuration loaded into the kernel? Note that this always returns false if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public boolean isOnline()
    Online means full functionality. Offline typically means that configurations will never be started, although they may be marked in the persistent configuration list.
 public boolean isRunning(Artifact configurationId)
    Is the specified configuation running? Note that this always returns false if the argument does not represent a configuration (e.g. if it's for a plain JAR).
 public List listConfigurations()
    Gets a List>ConfigurationInfo< of every of every available configuation. This includes all configurations installed, regardless of whether they are currently loaded or running.
 public List listConfigurations(AbstractName store) throws NoSuchStoreException
    Return a list of the configurations in a specific store.
 public List listStores()
    Return a list of the stores this manager knows about.
 public LifecycleResults loadConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
    Load the specified configuration (from a config store) and all configurations it depends on into the kernel. This causes the configuration gbean to be loaded and started, but does not load any of the gbeans contained within the configuration.
 public LifecycleResults loadConfiguration(ConfigurationData configurationData) throws NoSuchConfigException, LifecycleException
    Load the specified configurationData and all configurations it depends on (from a config store) into the kernel. This causes the configuration gbean to be loaded and started, but does not load any of the gbeans contained within the configuration.
 public LifecycleResults loadConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Load the specified configuration (from a config store) and all configurations it depends on into the kernel. This causes the configuration gbean to be loaded and started, but does not load any of the gbeans contained within the configuration.
 public LifecycleResults loadConfiguration(ConfigurationData configurationData,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Load the specified configurationData and all configurations it depends on (from a config store) into the kernel. This causes the configuration gbean to be loaded and started, but does not load any of the gbeans contained within the configuration.
 public LifecycleResults reloadConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults reloadConfiguration(ConfigurationData configurationData) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults reloadConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults reloadConfiguration(Artifact configurationId,
    Version version) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults reloadConfiguration(ConfigurationData configurationData,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults reloadConfiguration(Artifact configurationId,
    Version version,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Reloads the specified configuration and all configurations that have a dependency on the specified configuration
 public LifecycleResults restartConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
    Restarts the specified configuration and all configurations that have a service dependency on the specified configuration
 public LifecycleResults restartConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Restarts the specified configuration and all configurations that have a service dependency on the specified configuration
 public  void setOnline(boolean online)
 public LinkedHashSet<Artifact> sort(List<Artifact> ids,
    LifecycleMonitor monitor) throws InvalidConfigException, IOException, NoSuchConfigException, MissingDependencyException
 public LifecycleResults startConfiguration(Artifact configurationId) throws NoSuchConfigException, LifecycleException
    Loads and starts all of the gbeans contained within the configuration. If any of the gbeans fails to fully start, all gbeans will be unloaded and an exception will be thrown. This operation causes all configurations that the specified configuration has a service dependency on to be started.
 public LifecycleResults startConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException, LifecycleException
    Loads and starts all of the gbeans contained within the configuration. If any of the gbeans fails to fully start, all gbeans will be unloaded and an exception will be thrown. This operation causes all configurations that the specified configuration has a service dependency on to be started.
 public LifecycleResults stopConfiguration(Artifact configurationId) throws NoSuchConfigException
    Stop the gbeans contained within the configuration. This operation causes all configurations that have a service dependency on the specified configuration to be stopped.
 public LifecycleResults stopConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException
    Stop the gbeans contained within the configuration. This operation causes all configurations that have a service dependency on the specified configuration to be stopped.
 public  void uninstallConfiguration(Artifact configurationId) throws IOException, NoSuchConfigException
    Unstalls the specified configuration from the server. This operation can not be reversed.
 public LifecycleResults unloadConfiguration(Artifact configurationId) throws NoSuchConfigException
    Stops and unloads the configuration. This causes all contained gbeans to be stopped and unloaded, and the configuration gbean is stopped and unloaded. This operation causes all configurations that have a class or service dependency on the specified configuration to be stopped and unloaded.
 public LifecycleResults unloadConfiguration(Artifact configurationId,
    LifecycleMonitor monitor) throws NoSuchConfigException
    Stops and unloads the configuration. This causes all contained gbeans to be stopped and unloaded, and the configuration gbean is stopped and unloaded. This operation causes all configurations that have a class or service dependency on the specified configuration to be stopped and unloaded.