<div dir="ltr">Hi Joseph,<div><br></div><div>My example uses this META-INF/kmodules.xml to create the KieBase </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 6:01 PM, jhusby <span dir="ltr"><<a href="mailto:husby024@umn.edu" target="_blank">husby024@umn.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I actually looked through your example project yesterday; very helpful!!!<br>
However, there are a few things I'm not sure are compatible with what I'm<br>
trying to do.<br>
<br>
1. I need to rebuild the rules on the fly, so I was using examples from<br>
the IncrementalCompilationTest.java<br>
<<a href="https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java" target="_blank">https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java</a>><br>
to accomplish that task. However, those tests don't use a classpath<br>
container... can I still rebuild a KieModule via runtime code when running<br>
in a classpathContainer?<br>
<br>
2. Your example code calls .newKieSession() on a kbase object as opposed to<br>
a kContainer object. Is there a reason why? If I create a new KieSession<br>
from a kbase vs. kContainer, will I still be able to rebuild the kjar<br>
dynamically in the code and keep using the same stateful session?<br>
<br>
3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter<br>
to specify a classloader when creating the container? I see you just added<br>
that recently. I've tried using<br>
Thread.currentThread().setContextClassLoader(...) but can't seem to make<br>
that work with Drools 6.0.1 in Karaf 2.3.3 because then<br>
RuleBaseConfiguration sets the classloader and uses it to try resolving<br>
org.drools.core.conflict.DepthConflictResolver, which it can't do because<br>
it's no longer using the OSGi classloader.<br>
<br>
Thank you,<br>
<br>
Joseph<br>
<br>
<br>
Charles Moulliard-2 wrote<br>
<div class="im">> Hi Joseph,<br>
><br>
> I propose that you have a look to this example which is currently working<br>
> on Karaf - <a href="https://github.com/cmoulliard/droolsjbpm-osgi-examples" target="_blank">https://github.com/cmoulliard/droolsjbpm-osgi-examples</a> (simple<br>
> =<br>
> OSGI BundleActivator + KieSession + Drools Rules)<br>
><br>
> Regards,<br>
><br>
> Charles<br>
<br>
<br>
<br>
<br>
<br>
</div>--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.html" target="_blank">http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.html</a><br>
<div class="HOEnZb"><div class="h5">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>
</div></div></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>