It&#39;d be great to learn a little more about Drools&#39; class loading strategy; where it&#39;s come from and where it is now.<br><br>Can anyone explain more about Drools class loading? I can guess the RETE network needs to know how to load classes declared in rules; however this no doubt is the tip of an iceberg.<br>
<br>Thanks,<br><br>Mike<br><br><div class="gmail_quote">On 4 December 2010 04:53, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have done more cleaning up in the ClassLoader stuff.<br>
<br>
While we added a root CompositeClassLoader recently there was still<br>
another alternative composite ClassLoader implementation that was used<br>
by the Packages. So we ended up with a composite CL being added to<br>
another CL. Both composites had their own caching etc.<br>
<br>
So now we have  single CompositeClassLoader, with a single point of<br>
caching and slightly improve coding at detecting Drools specific CLs. My<br>
hope is that the code is also more efficient.<br>
<br>
This work was done due to another OSGi requirement where each module<br>
needs to add itself to the root classloader. But sometimes it was<br>
returning the root CL, or sometimes the package level composite CL. So<br>
now there is only one and that should no longer happen.<br>
<br>
What this means is that any module that will have it&#39;s classes resolved<br>
via reflection from other modules should in their constructor or other<br>
initialisation of the code do something like<br>
getRootClassLoader().addClassLoader( getClass().getClassLoader() ). In<br>
situations where it&#39;s a single container all modules have the same<br>
classloader and the call gets ignored, as it won&#39;t re-added an existing<br>
CL. In the OSGi case it&#39;ll add the classloader and now classes from that<br>
module can be resolved in an OSGi environment.<br>
<br>
Mark<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</blockquote></div><br>