SeamFramework.orgCommunity Documentation
Weld-OSGi do not fordid you to use classic OSGi mechanisms. More it give you some way to easily get main OSGi object like Bundle or BundleContext. You just inject them, don't need to use OSGi verbosity.
There are :
Current bundle injection:
@Inject Bundle bundle;
It provides the
current bundle OSGi Bundle
instance.
Current bundle context injection:
@Inject BundleContext context;
It
provides the current bundle OSGi BundleContext
instance.
Current bundle file injection:
@Inject @DataFile("path/to/file") File dataFile;
It provides a file within the current bundle path.
Current bundle manifest headers injection:
@Inject @BundleHeaders Map<String,String> headers; @Inject @BundleHeader("header-name") String header;
It provides all the manifest headers or a specific header of the current bundle.
Current bundle Weld-OSGi registration:
@Inject Registration registration;
It provides all the registrations for OSGi services managed by Weld-OSGi for the current bundle.