"adrian(a)jboss.org" wrote :
| The code is the same as JBoss4.x
There is one difference between 4.x and 5.x, which is the 4.x code won't loop forever
since it uses a for loop
| JBoss 4.x
|
| int size = taskList != null ? taskList.size() : 0;
| synchronized( taskList )
| {
| for(int i = 0; i < size; i ++)
|
| JBoss5.x
|
| synchronized (taskList)
| {
| while (taskList.isEmpty() == false)
| {
|
But using a for loop would just hide the problem.
The thread on Trace2 still wouldn't be woken up because the other thread wouldn't
do the notification on its task list (it would still assign the task to the wrong
thread).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206559#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...