Lesson 1.1: Understand the OSGi sample bundles
Complete this lesson to locate and explore the bundles that are provided in the OSGi sample.
OSGi sample bundles
- objectgrid.jar
- The WebSphere® eXtreme Scale server runtime bundle. This bundle is located in the wxs_home/lib directory.
- com.google.protobuf_2.4.0a.jar
- The Google Protocol Buffers, version 2.4.0a bundle. This bundle is located in the wxs_sample_osgi_root/lib directory.
- ProtoBufSamplePlugins-1.0.0.jar
- Version 1.0.0 of the user plug-in bundle with sample ObjectGridEventListener
and MapSerializerPlugin plug-in implementations. This bundle is located in the
wxs_sample_osgi_root/lib directory. The services are
configured with service ranking 1.
This version uses the standard Blueprint XML to configure the eXtreme Scale plug-in services. The service class is a user-implemented class for WebSphere eXtreme Scale interface, com.ibm.websphere.objectgrid.plugins.osgi.PluginServiceFactory. The user-implemented class creates a bean for each request and works similar to a prototype-scoped bean.
- ProtoBufSamplePlugins-2.0.0.jar
- Version 2.0.0 of the user plug-in bundle with sample ObjectGridEventListener
and MapSerializerPlugin plug-in implementations. This bundle is located in the
wxs_sample_osgi_root/lib directory. The services are
configured with service ranking 2.
This version uses the standard Blueprint XML to configure the eXtreme Scale plug-in services. The service class is using a WebSphere eXtreme Scale, built-in class, com.ibm.websphere.objectgrid.plugins.osgi.PluginServiceFactoryImpl, which uses the BlueprintContainer service. Using the standard Blueprint XML configuration, the beans can be configured either as a prototype scope or singleton scope. The bean is not configured as a shard scope.
- ProtoBufSamplePlugins-Gemini-3.0.0.jar
- Version 3.0.0 of the user plug-in bundle with sample ObjectGridEventListener
and MapSerializerPlugin plug-in implementations. This bundle is located in the
wxs_sample_osgi_root/lib directory. The services are
configured with service ranking 3.
This version uses the Eclipse Gemini-specific Blueprint XML to configure the eXtreme Scale plug-in services. The service class is using a WebSphere eXtreme Scale built-in class, com.ibm.websphere.objectgrid.plugins.osgi.PluginServiceFactoryImpl, which uses the BlueprintContainer service. The way to configure a shard scope bean is using a Gemini-specific approach. This version configures the myShardListener bean as a shard scope bean by providing {http://www.ibm.com/schema/objectgrid}shard as the scope value, and configuring a dummy attribute so that the custom scope is recognized by Gemini. This is due to the following Eclipse issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=348776
- ProtoBufSamplePlugins-Aries-4.0.0.jar
- Version 4.0.0 of the user plug-in bundle with sample ObjectGridEventListener
and MapSerializerPlugin plug-in implementations. This bundle is located in the
wxs_sample_osgi_root/lib directory. The services are
configured with service ranking 4.
This version uses standard Blueprint XML to configure the eXtreme Scale plug-in services. The service class is using a WebSphere eXtreme Scale, built-in class, com.ibm.websphere.objectgrid.plugins.osgi.PluginServiceFactoryImpl, which uses the BlueprintContainer service. Using the standard Blueprint XML configuration, the beans can be configured using a custom scope. This version configures the myShardListenerbean as a shard scoped bean by providing {http://www.ibm.com/schema/objectgrid}shard as the scope value.
- ProtoBufSamplePlugins-Activator-5.0.0.jar
- Version 5.0.0 of the user plug-in bundle with sample ObjectGridEventListener
and MapSerializerPlugin plug-in implementations. This bundle is located in the
wxs_sample_osgi_root/lib directory. The services are
configured with service ranking 5.
This version does not use Blueprint container at all. In this version, the services are registered using OSGi service registration. The service class is a user-implemented class for the WebSphere eXtreme Scale interface, com.ibm.websphere.objectgrid.plugins.osgi.PluginServiceFactory. The user-implemented class creates a bean for each request. It works similar to a prototype-scoped bean.
Lesson checkpoint
By exploring the bundles that are provided with the OSGi sample, you can better understand how to develop your own implementations that will run in the OSGi container.
- About bundles that included with the OSGi sample
- The location of those bundles
- The service ranking that each bundle has been configured with