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.
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.
That way the CompositeClassLoader does
not have a reference to the class loader of my webapp.
But that is quite ugly...
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.
Thanks anyway for the suggestions.
Romain
From:
Davide Sottara <dsotty@gmail.com>
To:
rules-users@lists.jboss.org,
Date:
03/04/2014 00:29
Subject:
Re: [rules-users]
Memory leak due CompositeClassLoader
Sent by:
rules-users-bounces@lists.jboss.org
You may have to dispose the sessions explicitly -
or even the knowledgebase,
using the internal method that was added as a temporary "brute force"
patch
to leaks in 5.6.
The composite classloader was replaced in 6.x, so the newer versions should
not have this kind of problems.
Best
Davide
--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-Memory-leak-due-CompositeClassLoader-tp4029053p4029100.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users