This class is responsible for setting up Common Class Loader. As the name suggests, Common Class Loader is common to all deployed applications. Common Class Loader is responsible for loading classes from following URLs (the order is strictly maintained): lib/*.jar:domain_dir/lib/classes:domain_dir/lib/*.jar:DERBY_DRIVERS. Please note that domain_dir/lib/classes comes before domain_dir/lib/*.jar, just like WEB-INF/classes is searched first before WEB-INF/lib/*.jar. DERBY_DRIVERS are added to this class loader, because GlassFish ships with Derby database by default and it makes them available to users by default. Earlier, they used to be available to applications via launcher classloader, but now they are available via this class loader (see issue 13612 for more details on this). It applies a special rule while handling jars in install_root/lib. In order to maintain file layout compatibility (see issue #9526), we add jars like javaee.jar and appserv-rt.jar which need to be excluded from runtime classloaders in the server side, as they are already available via PublicAPIClassLoader. So, before we add any jar from install_root/lib, we look at their manifest entry and skip the ones that have an entry GlassFish-ServerExcluded: true
@author Sanjeeb.Sahoo@Sun.COM
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.