Hi Mark,
i did some research. Indeed a very complex issue.
Tried to find out the difference about Class.forName(String) and
Class.forName(String, boolean, ClassLoader). Both of them are
delegating to native jvm methods and the difference seems to be in
resolving the class and the way that caches work.
In
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212
they are pointing to use Class.forName(String, boolean,
ClassLoader). Could find that method call in some drools and jbpm
classes. For instance compiler...
But there are also a lot of Class.forName(String) calls too.
Specialy in parts of code where no array-types come into play.
For instance JavaHandlerWorkItemHandler calls
(Class<JavaHandler>) Class.forName(className).
Maybe it would be a good idea to replace Class.forName() for
issues that exclude array-types by classloader.loadClass().
WDYT?
Best Florian
Am 20.06.13 17:28, schrieb Mark Proctor:
There are bugs with loadClass and serialisation :(
"Thus, we highly recommend replacement of this
code:
myClassLoader.loadClass(className);
With this code:
Class.forName(className,false,myClassLoader);"
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users