Hello.

This feature seems to use many features with versions that are not available on our ServiceMix 4.5.3. For example, the JPA feature is required with versions [1.0.1,2.0), while the current feature is 0.3. This is also the case for other dependencies. This makes the Drools feature deployment fails.

This is the reason why we are trying to build our own Drools feature targeting our current Karaf/ServiceMix version. But all the hidden dependencies I mentioned before (Import-Package in OSGi manifests without Maven dependencies), which most are not needed in our case, make the operation quite difficult.

What should be the simplest way to deploy a minimalist package to let our simple application work ?

I will try anyway the last 6.1.0 beta to check for possible regression in case we switch to this version.

Thanks a lot for your help.

Regards.



2014-05-14 7:28 GMT+02:00 Charles Moulliard <ch007m@gmail.com>:
I would recommend that you use the karaf features 6.1.0.Beta3 file http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xml to deploy your project on Karaf or ServiceMix


On Tue, May 13, 2014 at 8:24 PM, Ephemeris Lappis <ephemeris.lappis@gmail.com> wrote:
Hello.

I'll send you a project as described when our first tests work with a single bundle, which is not the case today. Indeed, we're experiencing problems, like many seem to have experienced before, to package and install drools on ServiceMix.

We're testing first a simple bundle owning its local kmodule.xml and its drl files, but this doesn't work. I have had a look to you example projects, and some of them indeed seem to do what we need, using the osgi integration.

The project itself only depends on two libraries (Kie API and Drools compiler), but when we've tried to install them, we've discovered all the transitive dependancies that we must take into account to add the OSGi integration module that is supposed to handle classloader troubles.

We are trying to build a Karaf Feature of the 6.0.1 Final version for our Karaf environment, producing a KAR file with maven, but many dependant JAR's manifests mention Import-Package entries that do not appear in the maven graph and we've spent 2 days looking one by one to resolve deployment failures and/or conflicts.

Have you any advice about building a (minimalist) Karaf feature for Drools 6.0.1 ?
I've seen an available feature for a more recent version of Karaf, but our ServiceMix 4.5.3 doesn't expose the needed dependancies.

I've also see posts about a new KieClasspathContainer constuction method passing a classloader, but this method, if I'm not wrong only appears on version 6.1.0 Beta3.

Is there any reason to use this beta instead of the last final version ?

Thanks for you help.

Regards.
Ephemeris Lappis
Le 13/05/2014 15:46, Charles Moulliard a écrit :
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



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
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


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users