cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r820095 - in /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms: JMSConfiguration.java continuations/JMSContinuation.java
Date Tue, 29 Sep 2009 21:35:33 GMT
Author: dkulp
Date: Tue Sep 29 21:35:32 2009
New Revision: 820095

URL: http://svn.apache.org/viewvc?rev=820095&view=rev
Log:
[CXF-2391] Add ability to set the number of continuations at which point
jms will reconnect.

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=820095&r1=820094&r2=820095&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Tue Sep 29 21:35:32 2009
@@ -70,6 +70,7 @@
     private int maxConcurrentConsumers = 1;
     private int maxConcurrentTasks = 10;
     private int maxSuspendedContinuations = DEFAULT_VALUE;
+    private int reconnectSuspendedContinuations = DEFAULT_VALUE;
 
     private volatile String messageSelector;
     private boolean subscriptionDurable;
@@ -346,6 +347,14 @@
     public void setMaxSuspendedContinuations(int maxSuspendedContinuations) {
         this.maxSuspendedContinuations = maxSuspendedContinuations;
     }
+    
+    public int getReconnectSuspendedContinuations() {
+        return reconnectSuspendedContinuations;
+    }
+
+    public void setReconnectSuspendedContinuations(int reconnectSuspendedContinuations) {
+        this.reconnectSuspendedContinuations = reconnectSuspendedContinuations;
+    }
 
     public TaskExecutor getTaskExecutor() {
         return taskExecutor;

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java?rev=820095&r1=820094&r2=820095&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Tue Sep 29 21:35:32 2009
@@ -164,10 +164,10 @@
             modifyList(remove);
             if (continuations.size() >= jmsConfig.getMaxSuspendedContinuations()) {
                 jmsListener.stop();
-            } else {
-                if (!jmsListener.isRunning()) {
-                    jmsListener.start();
-                }
+            } else if (!jmsListener.isRunning()
+                && (jmsConfig.getReconnectSuspendedContinuations() < 0
+                    || continuations.size() <= jmsConfig.getReconnectSuspendedContinuations()))
{
+                jmsListener.start();
             }
         }
 



Mime
View raw message