<font size=2 face="sans-serif">The thing is that it is not my webapp that
creates the RuleBaseConfiguration and the RuleBase, it is another component
that is loaded by the application server, and the rules are shared between
webapps. So I cannot dispose of these objects. This other component loads
lazily the RuleBase on first call, that is why when the RuleBaseConfiguration
is instantiated, the context class loader is the one of my webapp.</font>
<br>
<br><font size=2 face="sans-serif">The only workaround I found is to hook
a listener when my webapp is deployed, temporarily change the context class
loader of the current Thread, force the load of the RuleBase.</font>
<br><font size=2 face="sans-serif">That way the CompositeClassLoader does
not have a reference to the class loader of my webapp.</font>
<br><font size=2 face="sans-serif">But that is quite ugly...</font>
<br>
<br><font size=2 face="sans-serif">I will see with the developers of this
other component if migrating to 6.x is a possibility, but I doubt it in
the near future.</font>
<br>
<br><font size=2 face="sans-serif">Thanks anyway for the suggestions.</font>
<br><font size=2 face="sans-serif">Romain</font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Davide Sottara <dsotty@gmail.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">rules-users@lists.jboss.org,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">03/04/2014 00:29</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [rules-users]
Memory leak due CompositeClassLoader</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>You may have to dispose the sessions explicitly -
or even the knowledgebase,<br>
using the internal method that was added as a temporary "brute force"
patch<br>
to leaks in 5.6.<br>
The composite classloader was replaced in 6.x, so the newer versions should<br>
not have this kind of problems.<br>
Best<br>
Davide<br>
<br>
<br>
<br>
--<br>
View this message in context: </font></tt><a href="http://drools.46999.n3.nabble.com/rules-users-Memory-leak-due-CompositeClassLoader-tp4029053p4029100.html"><tt><font size=2>http://drools.46999.n3.nabble.com/rules-users-Memory-leak-due-CompositeClassLoader-tp4029053p4029100.html</font></tt></a><tt><font size=2><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt>
<br>