package org.jboss.test.classloader.interrupt;
import org.apache.log4j.Logger;
public class TestThread extends Thread
{
private static Logger log = Logger.getLogger(TestThread.class);
private Object listener;
Throwable ex;
public TestThread(Object listener)
{
super("org.jboss.test.classloader.interrupt.TestThread");
this.listener = listener;
}
public void run()
{
log.debug("Setting interrupt flag");
this.interrupt();
try
{
log.debug("Creating TestClass");
TestClass tc = new TestClass();
log.debug("TestClass instance = "+tc);
if( this.isInterrupted() == false )
ex = new IllegalStateException("Interrupted state not restore after loadClassInternal");
}
catch(Throwable e)
{
this.ex = e;
log.error("Failure creating TestClass", e);
}
}
}