We are using WebSphere 6.1 application server with default classloader delegation mode i.e. PARENT-FIRST. We think about changing it to PARENT-LAST to be able to choose our jsf implementation or our webservices stack.
As PARENT-FIRST is the default I wonder how many people switched to PARENT-LAST, and what was the reason to switch, and if your life became better since you switched :)
We have a lot of applications in production so I cannot just switch to see what happens, if we do it we will have a lot of testing so I’d like to have to some feedback if you have switched to PARENT-LAST.
Thanks
Delegation Mode: PARENT_FIRST. Tip: Use this to specify that a Web module should use a specific version of a library, such as Struts, or to override classes coming with the WebSphere run time. Put the common version at the top of the hierarchy, and the specialized version in WEB-INF/lib.
The WebSphere extensions class loader loads the WebSphere Application Server classes that are required at run time. WebSphere Application Server classes are provided as a set of OSGi bundles. Each bundle is loaded by a separate class loader within a network of OSGi class loaders.
Class loader order The options are Classes loaded with parent class loader first and Classes loaded with local class loader first (parent last) . The default is to search in the parent class loader before searching in the application class loader to load a class.
On projects that I'm assigned to, we actually do switching to PARENT-LAST for most of our applications. The reason for that is usually an app-specific implementation of something, or a need for app-specific property bundle that Websphere uses too (overriding the Websphere setup of commons-logging, for example).
If something breaks after the switch, it is usually because of somewhat wrong setup of the application that suddently starts to be used (while before the switch it was overriden by Websphere's resources).
Portlet applications (deployed on WebSphere Portal Server) always switch their configuration to parent last. In my experience it is always better to switch to parent last, especially if you are using commons logging. This is because WebSphere includes a truck load of stuff in its own classloaders which are often a different versions/configurations to the one that you want to use.
If you are doing it, I would recommend that you script up the deployment of the application because it can be one of those things that are missed when you do a deployment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With