not short of modifying JCI... no. 2.1 didn't use JCI, but janino directly.
not sure if that had that problem.

On 4/27/06, Lukas Fuellemann <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Because I have to exchange classes at runtime, I want to use my own class
> loader together with drools.
> I modified RuleSetCompiler to use "smf-classLoader" from RuleBaseContext
> and
> also tell RuleSetLoader to use that class loader.
> The problem is now JCI, which uses its own class loader.
>
> The relevant code in RuleSetCompiler.compile():
>
> ResourceStoreClassLoader classLoader = new ResourceStoreClassLoader(
> parentClassLoader,
>     new ResourceStore[]{dst} );
>
> The debug output shows that parentClassLoader really is my own class
> loader.
> This means, the ResourceStorClassLoader uses my class loader as
> parentClassLoader.
>
> The problem: JCI does never use my class loader and therefore cannot
> resolve
> the classes declared in the parameters of my rules.
>
> I use this code in my main class:
>
>       RuleBaseContext context = new RuleBaseContext();
>       context.put("smf-classLoader", classLoader);
>
>       RuleSetLoader ruleSetLoader = new RuleSetLoader();
>       ruleSetLoader.addFromReader(new StringReader(rules), context);
>
>       RuleBaseLoader ruleBaseLoader = new RuleBaseLoader();
>       ruleBaseLoader.addFromRuleSetLoader(ruleSetLoader);
>       ruleBase = ruleBaseLoader.buildRuleBase();
>
> Can anybody help me?
>
> Thanks in advance,
> Lukas Fuellemann
>
>
>
>

Reply via email to