<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I'm actually just in the process of going over all existing Weld-OSGi issues,&nbsp;and will check this one as well.</div><div>I'll ping you for any help / questions, if that's OK?</div><div><br></div><div>-Ales</div><div><br></div><div><div>On Jan 23, 2013, at 3:15 PM, Guillaume Nodet &lt;<a href="mailto:gnodet@gmail.com">gnodet@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I'm trying to have CDI and OSGi work well together and I'm trying to deploy DeltaSpike in OSGi.<div>Doing so, I'm hitting&nbsp;<a href="https://issues.jboss.org/browse/WELD-1309" target="_blank">https://issues.jboss.org/browse/WELD-1309</a></div>

<div>I wonder if any of the CDI / OSGi guys around have already thought about the problem.</div><div><br></div><div>So sum up, the problem is how to package / use CDI extensions in OSGi. &nbsp; DeltaSpike provide some bundles which can be deployed, but they don't work well in OSGi. &nbsp; The reason is that a lot of the CDI stuff assume a flat classloader. &nbsp;The Weld-Osgi project tries to make that work better but there are still problems:</div>

<div>&nbsp; * extension discovery: atm, the META-INF/services declaration for extensions are only found in the bundle, not in other bundles</div><div>&nbsp; * only classes from the bundle are considered as beans, not classes that may be part of the extension</div>

<div><br></div><div>I would think, we want extensions to be specifically declared for a given bundle : we need to know for a given bundle which extensions should be loaded. &nbsp;I've trying so far by doing discovery of beans and extensions using the bundle classloader and the classloaders of required bundles. &nbsp; It seems to work, but I'm not really sure it's the way to go, especially I'm not sure that all beans defined by a bundle which is an extension should be added to the bundle using that extension (the extension being itself a bundle can already have its own CDI container).</div>
<div><br></div><div style="">Thoughts ?</div><div><br clear="all"><div><br></div>-- <br>
------------------------<br>Guillaume Nodet<br>------------------------<br>Blog: <a href="http://gnodet.blogspot.com/" target="_blank">http://gnodet.blogspot.com/</a><br>------------------------<br>FuseSource, Integration everywhere<br>

<a href="http://fusesource.com/" target="_blank">http://fusesource.com</a>
</div></div>
_______________________________________________<br>weld-dev mailing list<br><a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/weld-dev</blockquote></div><br></body></html>