[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: InterruptedException not being cleared?
adrian@jboss.org
do-not-reply at jboss.com
Thu Mar 5 06:08:07 EST 2009
"scott.stark at jboss.org" wrote : This type of test is tricky because it takes two threads with one handling the load of a one class and the other handling the load of superclass or field related classes. I'd just make it a todo for now.
|
You'd probably need:
1) to use a dummy ClassLoaderPolicy so you can cause classloading requests to wait
with the classloading locks held by different threads
2) get locks on the classloaders before making the classloading requests to simulate
what loadClassInternal() does.
The basic rule should be that
a) if the thread is interrupted before you make the classloading request then the request should work.
b) But you should be able to interrupt a thread if it is stuck in a classloading task wait.
Neither should lead to a live/deadlock in the classloading.
One issue that occurs to me though with (b) is that it will end up throwing a
ClassNotFoundException which will likely end up causing the class to be
blacklisted. We should really work around this by throwing some sort of
TemporaryClassNotFoundException to show the request maybe retried later?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215213#4215213
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215213
More information about the jboss-dev-forums
mailing list