FileDocCategorySizeDatePackage
AbstractClassLoaderIsolatedTestCase.javaAPI DocHibernate 3.2.51059Tue Dec 12 16:22:26 GMT 2006org.hibernate.junit

AbstractClassLoaderIsolatedTestCase

public abstract class AbstractClassLoaderIsolatedTestCase extends UnitTestCase
A specialized TestCase for running tests in an isolated class-loader
author
Steve Ebersole

Fields Summary
private ClassLoader
parentLoader
private ClassLoader
isolatedLoader
Constructors Summary
public AbstractClassLoaderIsolatedTestCase(String string)

		super( string );
	
Methods Summary
protected abstract java.lang.ClassLoaderbuildIsolatedClassLoader(java.lang.ClassLoader parent)

protected abstract voidreleaseIsolatedClassLoader(java.lang.ClassLoader isolatedLoader)

protected voidsetUp()

		parentLoader = Thread.currentThread().getContextClassLoader();
		isolatedLoader = buildIsolatedClassLoader( parentLoader );
		Thread.currentThread().setContextClassLoader( isolatedLoader );
		super.setUp();
	
protected voidtearDown()

		super.tearDown();
		Thread.currentThread().setContextClassLoader( parentLoader );
		releaseIsolatedClassLoader( isolatedLoader );
		parentLoader = null;
		isolatedLoader = null;