I know that's a tricky work. I'd be happy to help if you want, and I can work on a prototype it if we agree on the design first.
I'm not yet familiar with the intricacies of CDI, but I do know OSGi very well.
Do you have any idea on how it could roughly work ?
My main concern is that an extension provided as a bundle may very well contain a META-INF/beans.xml which means the weld-osgi extender will create a CDI container for the bundle alone. When used as an extension, the beans need to be added to the CDI container of the bundle using that extension. But I'd think we need more control over that. Or maybe that's just something we don't want to support (i.e. having an extension being a CDI application on its own).
As usual in OSGi, we can either use manifest headers, or OSGi services. One possibility would be to define an ExtensionProvider interface that would be exposed by extension bundles and used by the weld-osgi container in order to provide more control over the use of the extension (such as the ability to add beans to the CDI container without them being discovered because they're not in the bundle classloader).
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
I know that's a tricky work. I'd be happy to help if you want, and I can work on a prototype it if we agree on the design first.
I'm not yet familiar with the intricacies of CDI, but I do know OSGi very well.
Do you have any idea on how it could roughly work ?
My main concern is that an extension provided as a bundle may very well contain a META-INF/beans.xml which means the weld-osgi extender will create a CDI container for the bundle alone. When used as an extension, the beans need to be added to the CDI container of the bundle using that extension. But I'd think we need more control over that. Or maybe that's just something we don't want to support (i.e. having an extension being a CDI application on its own).
As usual in OSGi, we can either use manifest headers, or OSGi services. One possibility would be to define an ExtensionProvider interface that would be exposed by extension bundles and used by the weld-osgi container in order to provide more control over the use of the extension (such as the ability to add beans to the CDI container without them being discovered because they're not in the bundle classloader).