I should mention that my tests are being run by Maven's surefire plugin, which is hardly revolutionary. Nevertheless, it does deal with classpaths in a slightly odd way, if I remember correctly. It builds an empty jar in a temp area whose Class-Path: manifest entry contains the "real" Maven-computed classpath.
Could it be possible that EJBContainer#createEJBContainer() is doing something insanely stupid like asking its classloader for a list of URLs that it should scan? Because of course if it does that it won't get the Class-Path: manifest entries, will it?
[Message sent by forum member 'ljnelson']
http://forums.java.net/jive/thread.jspa?messageID=395766