Installation of JBI components
The process for installing a JBI component is:- retreive the
InstallationServicefrom the JMX server, - call the
loadNewInstallermethod with the component's Zip file path.
installer to manage the component installation, creates the classloader for this component, and so on. The installation service binds this installer in the JMX server and returns the jmxName of this installer.
- retreive the
Installerfrom the JMX server (by using the jmxName), - call the
installmethod.
Installer calls the Bootstrap class of the component (if the jbi.xml defines one),
The Installer creates a LifeCycleMBean component (which manage the lifecyle of the component) and binds it in the JMX server.
The installer returns the jmxName of this lifecyle component.To start the component,
- retreive the
LifeCycleMBeanfrom the JMX server (by using the jmxName), - call the
startmethod.
Implementation
InstallationService
TheInstallationService is implemented by org.objectweb.petals.jbi.management.InstallationServiceImpl, which is also the installation-impl Fractal component (from ''petals-container'' subproject).As a Fractal component, it is exposed as a Jmx component. The JMX Server used is implemented by MX4J:
- a HTTP connector is launched with Petals, and the JMX components can be accessed on http://your-ip:8082/.
- a RMI connector is launched with Petals, and the JMX components can be accessed on rmi://your-ip:8081.
Note
- use explicitely your machine name or IP, not 'localhost' or '127.0.0.1'
- if multiple containers are started on the same machine, ports are '8082', '8083', and so on.
loadNewInstaller method is called,
- the Zip file is exploded,
- the bootstrap and component contexts are created,
- classloaders are created,
- and an
Installeris finally created with those objects; it is bound in the jmx server and its jmx name is returned.
Installer
TheInstallerMBean is implemented by org.objectweb.petals.jbi.management.Installer (from ''petals-container'' subproject).It creates a org.objectweb.petals.jbi.component.ComponentElement, which is the implemantation of the ComponentLifeCycleMBean.This object retains all the necessary elements needed for the management of the JBI component.During the ''install'', the Installer calls the bootstrap object, and binds the ComponentElement as the ComponentLifeCycleMBean.The related jmxName is returned.Auto installation
Note that an "autoloading" process is coded in Petals (implements inorg.objectweb.petals.jbi.management.autoload package).This process scans the ''autoinstall'' directory of Petals, and performs the whole installation process (install and start) of any component which archive is put in this directory, by piloting the InstallationService, Installer and ComponentLifeCycle.
PDF
History