cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1139351 - /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Date Fri, 24 Jun 2011 15:13:26 GMT
Author: cschneider
Date: Fri Jun 24 15:13:26 2011
New Revision: 1139351

URL: http://svn.apache.org/viewvc?rev=1139351&view=rev
Log:
CXF-3618 removing maybeShutdownListeners as it was affecting performance really badly

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?rev=1139351&r1=1139350&r2=1139351&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Fri Jun 24 15:13:26 2011
@@ -47,7 +47,6 @@ import org.apache.cxf.message.MessageImp
 import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.AbstractConduit;
-import org.apache.cxf.workqueue.WorkQueueManager;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
@@ -74,7 +73,6 @@ public class JMSConduit extends Abstract
     private DefaultMessageListenerContainer allListener;
     private String conduitId;
     private AtomicLong messageCount;
-    private int outstandingAsync;
     private JMSBusLifeCycleListener listener;
     private Bus bus;
 
@@ -114,7 +112,6 @@ public class JMSConduit extends Abstract
                                                        false);
             addBusListener();
         }
-        ++outstandingAsync;
         return jmsListener;
     }
     private synchronized AbstractMessageListenerContainer getAllListener() {
@@ -126,7 +123,6 @@ public class JMSConduit extends Abstract
                                                        true);
             addBusListener();
         }
-        ++outstandingAsync;
         return allListener;
     }
 
@@ -348,24 +344,6 @@ public class JMSConduit extends Abstract
             return;
         }
         doReplyMessage(exchange, jmsMessage);
-        maybeShutdownListeners();
-    }
-    private synchronized void maybeShutdownListenersInternal() {
-        if (outstandingAsync == 0) {
-            shutdownListeners();
-        }        
-    }
-    private synchronized void maybeShutdownListeners() {
-        if (outstandingAsync > 0) {
-            --outstandingAsync;
-        }
-        if (outstandingAsync == 0) {
-            bus.getExtension(WorkQueueManager.class).getAutomaticWorkQueue().execute(new
Runnable() {
-                public void run() {
-                    maybeShutdownListenersInternal();
-                }
-            });
-        }
     }
 
     /**



Mime
View raw message