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]>

Attachment: rife-classloader.diff
Description: Binary data

_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to