activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5486
Date Mon, 28 Mar 2016 17:55:50 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 05f918ceb -> 9a866cf56


https://issues.apache.org/jira/browse/AMQ-5486

Default to caller runs policy on task rejection.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/9a866cf5
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/9a866cf5
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/9a866cf5

Branch: refs/heads/master
Commit: 9a866cf5673c03f5b2a324ec81802fd986a0ad72
Parents: 05f918c
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Mar 28 13:55:09 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Mar 28 13:55:09 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/thread/TaskRunnerFactory.java     | 6 ++++--
 .../org/apache/activemq/transport/nio/SelectorManager.java     | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/9a866cf5/activemq-client/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
b/activemq-client/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
index 2987997..6cdb09e 100755
--- a/activemq-client/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
+++ b/activemq-client/src/main/java/org/apache/activemq/thread/TaskRunnerFactory.java
@@ -187,11 +187,13 @@ public class TaskRunnerFactory implements Executor {
                 return thread;
             }
         });
-        
+
         if (rejectedTaskHandler != null) {
             rc.setRejectedExecutionHandler(rejectedTaskHandler);
+        } else {
+            rc.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
         }
-        
+
         return rc;
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/9a866cf5/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
index 365500d..54e1cc0 100644
--- a/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
+++ b/activemq-client/src/main/java/org/apache/activemq/transport/nio/SelectorManager.java
@@ -54,7 +54,7 @@ public final class SelectorManager {
                     t.setDaemon(true);
                     return t;
                 }
-            });
+            }, new ThreadPoolExecutor.CallerRunsPolicy());
 
         return rc;
     }


Mime
View raw message