Author: ritchiem
Date: Wed Dec 13 05:27:47 2006
New Revision: 486642
URL: http://svn.apache.org/viewvc?view=rev&rev=486642
Log:
Added comments about possible RejectedExecutionException that may occur when
starting to process aSync deliveries as the broker closes its execution pools.
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentDeliveryManager.java
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SynchronizedDeliveryManager.java
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentDeliveryManager.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentDeliveryManager.java?view=diff&rev=486642&r1=486641&r2=486642
==============================================================================
---
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentDeliveryManager.java
(original)
+++
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ConcurrentDeliveryManager.java
Wed Dec 13 05:27:47 2006
@@ -281,7 +281,12 @@
//are we already running? if so, don't re-run
if (_processing.compareAndSet(false, true))
{
- executor.execute(asyncDelivery);
+ // Do we need this?
+ // This executor is created via Executors in
AsyncDeliveryConfig which only returns a TPE so cast is ok.
+ //if (executor != null && !((ThreadPoolExecutor)
executor).isShutdown())
+ {
+ executor.execute(asyncDelivery);
+ }
}
}
}
Modified:
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SynchronizedDeliveryManager.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SynchronizedDeliveryManager.java?view=diff&rev=486642&r1=486641&r2=486642
==============================================================================
---
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SynchronizedDeliveryManager.java
(original)
+++
incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SynchronizedDeliveryManager.java
Wed Dec 13 05:27:47 2006
@@ -206,7 +206,12 @@
//are we already running? if so, don't re-run
if (_processing.compareAndSet(false, true))
{
- executor.execute(new Runner());
+ // Do we need this?
+ // This executor is created via Executors in
AsyncDeliveryConfig which only returns a TPE so cast is ok.
+ //if (executor != null && !((ThreadPoolExecutor)
executor).isShutdown())
+ {
+ executor.execute(new Runner());
+ }
}
}
}