FileDocCategorySizeDatePackage
Configurator.javaAPI DocGlassfish v2 API6439Fri May 04 22:30:22 BST 2007com.sun.appserv.addons

Configurator

public interface Configurator
Name of an implementation of this interface will be configured in the META-INF/services/com.sun.appserv.addons.Configurator file. Appserver will instantiate this class and use it for configuring and unconfiguring the addon.
see
com.sun.appserv.addons.Installer
author
Binod P.G
since
9.1

Fields Summary
Constructors Summary
Methods Summary
public voidconfigure(ConfigurationContext cc)
Performs the configuration of the addon. Typically it involves the creation of instance/domain specific artifacts and configuring the domain.xml, server.policy etc.

When ConfigurationContext.ConfigurationType is DAS, the configurator is supposed to make any changes required for the domain. For example, it can insert a lifecycle-module element in the domain.xml with object-type="system-all", so that the lifecycle module will be available in all instances created in that domain.

The configurator is expected to use the system property called com.sun.aas.AddonRoot for referring to the shared bits of the addon. For example, the location of the system-all lifecycle module may be specified as ${com.sun.aas.AddonRoot}//lib/lc-impl.jar

When ConfigurationContext.ConfigurationType is INSTANCE, the configurator is expected to make any changes required for a particular instance. This may be creating a system-propery to specify a port number.

If this method throw a AddonFatalException or RuntimeException, the appserver startup will not continue. If it throws AddonException, then the appserver startup will continue after displaying the error message.

param
cc ConfigurationContext object.

public voiddisable(ConfigurationContext cc)
Disable the addon. Typically, addon will modify some configuration (eg: Lifecycle module) to stop it from functioning. If the addon has deployed an application, then the application will be disabled in this step.

If this method throw a AddonFatalException or RuntimeException, the appserver startup will not continue. If it throws AddonException, then the appserver startup will continue after displaying the error message.

param
cc ConfigurationContext object.

public voidenable(ConfigurationContext cc)
Enable the addon. Typically, addon will modify some configuration (eg: Lifecycle module) to start functioning. If the addon has disabled and application, then addon will re-enable that application in this step.

If this method throw a AddonFatalException or RuntimeException, the appserver startup will not continue. If it throws AddonException, then the appserver startup will continue after displaying the error message.

param
cc ConfigurationContext object.

public voidunconfigure(ConfigurationContext cc)
Performs the unconfiguration of the addon. Typically it involves the removal of instance/domain specific artifacts and deleting the domain.xml entries. For example, all application-refs pointing to the system application or may be removed by the addon.

If this method throw a AddonFatalException or RuntimeException, the appserver startup will not continue. If it throws AddonException, then the appserver startup will continue after displaying the error message.

param
cc ConfigurationContext object.

public voidupgrade(ConfigurationContext cc, AddonVersion version)
Upgrade the addon.

If this method throws AddonFatalException or RuntimeException, the appserver startup will not continue. If it throws AddonException, then the appserver startup will continue after displaying the error message.

param
cc ConfigurationContext object.
param
version AddonVersion object corresponding to the existing version.