<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Some things cause other problems:<div><i style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(237, 236, 232); ">"Class.forName is Evil</i><span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(237, 236, 232); ">&nbsp;- 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&nbsp;</span><a href="http://blog.bjhargrave.com/2007/09/classforname-caches-defined-class-in.html" style="text-decoration: none; color: rgb(0, 67, 136); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(237, 236, 232); ">BJ Hargrave's blog about this</a><span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(237, 236, 232); ">."</span></div><div><font face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"><span style="font-size: 13px; line-height: 18px;"><br></span></font></div><div><font face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"><span style="font-size: 13px; line-height: 18px;">There is a bug in JDK which means that&nbsp;serialisation&nbsp;will not work with String[] when using loadClass, and Class.forName must be used:</span></font></div><div><a href="http://bugs.sun.com/view_bug.do?bug_id=6434149">http://bugs.sun.com/view_bug.do?bug_id=6434149</a></div><div><br></div><div>We hit this, and had to move all our stuff to Class.forName.</div><div><font face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"><span style="font-size: 13px; line-height: 18px;"><br></span></font></div><div><font face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"><span style="font-size: 13px; line-height: 18px;">Mark</span></font></div><div><font face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"><span style="font-size: 13px; line-height: 18px;"><br></span></font><div><div>On 16 Apr 2013, at 18:51, Cristiano Gavião &lt;<a href="mailto:cvgaviao@gmail.com">cvgaviao@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Would like to share this excellent article with Drools and JBPM <br>developers...<br><br><a href="http://blog.osgi.org/2011/05/what-you-should-know-about-class.html">http://blog.osgi.org/2011/05/what-you-should-know-about-class.html</a><br><br>cheers,<br><br>Cristiano<br>_______________________________________________<br>rules-dev mailing list<br>rules-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/rules-dev<br></blockquote></div><br></div></body></html>