Other appservers support isolated classloading/deployment. In fact, that's the primary purpose of an application server. I'd be surprised if Glassfish doesn't do that.
Glassfish seams to have a setting that will enable delegated loading of classes or not. This setting is true by default. It causes libraries to have precedence over classes in wars within ears.