In
this task, you install the dynamic
plug-in bundle into the OSGi framework. Then, you start the plug-in.
Before you begin
This topic assumes
that the following tasks have been
completed:
About this task
This task describes
how to install the bundle using the
Eclipse Equinox console. The bundle can be installed using several
different methods, including modifying the config.ini configuration
file. Products that embed Eclipse Equinox include alternative methods
for managing bundles. For more information on how to add bundles
in the config.ini file in Eclipse Equinox, see
the Eclipse runtime options.
OSGi allows
bundles to be started that have duplicate services. WebSphere eXtreme Scale uses the latest service
ranking. When starting multiple OSGi frameworks 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 about available service rankings see Updating OSGi services for eXtreme Scale plug-ins with xscmd.
Procedure
Install
the plug-in bundle into the Eclipse Equinox OSGi
framework using the OSGi console.
- 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
- Install the plug-in bundle in the Equinox console.
osgi> install file:///<path to bundle>
Equinox displays 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 has started:
osgi> ss
When
the bundle has started successfully, the bundle displays the ACTIVE
state; for example:17 ACTIVE com.mycompany.plugin.bundle_VRM
Install the plug-in bundle into the Eclipse Equonix
OSGi
framework using 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 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 has started; for example:
osgi> ss
When the bundle has started successfully, the bundle displays
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.