com.sun.enterprise.v3.server
Class CommonClassLoaderServiceImpl

java.lang.Object
  extended by com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl
All Implemented Interfaces:
org.glassfish.hk2.PostConstruct

@Service
public class CommonClassLoaderServiceImpl
extends Object
implements org.jvnet.hk2.component.PostConstruct

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

Constructor Summary
CommonClassLoaderServiceImpl()
           
 
Method Summary
 ClassLoader getCommonClassLoader()
           
 String getCommonClassPath()
           
 void postConstruct()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonClassLoaderServiceImpl

public CommonClassLoaderServiceImpl()
Method Detail

postConstruct

public void postConstruct()
Specified by:
postConstruct in interface org.glassfish.hk2.PostConstruct

getCommonClassLoader

public ClassLoader getCommonClassLoader()

getCommonClassPath

public String getCommonClassPath()


Copyright © 2012. All Rights Reserved.