Haha, I was just about to commit the same fix :-)
I wrote that code late at night at Java In Action, very stupid to
have restricted the check to RIFE classes alone.
On 20-jan-06, at 18:11, Pazu wrote:
2006/1/20, Marcus Brito <[EMAIL PROTECTED]>:
I have some free time on my hand today, maybe I'll take a look
into this by
myself. I'll let you know if I find anything interesting, Geert.
Here's what I found:
Since the spring application context isn't loaded by RIFE, but by a
context listener, all classes directly related to the application
context are loaded by the servlet container's classloader, instead of
RIFE's EngineClassLoader. ParticipantSpringWeb, however, is loaded by
RIFE, and classes created from it (like the ContextLoader), are loaded
*again* by EngineClassLoader. This will lead to many spring-related
classes being loaded twice. Hence the odd exception in my OP.
Browsing EngineClassLoader source code, I've noticed that it already
checks if the container's classloader has loaded some RIFE specific
classes, to avoid loading them twice. I didn't see why this should be
done only for classes under com.uwyn.rife, so I removed this
condition, and made EngineClassLoader always check if a class has
already been loaded by the container before loading it again.
With this modification, by application is now working perfectly. It's
a (very) small application, however, and I'm not sure about the
ramifications of this apparently simple and innocent change.
Anyways, my modification are in the attached patch. Maybe it's
actually sane... but I'm not counting on this.
-- Pazu <[EMAIL PROTECTED]>
<rife-classloader.diff>
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba
"Use what you need" Avenue de Scailmont 34
http://www.uwyn.com 7170 Manage, Belgium
gbevin[remove] at uwyn dot com Tel +32 64 84 80 03
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users