Is this the default behavior in Drools 2.5+? I.e. compile the rules to a
jar file containing .class-files followed by the loading of this jar? (I
can see on the JavaPolis 2005 presentation a source ddj is also
generated) And I suppose the rules do not have to be recompiled the next
time you use them, but does it automatically detect changes to the rules
when deciding whether it has to recompile (or not)? Or do you have to
ensure the compiled version is the latest one yourself? Can it handle
changes to rules dynamically? I have to agree with you, it does not seem
to be well documented yet :-)

Could you shed a small light on how Drools compiles/interprets rules and
handles changes to the source files? I'm mainly talking about the Java
semantic module here. A broad overview would be much appreciated. If
there is some documentation I haven't found yet on this topic (without
the need for me to go browsing the entire Drools source code), some
pointers would of course suffice.

Regards,
Peter


Mark Proctor wrote:

> Thats exactly the goal with drools 2.5 - precompiled jars. We call
> them .ddjs drools deployment jars. Unfortunately this hasn't been
> documented that well, as we are putting all our efforts into 3.0. The
> best way to understand this API is to look over the unit tests:
> http://cvs.codehaus.org/viewrep/drools/drools/drools-io/src/test/org/drools/io/RuleSetLoaderTest.java?r=1.1
>
> http://cvs.codehaus.org/viewrep/drools/drools/drools-io/src/test/org/drools/io/RuleBaseLoaderTest.java?r=1.2
>
> http://cvs.codehaus.org/viewrep/drools/drools/drools-io/src/test/org/drools/io/IntegrationTest.java?r=1.2
>
>
> Specifically look at the testAddFromDdjUrl() in the RuleBaseLoaderTest
>
> Mark
> Jérôme Picard wrote:
>
>> Hello,
>>
>>  
>>
>> I'm using drools 2.5, and I work with rules in "drl" files.
>> Also when we load a "Rulebase" object the time of loading is very
>> important.
>>
>>  
>>
>> Here is a sample code.
>>
>>  
>>
>> URL urlFile =
>> ServiceHammerManager.class.getResource(bindUriRgAvailOutputRuleSet);
>>
>>            
>> Rulebase  ruleBaseHammerRgAvailOutput =
>> RuleBaseLoader.loadFromUrl(urlFile );
>>
>>  
>>
>> I suppose that this time is due to the compilation of rules.
>>
>>  
>>
>> So, I would like to now if it possible to pre-compile all "drl" files
>> before loading ?
>>
>>  
>>
>> And if true, could you show me some examples please?
>>
>>  
>>
>> Regards,
>>
>> Jerome.
>>
>>  
>>
>>
>>   
>
>

Reply via email to