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 ?

https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with Kie = kie-project-bundle and bundle with bundle with rules = simple-kie-bundle


On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis <ephemeris.lappis@gmail.com> wrote:
Hello.

I'd like to separate cleanly my Drools system into 2 OSGi bundles :

1) the java code that uses the Kie API (6.0.1) and exposes service
interfaces to the business part of the applications. Its code relies on
someting like :

KieServices kieServices = KieServices.Factory.get();
kieContainer = kieServices.getKieClasspathContainer();
KieSession kieSession = kieContainer.newKieSession(name);

2) the rules themselves, just including the kmodule.xml that manages the
ksessions and the drl files in their own packages.

Let say the first module is S and second is R, while the applcation is A.

This build model works nice in my eclipse with correct maven dependancies
set from A to both S and R. Classes in the application A calls the service
from the S. The kieContainer has resolved as expected the kmodule and
associated the rules files for the given packages, and the application can
get the ksession for a given name.

I'm afraid that the same code won't run as nice as it does when deployed on
my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may
encounter some troubles to detect the kmodule.xml in the META-INF and the
DRL files out of another jar.

Is there anyone with such experiences ?
Any advice to do it ?

Thanks in advance.
Regards.



--
View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.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



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io