Description
provides an activator to intercept calls to the bundle context in order to install bundles when services are required
For more details on how to use this bundle, refer to the /doc/readme.html file embedded in the bundle jarfile.
Contributors
License
Library GNU Public License
Services
Properties
Requirements
Download
Build
Settings
Set the manifest entries as following
Import-Package: org.ungoverned.osgi.service.bundlerepository; specification-version=1.1.0,
and the packages required by the X-Bundle-Activator and its dependencies (i.e reachable classes)Bundle-Activator: fr.imag.adele.bundle.serviceondemand.impl.GenericActivator
X-Bundle-Activator:
the classname of your Activator class to intercepted (which can be a ServiceBinder generic activator).Bundle-Activator
instance creates and starts an instance of the X-Bundle-Activator class and intercepts all the method calls to the context. This enables to intercepts getServiceReferences() and getService() method calls in order to install and start bundles from OBR when those bundles provide matching services.
Run the demo
To run the demo of this bundle, enter the following commands in the OSCAR shell
start the bundlerepository.jar if necessary (list it with the command ps
.
install http://www-adele.imag.fr/~donsez/dev/osgi/serviceondemand/serviceondemand.jar obr install "Service Binder" obr urls http://www-adele.imag.fr/~donsez/dev/osgi/serviceondemanddemo/test/repository.hello.xml obr list obr install "Hello Service Specification 1.2" install http://www-adele.imag.fr/~donsez/dev/osgi/serviceondemanddemo/serviceondemanddemo.jar ps services start 7 ps services3 bundles are installed and started when the bundle 7 is started and calls getService() methods
Typical Usages
Tested gateways
Versions history
TODO (contributions are welcome)
Links