[hornetq-commits] JBoss hornetq SVN: r11922 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 21 07:16:06 EST 2011
Author: clebert.suconic at jboss.com
Date: 2011-12-21 07:16:06 -0500 (Wed, 21 Dec 2011)
New Revision: 11922
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
JBPAPP-7628 - ignoring RejectedExecutionException during shutdown
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-12-21 02:53:58 UTC (rev 11921)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-12-21 12:16:06 UTC (rev 11922)
@@ -303,17 +303,24 @@
this.executor = executor;
- checkQueueSizeFuture = scheduledExecutor.scheduleWithFixedDelay(new Runnable()
+ try
{
- public void run()
+ checkQueueSizeFuture = scheduledExecutor.scheduleWithFixedDelay(new Runnable()
{
- // This flag is periodically set to true. This enables the directDeliver flag to be set to true if the queue
- // is empty
- // We don't want to evaluate that on every delivery since that's too expensive
-
- checkDirect = true;
- }
- }, CHECK_QUEUE_SIZE_PERIOD, CHECK_QUEUE_SIZE_PERIOD, TimeUnit.MILLISECONDS);
+ public void run()
+ {
+ // This flag is periodically set to true. This enables the directDeliver flag to be set to true if the queue
+ // is empty
+ // We don't want to evaluate that on every delivery since that's too expensive
+
+ checkDirect = true;
+ }
+ }, CHECK_QUEUE_SIZE_PERIOD, CHECK_QUEUE_SIZE_PERIOD, TimeUnit.MILLISECONDS);
+ }
+ catch (RejectedExecutionException ignored)
+ {
+ // This could happen on a server shutdown
+ }
}
// Bindable implementation -------------------------------------------------------------------------------------
More information about the hornetq-commits
mailing list