You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/10/15 22:41:35 UTC

svn commit: r584908 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/transport/ api/src/main/java/org/apache/cxf/wsdl/ rt/core/src/main/java/org/apache/cxf/bus/spring/ rt/core/src/main/java/org/apache/cxf/configuration/spring/ rt/core/src/ma...

Author: dkulp
Date: Mon Oct 15 13:41:32 2007
New Revision: 584908

URL: http://svn.apache.org/viewvc?rev=584908&view=rev
Log:
[CXF-922]
* Fix issue of RMManager causing all client conduits to be created immediately
* Fix issue of Configurer not being available for spring created beans
* Fix extra prints in JAXBDataBinding
* Fix some race conditions with LocalTransport
* Fix to make sure jetty-less clients should work

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/transport/ConduitInitiator.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/MessageReplayObserver.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
    incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/ClientServerTest.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/transport/ConduitInitiator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/transport/ConduitInitiator.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/transport/ConduitInitiator.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/transport/ConduitInitiator.java Mon Oct 15 13:41:32 2007
@@ -20,6 +20,7 @@
 package org.apache.cxf.transport;
 
 import java.io.IOException;
+import java.util.List;
 import java.util.Set;
 
 import org.apache.cxf.service.model.EndpointInfo;
@@ -49,4 +50,5 @@
                        EndpointReferenceType target) throws IOException;
     
     Set<String> getUriPrefixes();
+    List<String> getTransportIds();
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java Mon Oct 15 13:41:32 2007
@@ -86,15 +86,10 @@
                         registry.registerDeserializer(parentType, elementType, helper); 
                         registry.registerSerializer(parentType, elementType, helper);                         
                         registry.mapExtensionTypes(parentType, elementType, cls);                        
-                        registry.createExtension(parentType, elementType);
                     }                    
                 }
             }        
             
-        } catch (WSDLException we) {
-            // TODO
-            we.printStackTrace();            
-
         } catch (ClassNotFoundException ex) {
             // TODO
             ex.printStackTrace();            

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java Mon Oct 15 13:41:32 2007
@@ -29,8 +29,6 @@
 import org.apache.cxf.buslifecycle.BusLifeCycleListener;
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.configuration.spring.ConfigurerImpl;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 
@@ -47,6 +45,10 @@
     public SpringBusFactory(ApplicationContext context) {
         this.context = context;
     }
+    
+    public ApplicationContext getApplicationContext() {
+        return context;
+    }
         
     public Bus createBus() {
         return createBus((String)null);
@@ -68,7 +70,7 @@
     private Bus finishCreatingBus(BusApplicationContext bac) {
         final Bus bus = (Bus)bac.getBean(Bus.DEFAULT_BUS_ID);
 
-        bus.setExtension(new ConfigurerImpl(bac), Configurer.class);
+        //bus.setExtension(new ConfigurerImpl(bac), Configurer.class);
         bus.setExtension(bac, BusApplicationContext.class);
 
         possiblySetDefaultBus(bus);

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Mon Oct 15 13:41:32 2007
@@ -29,6 +29,7 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurable;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.extension.BusExtension;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
@@ -38,9 +39,11 @@
 import org.springframework.beans.factory.wiring.BeanWiringInfo;
 import org.springframework.beans.factory.wiring.BeanWiringInfoResolver;
 import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
 import org.springframework.core.io.ClassPathResource;
 
-public class ConfigurerImpl extends BeanConfigurerSupport implements Configurer {
+public class ConfigurerImpl extends BeanConfigurerSupport 
+    implements Configurer, ApplicationContextAware, BusExtension {
     
     private static final Logger LOG = LogUtils.getL7dLogger(ConfigurerImpl.class);
     private static final String DEFAULT_USER_CFG_FILE = "cxf.xml";
@@ -198,9 +201,13 @@
         return beanName;
     }
     
-    private void setApplicationContext(ApplicationContext ac) {
+    public final void setApplicationContext(ApplicationContext ac) {
         appContext = ac;
         setBeanFactory(appContext.getAutowireCapableBeanFactory());
         initWildcardDefinitionMap();
+    }
+
+    public Class<?> getRegistrationType() {
+        return Configurer.class;
     }
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Mon Oct 15 13:41:32 2007
@@ -253,16 +253,22 @@
         // execute chain        
         chain.doIntercept(message);
 
-        getConduitSelector().complete(exchange);
         
         // Check to see if there is a Fault from the outgoing chain
         Exception ex = message.getContent(Exception.class);
-        
+        boolean mepCompleteCalled = false;
         if (ex != null) {
-            throw ex;
+            getConduitSelector().complete(exchange);
+            mepCompleteCalled = true;
+            if (message.getContent(Exception.class) != null) {
+                throw ex;
+            }
         }
         ex = message.getExchange().get(Exception.class);
         if (ex != null) {
+            if (!mepCompleteCalled) {
+                getConduitSelector().complete(exchange);
+            }
             throw ex;
         }
         
@@ -272,6 +278,7 @@
                 waitResponse(exchange);
             }
         }
+        getConduitSelector().complete(exchange);
 
         // Grab the response objects if there are any
         List resList = null;

Modified: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml (original)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml Mon Oct 15 13:41:32 2007
@@ -37,6 +37,9 @@
        </constructor-arg>
        <property name="bus" ref="cxf"/>
     </bean>
+    <bean id="org.apache.cxf.configuration.Configurer" 
+    	class="org.apache.cxf.configuration.spring.ConfigurerImpl">
+    </bean>    
         
     <bean id="org.apache.cxf.binding.BindingFactoryManager" class="org.apache.cxf.binding.BindingFactoryManagerImpl">
         <constructor-arg>

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java Mon Oct 15 13:41:32 2007
@@ -45,7 +45,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Result;
-import javax.xml.transform.TransformerException;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
 
@@ -64,7 +63,6 @@
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.databinding.source.AbstractDataBinding;
-import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxb.io.DataReaderImpl;
 import org.apache.cxf.jaxb.io.DataWriterImpl;
 import org.apache.cxf.service.Service;
@@ -221,11 +219,6 @@
             Collection<DOMSource> schemas = getSchemas();
             if (schemas != null) {
                 for (DOMSource r : schemas) {
-                    try {
-                        DOMUtils.writeXml(r.getNode(), System.out);
-                    } catch (TransformerException e) {
-                        throw new RuntimeException(e);
-                    }
                     addSchemaDocument(serviceInfo, col, 
                                       (Document)r.getNode(), r.getSystemId());
                 }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java Mon Oct 15 13:41:32 2007
@@ -81,6 +81,7 @@
 
 public class DispatchImpl<T> extends BindingProviderImpl implements Dispatch<T>, MessageObserver {
     private static final Logger LOG = LogUtils.getL7dLogger(DispatchImpl.class);
+    private static final String FINISHED = "exchange.finished";
 
     private Bus bus;
     private InterceptorProvider iProvider;
@@ -171,9 +172,9 @@
         // execute chain
         chain.doIntercept(message);
         
-        getConduitSelector().complete(exchange);
                 
         if (message.getContent(Exception.class) != null) {
+            getConduitSelector().complete(exchange);
             if (getBinding() instanceof SOAPBinding) {
                 try {
                     SOAPFault soapFault = SOAPFactory.newInstance().createFault();
@@ -206,6 +207,7 @@
             synchronized (exchange) {
                 Message inMsg = waitResponse(exchange);
                 respContext.putAll(inMsg);
+                getConduitSelector().complete(exchange);
                 //need to do context mapping from cxf message to jax-ws 
                 ContextPropertiesMapping.mapResponsefromCxf2Jaxws(respContext);
                 return cl.cast(inMsg.getContent(Object.class));
@@ -216,6 +218,13 @@
     }
 
     private Message waitResponse(Exchange exchange) {
+        while (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
+            try {
+                exchange.wait();
+            } catch (InterruptedException e) {
+                //TODO - timeout
+            }
+        }
         Message inMsg = exchange.getInMessage();
         if (inMsg == null) {
             try {
@@ -303,6 +312,7 @@
             chain.doIntercept(message);
         } finally {
             synchronized (message.getExchange()) {
+                message.getExchange().put(FINISHED, Boolean.TRUE);
                 message.getExchange().setInMessage(message);
                 message.getExchange().notifyAll();
             }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxWsTest.java Mon Oct 15 13:41:32 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.jaxws;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.soap.SoapBindingFactory;
 import org.apache.cxf.binding.soap.SoapTransportFactory;
@@ -28,6 +29,7 @@
 import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl11.WSDLManagerImpl;
 import org.junit.Before;
+import org.junit.BeforeClass;
 
 /**
  * Abstract test which sets up the local transport and soap binding.
@@ -36,6 +38,12 @@
 
     protected LocalTransportFactory localTransport;
 
+    @BeforeClass
+    public static void checkBus() throws Exception {
+        if (BusFactory.getDefaultBus(false) != null) {
+            throw new Exception("Bus was not null!!!  Check cleanup of previously run tests!!!");
+        }
+    }
 
     @Before
     public void setUpBus() throws Exception {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/MessageReplayObserver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/MessageReplayObserver.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/MessageReplayObserver.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/MessageReplayObserver.java Mon Oct 15 13:41:32 2007
@@ -42,6 +42,7 @@
             while (in.read() != -1) {
                 // do nothing
             }
+            in.close();
             
             Conduit backChannel = message.getDestination().getBackChannel(message, null, null);
 
@@ -53,7 +54,6 @@
             IOUtils.copy(res, out, 2045);
 
             res.close();
-            in.close();
             out.close();
             backChannel.close(message);
         } catch (Exception e) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java Mon Oct 15 13:41:32 2007
@@ -24,6 +24,7 @@
 
 import junit.framework.Assert;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.BindingConfiguration;
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapBindingConfiguration;
@@ -41,10 +42,20 @@
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.jaxws.service.Hello;
 import org.apache.hello_world_soap_http.Greeter;
+import org.junit.After;
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class SpringBeansTest extends Assert {
+    
+    @After
+    public void tearDown() throws Exception {
+        if (BusFactory.getDefaultBus(false) != null) {
+            BusFactory.getDefaultBus(false).shutdown(true);
+        }
+    }
+
+    
     @Test
     public void testEndpoints() throws Exception {
         ClassPathXmlApplicationContext ctx = 
@@ -143,6 +154,7 @@
         assertTrue("Could not find server factory with autogenerated id", found);
         
         testInterceptors(ctx);
+        
     }
 
     private void testInterceptors(ClassPathXmlApplicationContext ctx) {

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/AbstractEndpointFactory.java Mon Oct 15 13:41:32 2007
@@ -49,6 +49,8 @@
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
+import org.apache.cxf.transport.ConduitInitiator;
+import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.transport.local.LocalTransportFactory;
@@ -173,9 +175,15 @@
                 DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
                 df = dfm.getDestinationFactoryForUri(getAddress());
             }
-            
             if (df != null) {
                 transportId = df.getTransportIds().get(0);
+            } else {
+                //check conduits (the address could be supported on client only)
+                ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class);
+                ConduitInitiator ci = cim.getConduitInitiatorForUri(getAddress());
+                if (ci != null) {
+                    transportId = ci.getTransportIds().get(0);
+                }
             }
         }
         

Modified: incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/ClientServerTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/ClientServerTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/spring/ClientServerTest.java Mon Oct 15 13:41:32 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.cxf.frontend.spring;
 import junit.framework.Assert;
+
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.service.factory.HelloService;
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -28,6 +30,7 @@
 public class ClientServerTest extends Assert {
     @Test
     public void testClientServer() {
+        BusFactory.setDefaultBus(null);
         ClassPathXmlApplicationContext ctx = 
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/frontend/spring/rountrip.xml"});
         

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Mon Oct 15 13:41:32 2007
@@ -87,7 +87,7 @@
     // ServerLifeCycleListener
     
     public void startServer(Server server) {
-        recoverReliableEndpoint(server.getEndpoint(), null);
+        recoverReliableEndpoint(server.getEndpoint(), (Conduit)null);
     }
 
     public void stopServer(Server server) {
@@ -97,6 +97,17 @@
     // ClientLifeCycleListener
     
     public void clientCreated(Client client) {
+        if (null == store || null == retransmissionQueue) {
+            return;
+        }        
+        String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
+        
+        Collection<SourceSequence> sss = store.getSourceSequences(id);
+        if (null == sss || 0 == sss.size()) {                        
+            return;
+        }
+        LOG.log(Level.FINE, "Number of source sequences: {0}", sss.size());
+        
         recoverReliableEndpoint(client.getEndpoint(), client.getConduit());
     }
     
@@ -372,7 +383,6 @@
         LOG.log(Level.FINE, "Number of source sequences: {0}", sss.size());
         
         RMEndpoint rme = null;
-        
         for (SourceSequence ss : sss) {            
  
             Collection<RMMessage> ms = store.getMessages(ss.getIdentifier(), true);

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java Mon Oct 15 13:41:32 2007
@@ -136,7 +136,7 @@
         Server s = control.createMock(Server.class);
         Endpoint e = control.createMock(Endpoint.class);
         EasyMock.expect(s.getEndpoint()).andReturn(e);
-        manager.recoverReliableEndpoint(e, null);
+        manager.recoverReliableEndpoint(e, (Conduit)null);
         EasyMock.expectLastCall();
         control.replay();
         manager.startServer(s);
@@ -164,12 +164,15 @@
             .getDeclaredMethod("recoverReliableEndpoint", new Class[] {Endpoint.class, Conduit.class});
         manager = control.createMock(RMManager.class, new Method[] {m});
         Client client = control.createMock(Client.class);
-        Endpoint endpoint = control.createMock(Endpoint.class);
-        EasyMock.expect(client.getEndpoint()).andReturn(endpoint);
-        Conduit conduit = control.createMock(Conduit.class);
-        EasyMock.expect(client.getConduit()).andReturn(conduit);
-        manager.recoverReliableEndpoint(endpoint, conduit);
-        EasyMock.expectLastCall();
+        
+        //none of this is called if no store
+        
+        //Endpoint endpoint = control.createMock(Endpoint.class);
+        //EasyMock.expect(client.getEndpoint()).andReturn(endpoint);
+        //Conduit conduit = control.createMock(Conduit.class);
+        //EasyMock.expect(client.getConduit()).andReturn(conduit).anyTimes();
+        //manager.recoverReliableEndpoint(endpoint, conduit);
+        //EasyMock.expectLastCall();
         control.replay();
         manager.clientCreated(client);
         control.verify();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java Mon Oct 15 13:41:32 2007
@@ -139,7 +139,8 @@
             // java.net.ConnectionException on the unavailable 
             // replica A
             //
-            assertTrue("should revert to original exception when no failover",
+            assertTrue("should revert to original exception when no failover: " 
+                       + cause,
                        cause instanceof ConnectException);
             
             // similarly the current endpoint referenced by the client 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java Mon Oct 15 13:41:32 2007
@@ -41,6 +41,8 @@
 import org.xml.sax.InputSource;
 
 
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -311,7 +313,13 @@
 
     @Test
     public void testJAXBObjectPAYLOADWithFeature() throws Exception {
-        createBus("org/apache/cxf/systest/dispatch/client-config.xml");
+        bus = BusFactory.getDefaultBus(false);
+        bus.shutdown(true);
+        
+        this.configFileName = "org/apache/cxf/systest/dispatch/client-config.xml";
+        SpringBusFactory bf = (SpringBusFactory)SpringBusFactory.newInstance();
+        bus = bf.createBus(configFileName, false);
+        
         URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(wsdl);
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/client-config.xml Mon Oct 15 13:41:32 2007
@@ -23,7 +23,12 @@
 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
 
-     <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapDispatchPort" createdFromAPI="true">
+
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+	<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
+
+    <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapDispatchPort" createdFromAPI="true">
          <jaxws:features>
              <bean class="org.apache.cxf.systest.dispatch.TestDispatchFeature"/>
          </jaxws:features>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java Mon Oct 15 13:41:32 2007
@@ -36,6 +36,7 @@
 import javax.net.ssl.TrustManagerFactory;
 import javax.xml.namespace.QName;
 
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.BusApplicationContext;
@@ -64,6 +65,8 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import org.springframework.context.ApplicationContext;
+
 /**
  * This class tests several issues and Conduit policies based 
  * on a set up of redirecting servers.
@@ -413,17 +416,14 @@
     @Test
     public void testGetClientFromSpringContext() throws Exception {
         startServer("Bethal");        
-        // The http conduit configuration file , it supports wildcard 
-        URL config = getClass().getResource("resources/BethalClientConfig.cxf");
+        
+        BusFactory.setDefaultBus(null);
         // The client bean configuration file
         URL beans = getClass().getResource("resources/BethalClientBeans.xml");
         // We go through the back door, setting the default bus.
-        new DefaultBusFactory().createBus(config);
-        // Init the context which contains the client bean, 
-        // and we use the already loaded bus to set the configuration
-        // The false parameter means we just use the default bus 
-        // which just set by the DefaultBusFactory
-        BusApplicationContext context = new BusApplicationContext(beans, false);
+        Bus bus = new DefaultBusFactory().createBus(beans);
+        
+        ApplicationContext context = bus.getExtension(BusApplicationContext.class);
         Greeter bethal = (Greeter)context.getBean("Bethal");        
         // verify the client side's setting
         verifyBethalClient(bethal);         

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml Mon Oct 15 13:41:32 2007
@@ -34,6 +34,9 @@
               http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
  
+
+	<import resource="classpath:org/apache/cxf/systest/http/resources/BethalClientConfig.cxf" />
+    
     <jaxws:client id="Bethal" 
     serviceClass="org.apache.hello_world.Greeter"
     serviceName="s:SOAPService"

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=584908&r1=584907&r2=584908&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java Mon Oct 15 13:41:32 2007
@@ -306,7 +306,6 @@
                                           output.getCanonicalPath() + "/classes", "-d",
                                           output.getCanonicalPath(), "-b",
                                           getLocation("/wsdl2java_wsdl/bug305924/binding2.xml"),
-                                          "-verbose",
                                           getLocation("/wsdl2java_wsdl/bug305924/hello_world.wsdl")};
             WSDLToJava.main(args);
         } catch (Exception e) {