SeamFramework.orgCommunity Documentation
There are very few things to do in order to obtain a bean bundle from a bean archive or a bundle. Mostly it is just adding the missing marker files and headers in the archive:
Make a bean archive a bean bundle by adding special OSGi marker headers in its
META-INF/Manifest.MF
file.
Or, in the other way, make a bundle a bean bundle by adding a META-INF/bean.xml
file.
Thus a bean bundle has both META-INF/bean.xml
file
and OSGi marker headers in its META-INF/Manifest.MF
file.
However there is a few other information that Weld-OSGi might need in order to perform a correct extension. In particular a bean bundle can not be manage by the extension bundle but by his own embedded CDI container. For that there is a new manifest header.
The beans.xml file follows no particular rules and should be the same as in a native CDI environment. Thus it can be completely empty or declare interceptors, decorators or alternatives as a regular CDI beans.xml file.
There will be no different behavior with a classic bean archive except for Weld-OSGi extension new
utilities. But these don't need any modification on the META-INF/bean.xml
file.
This header prevents the extension bundle to automatically manage the bean bundle that set this manifest
header to true. So the bean bundle can be managed more finely by the user or use a different CDI container.
If this header is set to false or it is not present in the META-INF/Manifest.MF
file then the bean
bundle will be automatically managed by the extension bundle (if it is started).