cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r820384 - in /cxf/branches/2.2.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Date Wed, 30 Sep 2009 18:50:40 GMT
Author: dkulp
Date: Wed Sep 30 18:50:39 2009
New Revision: 820384

URL: http://svn.apache.org/viewvc?rev=820384&view=rev
Log:
Merged revisions 820160 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r820160 | dkulp | 2009-09-29 23:08:58 -0400 (Tue, 29 Sep 2009) | 1 line
  
  [CXF-2391] Re-implement as a percent of the max to simplify
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=820384&r1=820383&r2=820384&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Wed Sep 30 18:50:39 2009
@@ -70,7 +70,7 @@
     private int maxConcurrentConsumers = 1;
     private int maxConcurrentTasks = 10;
     private int maxSuspendedContinuations = DEFAULT_VALUE;
-    private int reconnectSuspendedContinuations = DEFAULT_VALUE;
+    private int reconnectPercentOfMax = 70;
 
     private volatile String messageSelector;
     private boolean subscriptionDurable;
@@ -336,12 +336,12 @@
         this.maxSuspendedContinuations = maxSuspendedContinuations;
     }
     
-    public int getReconnectSuspendedContinuations() {
-        return reconnectSuspendedContinuations;
+    public int getReconnectPercentOfMax() {
+        return reconnectPercentOfMax;
     }
 
-    public void setReconnectSuspendedContinuations(int reconnectSuspendedContinuations) {
-        this.reconnectSuspendedContinuations = reconnectSuspendedContinuations;
+    public void setReconnectPercentOfMax(int reconnectPercentOfMax) {
+        this.reconnectPercentOfMax = reconnectPercentOfMax;
     }
 
     public TaskExecutor getTaskExecutor() {

Modified: cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java?rev=820384&r1=820383&r2=820384&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Wed Sep 30 18:50:39 2009
@@ -164,10 +164,16 @@
             modifyList(remove);
             if (continuations.size() >= jmsConfig.getMaxSuspendedContinuations()) {
                 jmsListener.stop();
-            } else if (!jmsListener.isRunning()
-                && (jmsConfig.getReconnectSuspendedContinuations() < 0
-                    || continuations.size() <= jmsConfig.getReconnectSuspendedContinuations()))
{
-                jmsListener.start();
+            } else if (!jmsListener.isRunning()) {
+                int limit = jmsConfig.getReconnectPercentOfMax();
+                if (limit < 0 || limit > 100) {
+                    limit = 70;
+                }
+                limit = (limit * jmsConfig.getReconnectPercentOfMax()) / 100; 
+            
+                if (continuations.size() <= limit) {
+                    jmsListener.start();
+                }
             }
         }
 



Mime
View raw message