<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello.<br>
      <br>
      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.<br>
      <br>
      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.<br>
      <br>
      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.<br>
      <br>
      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.<br>
      <br>
      Have you any advice about building a (minimalist) Karaf feature
      for Drools 6.0.1 ?<br>
      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.<br>
      <br>
      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.<br>
      <br>
      Is there any reason to use this beta instead of the last final
      version ?<br>
      <br>
      Thanks for you help.<br>
      <br>
      Regards.<br>
      <pre class="moz-signature" cols="72">Ephemeris Lappis</pre>
      Le 13/05/2014 15:46, Charles Moulliard a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
cite="mid:CAAxZHdfpTv6BW3Yi3ZswTjmc8diefyZyLBpix9LED-GU+yJyew@mail.gmail.com"
      type="cite">
      <div dir="ltr">Can you share your code as I have created such kind
        of project (bundle A &nbsp;= KieContainer &nbsp;and bundle B = rules)
        which is working on Karaf ?
        <div><br>
        </div>
        <div><a moz-do-not-send="true"
            href="https://github.com/cmoulliard/droolsjbpm-osgi-examples">https://github.com/cmoulliard/droolsjbpm-osgi-examples</a>
          (bundle with Kie =&nbsp;<a moz-do-not-send="true"
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>&nbsp;and
          bundle with bundle with rules =&nbsp;<a moz-do-not-send="true"
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>)&nbsp;</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
              moz-do-not-send="true"
              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'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'm afraid that the same code won'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 moz-do-not-send="true"
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 moz-do-not-send="true"
              href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              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 |&nbsp;Blog :&nbsp;<a moz-do-not-send="true"
              href="http://cmoulliard.github.io" target="_blank">
              http://cmoulliard.github.io</a></div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>