6 Replies Latest reply on Jan 23, 2009 8:36 AM by Dimitris Andreadis

    Jboss AS5.0GA and JbossRules

    Iván Sampedro Newbie


      We have developed a web application that uses drools. We generate a ruleBase from drl archive, compiling it in real-time. I read that compiling process consume a lot of time, but in our case, it takes about 3 or 4 seconds, sometimes 7 (in jboss 4.2.2).

      Now with jboss 5.0, this times are equals at beginning (after server booting), but if we don't launch the process that loads the drl in the ruleBase, for 10 or 15 minutes, when launch this process again, it takes 2 o 3 minutes in read the drl and compile it. In 4.2.2 this behaviour is normal, and when we relaunch the process it takes 3 or 4 seconds.

      The code where jboss 5.0 spend this time is:

      //read in the source
      source = new FileReader(this.context.getRealPath("reglas/Evaluacion_CVR.drl"));
      //optionally read in the DSL (if you are using it).
      //Use package builder to build up a rule package.
      //An alternative lower level class called "DrlParser" can also be used...
      builder = new PackageBuilder();
      //this will parse and compile in one step
      //NOTE: There are 2 methods here, the one argument one is for normal DRL.

      When it run builder.addPackageFromDrl(source), it takes about 2 or 3 minutes instead of 3 or 4 seconds that takes with server recently started.

      Any idea?
      Thanks in advance!