Godmar Back wrote:
On 9/26/07, Mark Proctor <mproctor@codehaus.org> wrote:
Simple add the class at runtime to a classloader and use that classloader
as
the root classloader of the packagebuilder.
This would work if the class loader I provide implements
getResourceAsStream to match its behavior in loadClass (which most
class loaders do) - so you are correct here.
The problem, however, is that I don't know which .jar files to include
in that class loader's path, *unless* I keep track of these .jar files
elsewhere - say in a configuration file, as a command line switch, or
by hardwiring it in my code.
My proposal is to allow the user to specify the location of these jar
files in the .drl file, which a special classloader would then
automatically include as it encounters this declaration in the .drl
file.
- Godmar
I don't think DRL files should be hard coded to Jars, I would rather see
this configuration else where. What you are talking about is deployment
configuraiotn issus, which is a difference concern and belongs in something
more like the RuleAgent. I beleve there are already plans to allow the
RuleAgent to specify locations to lookup classes at runtime.
Mark