Class Loader settings in GlassFish (like IBM Parent First/Last)

If you are developing your web applications in Glassfish and running your production code in other Application Servers (IBM in my case) ,you would like to provide your own version of
JSF,JPA ..etc by yourself than relying on container. Or you would provide your own libraries if you want to use latest JEE standards. The way we tell IBM class loader to load classes from application first than container is by setting Parent Last rather than Parent First. By default glassfish also looks for classes in the container than the application, if you want to override that, provide a glassfish-web.xml in your WEB-INF folder and add

Restart your application now, it will pick up the libraries from your WAR now.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>