[jboss-cvs] JBossAS SVN: r71497 - branches/Branch_4_2/messaging/src/main/org/jboss/mq/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 31 14:56:58 EDT 2008
Author: adrian at jboss.org
Date: 2008-03-31 14:56:58 -0400 (Mon, 31 Mar 2008)
New Revision: 71497
Modified:
branches/Branch_4_2/messaging/src/main/org/jboss/mq/server/ClientConsumer.java
Log:
[JBAS-5354] - If we can't use the thread pool, use the sending thread. Also try to avoid problems with oswego concurrent throwing InterruptedException
Modified: branches/Branch_4_2/messaging/src/main/org/jboss/mq/server/ClientConsumer.java
===================================================================
--- branches/Branch_4_2/messaging/src/main/org/jboss/mq/server/ClientConsumer.java 2008-03-31 18:31:51 UTC (rev 71496)
+++ branches/Branch_4_2/messaging/src/main/org/jboss/mq/server/ClientConsumer.java 2008-03-31 18:56:58 UTC (rev 71497)
@@ -122,8 +122,22 @@
messages.add(r);
if (!enqueued)
{
- threadPool.run(this);
enqueued = true;
+ boolean interrupted = Thread.interrupted();
+ try
+ {
+ threadPool.run(this);
+ }
+ catch (Exception e)
+ {
+ log.debug("Unable to use thread pool for delivering messages, will use the sending thread", e);
+ run();
+ }
+ finally
+ {
+ if (interrupted)
+ Thread.currentThread().interrupt();
+ }
}
}
}
More information about the jboss-cvs-commits
mailing list