Testing a war file is a bit different. Otherwise (post GlassFish 3.0) all entries in the classpath (besides GlassFish jars) will be part of the deployed artifacts (either as EJB modules or as libraries). If you want to exclude something from deployment, you need to remove those entries from the classpath.
[Message sent by forum member 'mvatkina']
http://forums.java.net/jive/thread.jspa?messageID=486499