|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by a JBI Component to provide any special processing required at install/uninstall time. The methods defined here are called by the JBI implementation during the installation (or uninstallation) of the component that, among other things, supplies an implementation of this interface.
Initialization/cleanup tasks such as creation/deletion of directories, files,
and database tables can be done by the onInstall()
and onUninstall()
methods, respectively. This also allows the component to
terminate the installation or uninstallation in the event of an error.
After calling onInstall()
or onUninstall()
, regardless of
outcome, the JBI implementation must call the cleanUp()
method
afterwards. Similarly, if init(InstallationContext)
fails with
an exception, the JBI implementation must call the cleanUp()
method.
Component implementors should note that there is no guarantee that
the same instance of its Bootstrap
implementation will be used
during both install and uninstall operations on the component. Data that
need to be retained between installation-time and uninstallation-time
must be persisted in such as fashion that a separate instance of the
bootstrap class can find them, despite component or system shutdown.
Method Summary | |
void |
cleanUp()
Cleans up any resources allocated by the bootstrap implementation, including performing deregistration of the extension MBean, if applicable. |
javax.management.ObjectName |
getExtensionMBeanName()
Obtains the ObjectName of the optional installer
configuration MBean. |
void |
init(InstallationContext installContext)
Initializes the installation environment for a component. |
void |
onInstall()
Called at the beginning of installation of a component to perform any special installation tasks required by the component. |
void |
onUninstall()
Called at the beginning of uninstallation of a component to perform any special uninstallation tasks required by the component. |
Method Detail |
public void init(InstallationContext installContext) throws JBIException
If the component needs to register an optional installer configuration MBean, it MUST do so during execution of this method, or the getExtensionMBean() method.
This method must be called after the installation root (available through the installContext parameter) is prepared.
installContext
- the context containing information from the
install command and from the component installation
ZIP file; this must be non-null.
JBIException
- when there is an error requiring that
the installation be terminatedpublic void cleanUp() throws JBIException
This method must be called after the onInstall() or onUninstall() method is called, whether it succeeds or fails. It must be called after init() is called, if init() fails by throwing an exception.
JBIException
- if the bootstrap cannot clean up allocated
resourcespublic javax.management.ObjectName getExtensionMBeanName()
ObjectName
of the optional installer
configuration MBean. If none is provided by this component, this method
must return null
.
This method must be called before onInstall() (or onUninstall()) is called by the JBI implementation.
null
if there is no such MBeanpublic void onInstall() throws JBIException
This method must not be called if the init() method failed with an exception.
JBIException
- when there is an error requiring that
the installation be terminatedpublic void onUninstall() throws JBIException
This method must not be called if the init() method failed with an exception.
JBIException
- when there is an error requiring that
the uninstallation be terminated.
|
Built 06/07/2005 11:16 AM on acer (SunOS 5.9) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |