I actually looked through your example project yesterday; very helpful!!!
However, there are a few things I'm not sure are compatible with what I'm
trying to do.
1. I need to rebuild the rules on the fly, so I was using examples from
the IncrementalCompilationTest.java
<https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java>
to accomplish that task. However, those tests don't use a classpath
container... can I still rebuild a KieModule via runtime code when running
in a classpathContainer?
2. Your example code calls .newKieSession() on a kbase object as opposed to
a kContainer object. Is there a reason why? If I create a new KieSession
from a kbase vs. kContainer, will I still be able to rebuild the kjar
dynamically in the code and keep using the same stateful session?
3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter
to specify a classloader when creating the container? I see you just added
that recently. I've tried using
Thread.currentThread().setContextClassLoader(...) but can't seem to make
that work with Drools 6.0.1 in Karaf 2.3.3 because then
RuleBaseConfiguration sets the classloader and uses it to try resolving
org.drools.core.conflict.DepthConflictResolver, which it can't do because
it's no longer using the OSGi classloader.
Thank you,
Joseph
Charles Moulliard-2 wrote
> Hi Joseph,--
>
> I propose that you have a look to this example which is currently working
> on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples (simple
> =
> OSGI BundleActivator + KieSession + Drools Rules)
>
> Regards,
>
> Charles
View this message in context: http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users