[rules-dev] What You Should Know about Class Loaders
Mark Proctor
mproctor at codehaus.org
Tue Apr 16 17:23:43 EDT 2013
Some things cause other problems:
"Class.forName is Evil - Class.forName will pin classes in memory forever (almost, but long enough to cause problems). If you're forced to do dynamic class loading use ClassLoader.loadClass instead. All variations of the Class.forName suffer from the same problem. See BJ Hargrave's blog about this."
There is a bug in JDK which means that serialisation will not work with String[] when using loadClass, and Class.forName must be used:
http://bugs.sun.com/view_bug.do?bug_id=6434149
We hit this, and had to move all our stuff to Class.forName.
Mark
On 16 Apr 2013, at 18:51, Cristiano Gavião <cvgaviao at gmail.com> wrote:
> Would like to share this excellent article with Drools and JBPM
> developers...
>
> http://blog.osgi.org/2011/05/what-you-should-know-about-class.html
>
> cheers,
>
> Cristiano
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20130416/7c343497/attachment.html
More information about the rules-dev
mailing list