WebSphere comes with parent last and parent first. Is this Java EE compliant? Is this supported by all application servers that are Java EE 5 compliant?
I did my own research (going through the specs and few blogs) and below is what I've figured
EAR
The spec DOES NOT define or mandate how the class loaders should work within an EAR. It however defines that
WAR
Servlet specification defines and mandates the support of a PARENT_LAST (i.e. WAR/web-inf/classes and WAR/web-inf/lib take precedence over the libraries that come with the app server) class loading model. But this is just for WAR modules. The Servlet spec diverges from the standard J2SE delegation model of PARENT_FIRST in this case.
Reference
Spec: Servlet 2.3, Section: 9.7.2 Web Application Classloader
Spec: Java EE 5, Section: EE.6.2.4.7 Context Class Loader
App Server specifics
Interestingly, though, it appears most major app servers support some mechanism of turning off delegation to isolate the application from the app server if necessary (because of conflicts or otherwise): WebSphere - "parent-last", GlassFish - <class-loader delegate="false">
, JBoss - java2ParentDelegation=false
, Geronimo - <java2-delgation-model>false</java2-delegation-model>