In this task, you install the dynamic
plug-in bundle into the OSGi framework. Then, you start the plug-in.
Before you begin
Complete the following tasks before the OSGi-enabled plug-ins
are installed and started.
- The eXtreme Scale server
or client bundle is installed into the Eclipse Equinox OSGi framework.
See Installing eXtreme Scale bundles.
- One or more dynamic BackingMap or ObjectGrid plug-ins
are implemented. See Building eXtreme Scale dynamic plug-ins.
- The dynamic plug-ins are packaged as OSGi services in OSGi bundles.
- By default, the JVM continues
to run when each eXtreme Scale server
in an OSGi framework is stopped in the xscmd utility
with the -c teardown command. If you want eXtreme Scale to exit the JVM after
each server is stopped, then set the server property exitJVMOnTeardown to true.
For more information, see Server properties file.
About this task
Install the bundle with the Eclipse Equinox console.
There are several different methods to install the bundle, including
a modification of the config.ini configuration
file. Products that embed Eclipse Equinox include alternative methods
for adding bundles in the config.ini file. For
more information, seeEclipse runtime options.
OSGi allows
bundles to be started that have duplicate services. WebSphere eXtreme Scale uses the latest service
ranking. When multiple OSGi frameworks are started in an eXtreme Scale data grid, you must
make sure that the correct service rankings are started on each server.
Failure to do so causes the grid to be started with a mixture of
different versions.
To see which versions are in-use by the
data grid, use the xscmd utility to check the current
and available rankings. For more information, see Updating OSGi services for eXtreme Scale plug-ins with xscmd.
Procedure
Install the plug-in bundle into the Eclipse Equinox OSGi
framework with the OSGi console.
- Start the Eclipse Equinox framework with the console enabled.
<java_home>/bin/java -jar <equinox_root>/plugins/org.eclipse.osgi_3.6.1.R36x_v20100806.jar -console
- Install the plug-in bundle in the Equinox console.
osgi> install file:///<path to bundle>
Equinox lists the bundle ID for the newly installed bundle:Bundle id is 17
- Enter the following line to start the bundle in the Equinox
console, where <id> is the bundle ID assigned
when the bundle was installed:
osgi> start <id>
- Retrieve the service status in the Equinox console to verify
that the bundle started:
osgi> ss
When
the bundle starts, the bundle lists the ACTIVE state, for example:17 ACTIVE com.mycompany.plugin.bundle_VRM
Install the plug-in bundle into the Eclipse Equinox OSGi
framework with the config.ini file.
- Copy the plug-in bundle into the Eclipse Equinox plug-ins
directory: For example:
<equinox_root>/plugins
- Edit the Eclipse Equinox config.ini configuration
file, and add the bundle to the osgi.bundles property. For
example:
osgi.bundles=\
org.eclipse.osgi.services_3.2.100.v20100503.jar@1:start, \
org.eclipse.osgi.util_3.2.100.v20100503.jar@1:start, \
org.eclipse.equinox.cm_1.0.200.v20100520.jar@1:start, \
com.mycompany.plugin.bundle_VRM.jar@1:start
Important: Verify that there is a blank line after the last
bundle name. Each bundle is separated by a comma.
- Start the Eclipse Equinox framework with the console enabled. For example:
<java_home>/bin/java -jar <equinox_root>/plugins/org.eclipse.osgi_3.6.1.R36x_v20100806.jar -console
- Retrieve the service status in the Equinox console to verify
that the bundle started. For example:
osgi> ss
When the bundle starts, the bundle lists the ACTIVE state;
for example:17 ACTIVE com.mycompany.plugin.bundle_VRM
Results
The plug-in bundle is now installed and started. The
eXtreme Scale container or client
can now be started. For more information on developing
eXtreme Scale plug-ins, see the
System APIs and Plug-ins topic.