Encountered another part of the problem:

I can package the frontend stuff (that would normally be found in WAR/WEB-INF/classes into a JAR, put that in EAR/lib, and everything works. However, my boss doesn't like that.

But if I leave the classes in WAR/WEB-INF, then I get a "Class Not Found" exception from one of the libs in EAR/lib, which is trying to load, via reflection, one of the classes in the frontend. I understand why that doesn't work, thanks to your explanation of the classloader.

Obviously, if I move the libs from EAR/lib to EAR/WAR/WEB-INF/lib, then all is good. Except that my MDB can't find the libs anymore. Bugger.

This problem will occur if I duplicate the libs, yes? I'm reasonably sure it did last time.

Further, if I set "reverse-classloading" to true, then I'm bound to get all sorts of problems, and if my MDB tries to access a static method (say, getInstance() for a class where that pattern is used), it will, essentially, call a *different* method to the one the classes in the WAR would call, yes? And return a different object. Not cool.

Can't really go around moving things, as the logging class (that's basically essential) is in the same package as the reflection-using class.

Any ideas here apart from "Don't use Reflection", and "Don't call from libs to main"?

Now, I think the solution I want is to have the libs able to access the frontend (in WEB-INF), while at the same time being access exactly the same libs from my MDB, and I don't think that's possible in Geronimo?