You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/11/26 06:42:53 UTC

svn commit: r720747 - in /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src: main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java

Author: ffang
Date: Tue Nov 25 21:42:53 2008
New Revision: 720747

URL: http://svn.apache.org/viewvc?rev=720747&view=rev
Log:
[SM-1702]remove synchronized block from DeliveryChannel.sendSync()

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=720747&r1=720746&r2=720747&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Tue Nov 25 21:42:53 2008
@@ -639,10 +639,8 @@
                 if (CxfBcConsumer.this.isOneway) {
                     context.getDeliveryChannel().send(exchange);
                 } else if (CxfBcConsumer.this.isSynchronous()) {
-                    synchronized (context.getDeliveryChannel()) {
-                        context.getDeliveryChannel().sendSync(exchange,
-                            timeout * 1000);
-                    }
+                    context.getDeliveryChannel().sendSync(exchange,
+                        timeout * 1000);
                     process(exchange);
                 } else {
                     synchronized (((ContinuationProvider) message.get(

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java?rev=720747&r1=720746&r2=720747&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java Tue Nov 25 21:42:53 2008
@@ -21,6 +21,9 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.calculator.AddNumbersFault;
 import org.apache.cxf.calculator.CalculatorPortType;
 import org.apache.cxf.calculator.CalculatorService;
@@ -37,6 +40,13 @@
 public class CxfBCSESystemTest extends SpringTestSupport {
     
     private static final Logger LOG = LogUtils.getL7dLogger(CxfBCSESystemTest.class);
+    
+    static {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus("org/apache/servicemix/cxfbc/jettyThreadPool.xml");
+        BusFactory.setDefaultBus(bus);
+    }
+    
     public void setUp() throws Exception {
         //override super setup
         LOG.info("setUp is invoked");
@@ -117,6 +127,7 @@
     }
     
     private void multiClientTestBase() throws Exception {
+        
         URL wsdl = getClass().getResource("/wsdl/calculator.wsdl");
         assertNotNull(wsdl);
         CalculatorService service = new CalculatorService(wsdl, new QName(