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/12/01 10:06:05 UTC

svn commit: r722003 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/src: main/java/org/apache/servicemix/cxfbc/ test/java/org/apache/servicemix/cxfbc/ test/resources/org/apache/servicemix/cxfbc/

Author: ffang
Date: Mon Dec  1 01:06:05 2008
New Revision: 722003

URL: http://svn.apache.org/viewvc?rev=722003&view=rev
Log:
[SM-1592]cxf-bc consumer should allow async sending of message exchanges to the NMR

Added:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java   (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java   (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java   (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml   (with props)
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml   (with props)
Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcJmsTest.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_test_timeout.xml
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/xbean_asyn.xml

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=722003&r1=722002&r2=722003&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Mon Dec  1 01:06:05 2008
@@ -59,6 +59,9 @@
 import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
 import org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.continuations.Continuation;
+import org.apache.cxf.continuations.ContinuationProvider;
+import org.apache.cxf.continuations.SuspendedInvocationException;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.endpoint.Server;
@@ -88,6 +91,7 @@
 import org.apache.cxf.transport.ChainInitiationObserver;
 import org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
 import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
+import org.apache.cxf.transport.http_jetty.continuations.JettyContinuationWrapper;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.rm.Servant;
 import org.apache.cxf.wsdl.WSDLManager;
@@ -261,15 +265,20 @@
     }
 
     public void process(MessageExchange exchange) throws Exception {
-        synchronized (messages.get(exchange.getExchangeId())) {
-            messages.get(exchange.getExchangeId()).notifyAll();
-        }
         Message message = messages.remove(exchange.getExchangeId());
-        if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
-            exchange.setStatus(ExchangeStatus.DONE);
-            message.getExchange().get(ComponentContext.class)
+        synchronized (message.getInterceptorChain()) {
+            if (!isSynchronous()) {
+                ContinuationProvider continuationProvider = (ContinuationProvider) message
+                    .get(ContinuationProvider.class.getName());
+                continuationProvider.getContinuation().resume();
+            }
+            if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
+                exchange.setStatus(ExchangeStatus.DONE);
+                message.getExchange().get(ComponentContext.class)
                     .getDeliveryChannel().send(exchange);
-        }
+            }
+       }
+
     }
 
     @Override
@@ -567,6 +576,8 @@
             final Service service = endpoint.getService();
             final Invoker invoker = service.getInvoker();
 
+            
+            
             if (invoker instanceof Servant) {
                 // it's rm request, run the invocation directly in bc, not send
                 // to se.
@@ -622,12 +633,27 @@
                             timeout);
                     process(exchange);
                 } else {
-                     synchronized (CxfBcConsumer.this.messages.get(exchange.getExchangeId())) {
-                         context.getDeliveryChannel().send(exchange);
-                         CxfBcConsumer.this.messages.get(exchange.getExchangeId()).wait(timeout);
-                     }
+                    synchronized (((ContinuationProvider) message.get(
+                        ContinuationProvider.class.getName())).getContinuation()) {
+                        ContinuationProvider continuationProvider =
+                            (ContinuationProvider) message.get(ContinuationProvider.class.getName());
+                        Continuation continuation = continuationProvider.getContinuation();
+                        if (!continuation.isPending()) {
+                            context.getDeliveryChannel().send(exchange);
+                            continuation.suspend(timeout * 1000);
+                        } else {
+                            //retry or timeout
+                            if (!continuation.isResumed()) {
+                                //exchange timeout
+                                throw new Exception("Exchange timed out: " + exchange.getExchangeId());
+                            }
+
+                        }
 
+                     }
                 }
+            } catch (org.apache.cxf.continuations.SuspendedInvocationException e) {
+                throw e;
             } catch (Exception e) {
                 throw new Fault(e);
             }
@@ -643,7 +669,7 @@
         }
 
         public void handleMessage(final Message message) throws Fault {
-            MessageExchange exchange = message
+        	MessageExchange exchange = message
                     .getContent(MessageExchange.class);
             Exchange ex = message.getExchange();
             if (exchange.getStatus() == ExchangeStatus.ERROR) {

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java?rev=722003&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java Mon Dec  1 01:06:05 2008
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.servicemix.cxfbc;
+
+import org.apache.cxf.binding.jbi.JBIFault;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.servicemix.cxfbc.CxfBcConsumer.JbiPostInvokerInterceptor;
+
+public class AsyncCxfBcConsumerInterceptor extends AbstractPhaseInterceptor {
+   
+	private long currentThreadId;
+	private long before;
+	private boolean firstInvocation = true;
+	
+	public AsyncCxfBcConsumerInterceptor() {
+		super(Phase.POST_INVOKE);
+		addAfter(JbiPostInvokerInterceptor.class.getName());
+	}
+
+	public void handleMessage(Message message) throws Fault {
+		if (firstInvocation) {
+			firstInvocation = false;
+			currentThreadId = Thread.currentThread().getId();
+			before = System.currentTimeMillis();
+		} else {
+			if (Thread.currentThread().getId() != currentThreadId) {
+				//ensure only one thread is used for the cxf bc consumer
+				throw new JBIFault("not invoked by the same thread");
+			}
+		}
+	}
+
+}

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/AsyncCxfBcConsumerInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java?rev=722003&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java Mon Dec  1 01:06:05 2008
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.servicemix.cxfbc;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.calculator.AddNumbersFault;
+import org.apache.cxf.calculator.CalculatorPortType;
+import org.apache.cxf.calculator.types.CalculatorFault;
+
+@WebService(serviceName = "CalculatorService", 
+            portName = "CalculatorPort", 
+            targetNamespace = "http://apache.org/cxf/calculator", 
+            endpointInterface = "org.apache.cxf.calculator.CalculatorPortType",
+            wsdlLocation = "testutils/calculator.wsdl")
+public class CalculatorImpl implements CalculatorPortType {
+    public int add(int number1, int number2) throws AddNumbersFault {
+        if (number1 < 0 || number2 < 0) {
+            CalculatorFault fault = new CalculatorFault();
+            fault.setMessage("Negative number cant be added!");
+            fault.setFaultInfo("Numbers: " + number1 + ", " + number2);
+            throw new AddNumbersFault("Negative number cant be added!", fault);
+        }
+        try {
+			Thread.sleep(8000 - number2 * 4000);
+        } catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+        return number1 + number2;
+    }
+
+}

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CalculatorImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java?rev=722003&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java Mon Dec  1 01:06:05 2008
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.cxfbc;
+
+import java.net.URL;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.calculator.CalculatorPortType;
+import org.apache.cxf.calculator.CalculatorService;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+
+import org.apache.servicemix.jbi.container.SpringJBIContainer;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.tck.SpringTestSupport;
+import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class CxfBCConsumerAsynTest extends SpringTestSupport {
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(CxfBCConsumerAsynTest.class);
+    public void setUp() throws Exception {
+        //override super setup
+        LOG.info("setUp is invoked");
+    }
+    
+    public void setUpJBI(String beanFile) throws Exception {
+        if (context != null) {
+            context.refresh();
+        }
+        transformer = new SourceTransformer();
+        if (beanFile == null) {
+            context = createBeanFactory();
+        } else {
+            context = createBeanFactory(beanFile);
+        }
+                
+        jbi = (SpringJBIContainer) context.getBean("jbi");
+        assertNotNull("JBI Container not found in spring!", jbi);
+    }
+    
+    public void tearDown() throws Exception {
+        if (context != null) {
+            context.destroy();
+            context = null;
+        }
+        if (jbi != null) {
+            jbi.shutDown();
+            jbi.destroy();
+            jbi = null;
+        }
+    }
+
+    public void testMultipleClientWithAsyn() throws Exception {
+        setUpJBI("org/apache/servicemix/cxfbc/xbean_asyn.xml");
+        multiClientTestBase();
+    }
+
+        
+    private void multiClientTestBase() throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/calculator.wsdl");
+        assertNotNull(wsdl);
+        CalculatorService service = new CalculatorService(wsdl, new QName(
+                "http://apache.org/cxf/calculator", "CalculatorService"));
+        CalculatorPortType port = service.getCalculatorPort();
+        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(port).getOutInterceptors().add(new LoggingOutInterceptor());
+        MultiClientThread[] clients = new MultiClientThread[2];
+        for (int i = 0; i < clients.length; i++) {
+            clients[i] = new MultiClientThread(port, i);
+        }
+        
+        for (int i = 0; i < clients.length; i++) {
+            clients[i].start();
+        }
+        
+        for (int i = 0; i < clients.length; i++) {
+            clients[i].join();
+            //ensure the second invocation return first since it's less time consuming
+            assertEquals(clients[i].getResult(), "20");
+        }
+    }
+    
+    
+    @Override
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        // load cxf se and bc from spring config file
+        return new ClassPathXmlApplicationContext(
+                "org/apache/servicemix/cxfbc/xbean.xml");
+    }
+    
+    protected AbstractXmlApplicationContext createBeanFactory(String beanFile) {
+        //load cxf se and bc from specified spring config file
+        return new ClassPathXmlApplicationContext(
+            beanFile);
+    }
+
+}
+
+class MultiClientThread extends Thread {
+    private CalculatorPortType port;
+    static String result = "";
+    private int index;
+    
+    public MultiClientThread(CalculatorPortType port, int index) {
+        this.port = port;
+        this.index = index;
+    }
+    
+    public void run() {
+        try {
+        	int ret = port.add(index, index);
+        	if (ret == 2 * index) {
+        		result = result + ret;
+        	}
+        } catch (Exception ex) {
+        	result = "invocation failed " + ex.getMessage();
+        }
+    }
+    
+    public String getResult() {
+    	return result;
+    }
+    
+}
+

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCConsumerAsynTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java?rev=722003&r1=722002&r2=722003&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBCSESystemTest.java Mon Dec  1 01:06:05 2008
@@ -94,11 +94,6 @@
         multiClientTestBase();
     }
     
-    public void testMultipleClientWithAsyn() throws Exception {
-        setUpJBI("org/apache/servicemix/cxfbc/xbean_asyn.xml");
-        multiClientTestBase();
-    }
-
     
     private void calculatorTestBase() throws Exception {
 

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcJmsTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcJmsTest.java?rev=722003&r1=722002&r2=722003&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcJmsTest.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcJmsTest.java Mon Dec  1 01:06:05 2008
@@ -32,6 +32,8 @@
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.HelloWorldService;
 import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
+import org.apache.servicemix.jbi.container.SpringJBIContainer;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
 import org.springframework.context.support.AbstractXmlApplicationContext;
@@ -68,10 +70,25 @@
     
     protected void setUp() throws Exception {
         startServers();
-        super.setUp();
+        //super.setUp();
             
     }
     
+    public void setUpJBI(String beanFile) throws Exception {
+        if (context != null) {
+            context.refresh();
+        }
+        transformer = new SourceTransformer();
+        if (beanFile == null) {
+            context = createBeanFactory();
+        } else {
+            context = createBeanFactory(beanFile);
+        }
+
+        jbi = (SpringJBIContainer) context.getBean("jbi");
+        assertNotNull("JBI Container not found in spring!", jbi);
+    }
+    
     protected void tearDown() throws Exception {
         try {
             embeddedLauncher.stopServer();         
@@ -104,6 +121,16 @@
     }
 
     public void testJMSTransport() throws Exception {
+        setUpJBI("org/apache/servicemix/cxfbc/jms_transport.xml");
+        jmsTestBase();
+    }
+    
+    public void testJMSTransportAsynConsumer() throws Exception {
+        setUpJBI("org/apache/servicemix/cxfbc/jms_transport_asyn.xml");
+        jmsTestBase();
+    }
+
+    private void jmsTestBase() throws Exception, NoSuchCodeLitFault, BadRecordLitFault {
         SpringBusFactory bf = new SpringBusFactory();
         Bus testBus = bf.createBus("org/apache/servicemix/cxfbc/jms_test_timeout.xml");
         BusFactory.setDefaultBus(testBus);
@@ -153,7 +180,6 @@
         } catch (UndeclaredThrowableException ex) {
             throw (Exception) ex.getCause();
         }
-
     }
 
     @Override
@@ -162,6 +188,11 @@
                 "org/apache/servicemix/cxfbc/jms_transport.xml");
     }
     
+    protected AbstractXmlApplicationContext createBeanFactory(String beanFile) {
+        // load cxf se and bc from specified spring config file
+        return new ClassPathXmlApplicationContext(beanFile);
+    }
+    
     public QName getServiceName(QName q) {
         return q;
     }

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml?rev=722003&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml Mon Dec  1 01:06:05 2008
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<!-- 
+  ** This file configures the Cherry Server.
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+  xsi:schemaLocation="
+       http://cxf.apache.org/configuration/security  		      http://cxf.apache.org/schemas/configuration/security.xsd
+            http://cxf.apache.org/transports/http/configuration
+            http://cxf.apache.org/schemas/configuration/http-conf.xsd
+            http://cxf.apache.org/transports/http-jetty/configuration
+            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+            http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+  <http:destination name="{http://apache.org/cxf/calculator}CalculatorPort.http-destination"> 
+  </http:destination>
+
+  <httpj:engine-factory bus="cxf">
+   <httpj:engine port="9000">
+       <httpj:threadingParameters minThreads="1" maxThreads="2" />
+   </httpj:engine>
+  </httpj:engine-factory>
+  
+  <!-- We need a bean named "cxf" -->
+  <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
+</beans>

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jettyThreadPool.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_test_timeout.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_test_timeout.xml?rev=722003&r1=722002&r2=722003&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_test_timeout.xml (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_test_timeout.xml Mon Dec  1 01:06:05 2008
@@ -30,7 +30,7 @@
         <jms:clientConfig clientReceiveTimeout="20000"/>
     </jms:conduit>
     <jms:conduit name="{http://apache.org/hello_world_soap_http}HelloWorldPortProxy.jms-conduit" abstract="true">
-        <jms:clientConfig clientReceiveTimeout="20000"/>
+        <jms:clientConfig clientReceiveTimeout="200000"/>
     </jms:conduit>
 
 </beans>

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml?rev=722003&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml Mon Dec  1 01:06:05 2008
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  
+-->
+<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
+       xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
+       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
+       xmlns:test="urn:test"
+       xmlns:greeter="http://apache.org/hello_world_soap_http"
+       >
+  
+  <sm:container id="jbi" embedded="true">
+    
+    <sm:endpoints>
+      <!--cxfse:endpoint>
+        <cxfse:pojo>
+          <bean class="org.apache.servicemix.cxfbc.GreeterImplTwoWayJMS" />
+        </cxfse:pojo>
+        <cxfse:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inInterceptors>
+        <cxfse:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outInterceptors>
+        <cxfse:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inFaultInterceptors>
+        <cxfse:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outFaultInterceptors>
+      </cxfse:endpoint-->
+      <cxfbc:consumer wsdl="org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl"
+                      service="greeter:HelloWorldService"
+                      endpoint="HelloWorldPort"
+                      targetEndpoint="HelloWorldPortProxy"
+                      targetService="greeter:HelloWorldService"
+                      targetInterface="greeter:Greeter"
+                      synchronous="false"
+                      timeout="100"
+                      >
+        <cxfbc:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inInterceptors>
+        <cxfbc:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outInterceptors>
+        <cxfbc:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfbc:inFaultInterceptors>
+        <cxfbc:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfbc:outFaultInterceptors>
+      </cxfbc:consumer>
+      <cxfbc:provider wsdl="org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl"
+                      service="greeter:HelloWorldService"
+                      endpoint="HelloWorldPortProxy"
+                      interfaceName="greeter:Greetr"
+                      synchronous="false"
+                     >
+          <cxfbc:inInterceptors>
+            <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+          </cxfbc:inInterceptors>
+          <cxfbc:outInterceptors>
+            <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+          </cxfbc:outInterceptors>
+          <cxfbc:inFaultInterceptors>
+            <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+          </cxfbc:inFaultInterceptors>
+          <cxfbc:outFaultInterceptors>
+            <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+          </cxfbc:outFaultInterceptors>
+      </cxfbc:provider>
+    </sm:endpoints>
+    
+  </sm:container>
+  
+</beans>

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/jms_transport_asyn.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/xbean_asyn.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/xbean_asyn.xml?rev=722003&r1=722002&r2=722003&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/xbean_asyn.xml (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/xbean_asyn.xml Mon Dec  1 01:06:05 2008
@@ -28,7 +28,7 @@
     <sm:endpoints>
       <cxfse:endpoint>
         <cxfse:pojo>
-          <bean class="org.apache.cxf.calculator.CalculatorImpl" />
+          <bean class="org.apache.servicemix.cxfbc.CalculatorImpl" />
         </cxfse:pojo>
         <cxfse:inInterceptors>
           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
@@ -48,9 +48,11 @@
                       targetService="calculator:CalculatorService"
                       targetInterface="calculator:CalculatorPortType"
                       synchronous="false"
+                      busCfg="org/apache/servicemix/cxfbc/jettyThreadPool.xml"
                       >
         <cxfbc:inInterceptors>
           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+          <bean class="org.apache.servicemix.cxfbc.AsyncCxfBcConsumerInterceptor"/>
         </cxfbc:inInterceptors>
         <cxfbc:outInterceptors>
           <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>