SeamFramework.orgCommunity Documentation
This documentation allows new users to quickly setup and try Weld-OSGi. It covers most of Weld-OSGi features with lot of practical code examples allowing users to directly get their hands dirty.
The final chapter offers a complete walk-through of a sample application showing the power of Weld-OSGi.
Weld-OSGi is a framework that allows CDI usages within an OSGi environment. It is an extension of Weld providing CDI for OSGi environment (like Weld-SE for Java SE environment) but it also brings numerous pieces of OSGi facilitation.
It is a set of five bundles that extends the behavior of client bundles once they are deployed in an OSGi framework.
Weld-OSGi provides:
CDI usages in client bundles by obtaining a Weld container
OSGi service layer support for CDI injection
CDI event notification mechanism for OSGi event and inter bundle communication
OSGi utilities facilitation using CDI injection
An OSGi bundle is a regular bundle that is not managed by Weld-OSGi.
A bean bundle is an OSGi bundle managed by Weld-OSGi. It has one or more valid META-INF/bean.xml
marker
files.
A bundle refers indifferently to an OSGi bundle or a bean bundle.
The extension bundle is the Weld-OSGi bundle that manages the bean bundles.
The implementation bundle is the Weld-OSGi bundle that provide Weld container to the extension bundle.
The API bundles are the Weld-OSGi bundles that provide all necessary API in order to use Weld-OSGi in bean bundles.
All examples in this user documentation are made with these tools:
Maven for managing dependencies at compile time and building the bundles
Java 6 for the java sources
Felix framework as the OSGi environment
All examples were tested on a Linux system with the latest version of each tools at the moment of redaction. Version may have evolved so little ajustement might be needed (like for bundle or package versions).
This documentation assumes that you have at least an overview of OSGi and CDI. But for more advanced usages of Weld-OSGi information can be found in other documents.
The specification of OSGi can be found here: http://www.osgi.org/Specifications/HomePage.
The documentation of Weld can be found here: http://docs.jboss.org/weld/reference/latest/en-US/html/.
The complete specification of Weld-OSGi can be found here: http://mathieuancelin.github.com/weld-osgi/html/index.html.