Package com.sun.enterprise.v3.server
Class CommonClassLoaderServiceImpl
- java.lang.Object
-
- com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct
@Service public class CommonClassLoaderServiceImpl extends Object implements org.glassfish.hk2.api.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:H2_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. H2_DRIVERS are added to this class loader, because Payara ships with H2 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:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description CommonClassLoaderServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrentBeforeParentClassLoader
getCommonClassLoader()
String
getCommonClassPath()
void
postConstruct()
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
getCommonClassLoader
public CurrentBeforeParentClassLoader getCommonClassLoader()
-
getCommonClassPath
public String getCommonClassPath()
-
-