The Service Binder is a mechanism that simplifies development in the
OSGi services platform as it automates service dependency management.
OSGi applications are constructed following service-orientation principles, and as consequence they require developers to build components that are responsible for publishing their services, discovering and binding to services they require and adapting to the dynamic availability (the arrival or departure) of the services they are using; all of this during execution. These activities represent service dependency management.
Traditionnally, bundle developers must program both application and
service dependency management logic into their bundles. Service
dependency management logic is,
in general, complex and error prone, as it requires, among other
things, that monitoring and reconfiguration tasks to be realized.
Additionnally, application and service dependency management logic are
often intermixed inside
the code of a bundle, making modifications more difficult.
The Service Binder solves this problem by extracting service
dependency management logic from the bundles and moving it into an execution
environment that is deployed inside the framework as a standard
bundle. Service dependency management logic is configured by
an XML descriptor that extends
the bundle manifest. This logic is inserted seamlessly into a bundle by
providing a descriptor and creating an empty subclass from a generic
activator class provided by the Service Binder. Applications built with
the Service Binder are
assembled dynamically and are capable of adapting themselves
autonomously, for example by substituting a departing service, or by
integrating new services that arrive as the application is being
The Service Binder is delivered in a standard OSGi bundle (~70k) and
is independent of any OSGi framework
implementation. It has been used in companies such as Schneider Electric
and Ascert to develop research and
commercial products, respectively.