<div dir="ltr">Can you share your code as I have created such kind of project (bundle A  = KieContainer  and bundle B = rules) which is working on Karaf ?<div><br></div><div><a href="https://github.com/cmoulliard/droolsjbpm-osgi-examples">https://github.com/cmoulliard/droolsjbpm-osgi-examples</a> (bundle with Kie = <a href="https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/master/kie-project-bundle" class="" id="09fb4c9c2cb0ffd8541862b7e730c283-a515d330951034a6910f1c3891e32b8b25b8238a" title="kie-project-bundle" style="font-size:12.727272033691406px;color:rgb(65,131,196);text-decoration:none;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;white-space:nowrap;background-color:rgb(248,248,248)">kie-project-bundle</a> and bundle with bundle with rules = <a href="https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/master/simple-kie-bundle" class="" id="9fd71c1d63aaec5060baf0bb370b29ca-f9e591ffecfef515df75f4343642892e7d5ca6d8" title="simple-kie-bundle" style="font-size:12.727272033691406px;color:rgb(65,131,196);text-decoration:none;font-family:Helvetica,arial,freesans,clean,sans-serif;line-height:20px;white-space:nowrap;background-color:rgb(248,248,248)">simple-kie-bundle</a>) </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis <span dir="ltr">&lt;<a href="mailto:ephemeris.lappis@gmail.com" target="_blank">ephemeris.lappis@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I&#39;d like to separate cleanly my Drools system into 2 OSGi bundles :<br>
<br>
1) the java code that uses the Kie API (6.0.1) and exposes service<br>
interfaces to the business part of the applications. Its code relies on<br>
someting like :<br>
<br>
KieServices kieServices = KieServices.Factory.get();<br>
kieContainer = kieServices.getKieClasspathContainer();<br>
KieSession kieSession = kieContainer.newKieSession(name);<br>
<br>
2) the rules themselves, just including the kmodule.xml that manages the<br>
ksessions and the drl files in their own packages.<br>
<br>
Let say the first module is S and second is R, while the applcation is A.<br>
<br>
This build model works nice in my eclipse with correct maven dependancies<br>
set from A to both S and R. Classes in the application A calls the service<br>
from the S. The kieContainer has resolved as expected the kmodule and<br>
associated the rules files for the given packages, and the application can<br>
get the ksession for a given name.<br>
<br>
I&#39;m afraid that the same code won&#39;t run as nice as it does when deployed on<br>
my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may<br>
encounter some troubles to detect the kmodule.xml in the META-INF and the<br>
DRL files out of another jar.<br>
<br>
Is there anyone with such experiences ?<br>
Any advice to do it ?<br>
<br>
Thanks in advance.<br>
Regards.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html" target="_blank">http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Charles Moulliard</div><div>Apache Committer / Architect @RedHat</div><div>Twitter : @cmoulliard | Blog : <a href="http://cmoulliard.github.io" target="_blank"> http://cmoulliard.github.io</a></div>
<div><br></div></div>
</div>