WSO2 Carbon 5.0.0 comes with a server extension to the Carbon Launcher, which allows OSGi bundles to be simply dropped into the 'dropins' folder (stored in the
<CARBON_HOME>/osgi/ directory). These bundles will then be automatically fetched and executed when the server is launched. The Carbon Launcher module reads the OSGi bundles available in the
<CARBON_HOME>/osgi/dropins/ directory and updates the
bundles.info file (stored in the
<CARBON_HOME>/osgi/profiles/default/configuration/org.eclipse.equinox.simpleconfigurator directory) with the acquired bundle information. When the server starts up, the dropins capability listens to a
CarbonServerEvent of type
STARTING, and is thereby executed during server launch.
The following steps explain the process of executing bundles in the 'dropins' directory when the server starts up:
- When the server starts, information about each OSGi bundle that is newly deployed to the dropins directory is read and collected.
- The Launch component then reads the existing bundle information in the
bundles.infofile and checks if the OSGi bundles that were previously part of the dropins directory are still there. If those bundles are absent, the bundle information is removed.
- The exact OSGi bundle matches are searched for and if they exist, they will not be added again.
bundles.infofile is updated with information on filtered OSGi bundles.