This sample creates two Client Services project to demonstrate how to use OSGi service trackers.
Time required: 2 minutes
This sample creates the following projects: com.ibm.rcp.samples.servicetracker, and com.ibm.rcp.samples.servicetracker.service.
The servicetracker project creates and starts two service trackers for the com.ibm.pvc.webcontainer.listeners.HttpSettingListener service. One tracker is a simple implementation that returns an instance of the service, if one is available. The second tracker is a more sophisticated implementation that receives notifications of changes in service life cycle.
The service bundle registers an instance of the com.ibm.pvc.webcontainer.listeners.HttpSettingListener service. By starting and stopping this bundle during run time, you can view output to see how the events are processed.
Parent topic: Samples: XPD621
Service tracker setup instructions: XPD621