|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.hyperic.util.unittest.server.IsolatingDefaultSystemClassLoader
public class IsolatingDefaultSystemClassLoader
This classloader is used by the unit test framework to isolate jboss from
the unit test framework classpath so that jboss may boot off its own resources
instead of those residing on the classpath. This is achieved by setting this
classloader as the system classloader with the java.system.class.loader
system property. When the unit test framework vm is started, this classloader
is substituted for the default system classloader containing the classpath.
If set to isolate the default system classloader, this classloader will
delegate all class/resource lookups to the parent of the default system
classloader, effectively isolating the default system classloader from the
jboss boot process.
Field Summary | |
---|---|
static java.lang.ThreadLocal |
SHOULD_ISOLATE
|
Constructor Summary | |
---|---|
IsolatingDefaultSystemClassLoader(java.lang.ClassLoader parent)
This constructor is required when registering this classloader as the system classloader. |
Method Summary | |
---|---|
void |
addURL(java.net.URL url)
Appends the specified URL to the list of URLs to search for classes and resources. |
java.lang.ClassLoader |
getEJBClassLoader()
|
java.net.URL |
getResource(java.lang.String resName)
If the current thread is set to isolate the default system classloader, then delegate resource lookups to the parent of the default system classloader before looking in this classloader for the resource. |
protected java.lang.Class |
loadClass(java.lang.String className,
boolean resolveClass)
If the current thread is set to isolate the default system classloader, then delegate class loads to the parent of the default system classloader before loading the class from this classloader. |
void |
registerEJBClassLoader(java.lang.ClassLoader classLoader)
Register the EJB deployer classloader. |
void |
setIsolateDefaultSystemClassloader()
Set the current thread and all child threads to isolate the default system classloader by delegating class/resource lookups to the parent of the default system classloader. |
Methods inherited from class java.net.URLClassLoader |
---|
definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
---|
defineClass, defineClass |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.ThreadLocal SHOULD_ISOLATE
Constructor Detail |
---|
public IsolatingDefaultSystemClassLoader(java.lang.ClassLoader parent)
parent
- The parent classloader. Should be the default system classloader.Method Detail |
---|
public void addURL(java.net.URL url)
addURL
in class java.net.URLClassLoader
url
- the URL to be added to the search path of URLspublic void setIsolateDefaultSystemClassloader()
public java.net.URL getResource(java.lang.String resName)
getResource
in class java.lang.ClassLoader
ClassLoader.getResource(java.lang.String)
protected java.lang.Class loadClass(java.lang.String className, boolean resolveClass) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
ClassLoader.loadClass(java.lang.String, boolean)
public void registerEJBClassLoader(java.lang.ClassLoader classLoader)
classLoader
- The EJB deployer classloader.public java.lang.ClassLoader getEJBClassLoader()
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |