Index: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
===================================================================
--- modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java	(revision 18945)
+++ modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java	(working copy)
@@ -1,6 +1,6 @@
 /*
  * JBoss, Home of Professional Open Source.
- * Copyright 2013, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
@@ -21,6 +21,7 @@
  */
 package org.jboss.wsf.stack.cxf.client;
 
+import static org.jboss.wsf.stack.cxf.client.Constants.JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR;
 import static org.jboss.wsf.stack.cxf.client.Constants.JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY;
 import static org.jboss.wsf.stack.cxf.client.Constants.NEW_BUS_STRATEGY;
 import static org.jboss.wsf.stack.cxf.client.Constants.TCCL_BUS_STRATEGY;
@@ -28,9 +29,11 @@
 
 import javax.xml.ws.WebServiceFeature;
 
+import org.apache.cxf.Bus;
 import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
 import org.jboss.wsf.stack.cxf.Loggers;
 import org.jboss.wsf.stack.cxf.Messages;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
 
 /**
  * A class selecting the proper bus to be used for creating a
@@ -40,8 +43,9 @@
  * @since 03-Oct-2013
  *
  */
-public abstract class ClientBusSelector
+public class ClientBusSelector
 {
+   private static final ClientBusSelector instance;
    private static final String sysPropStrategy;
    static {
       final String propValue = SecurityActions.getSystemProperty(JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY, ClassLoaderProvider.isSet() ? TCCL_BUS_STRATEGY : THREAD_BUS_STRATEGY);
@@ -54,9 +58,23 @@
          Loggers.ROOT_LOGGER.unknownJAXWSClientBusStrategy(propValue);
          sysPropStrategy = THREAD_BUS_STRATEGY;
       }
+      final String selectorPropValue = SecurityActions.getSystemProperty(JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR, ClientBusSelector.class.getName());
+      ClientBusSelector cbs;
+      try {
+         Class<?> clazz = Class.forName(selectorPropValue);
+         cbs = (ClientBusSelector)clazz.newInstance();
+      } catch (Exception e) {
+         //TODO i18n warning...
+         cbs = new ClientBusSelector();
+      }
+      instance = cbs;
    }
    
-   public static String selectStrategy(WebServiceFeature... features) {
+   public static ClientBusSelector getInstance() {
+      return instance;
+   }
+   
+   public String selectStrategy(WebServiceFeature... features) {
       boolean createNewBus = false;
       boolean tcclBoundBus = false;
       boolean threadBus = false;
@@ -104,6 +122,10 @@
       return featureStrategy != null ? featureStrategy : sysPropStrategy;
    }
    
+   public Bus createNewBus() {
+      return new JBossWSBusFactory().createBus();
+   }
+   
    public static String getDefaultStrategy() {
       return sysPropStrategy;
    }
Index: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
--- modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java	(revision 18945)
+++ modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java	(working copy)
@@ -50,4 +50,6 @@
    public static final String THREAD_BUS_STRATEGY = "THREAD_BUS";
    public static final String NEW_BUS_STRATEGY = "NEW_BUS";
    public static final String TCCL_BUS_STRATEGY = "TCCL_BUS";
+   public static final String JBWS_CXF_JAXWS_CLIENT_BUS_SELECTOR = "org.jboss.ws.cxf.jaxws-client.bus.selector";
+   public static final String JBWS_CXF_JAXWS_CLIENT_BUS_SPRING_DESCRIPTOR = "org.jboss.ws.cxf.jaxws-client.bus.spring.descriptor";
 }
Index: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java	(revision 18945)
+++ modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java	(working copy)
@@ -236,7 +236,7 @@
    @Override
    public ServiceDelegate createServiceDelegate(URL url, QName qname, Class cls)
    {
-      final String busStrategy = ClientBusSelector.selectStrategy();
+      final String busStrategy = ClientBusSelector.getInstance().selectStrategy();
       ClassLoader origClassLoader = getContextClassLoader();
       boolean restoreTCCL = false;
       Bus orig = null;
@@ -267,7 +267,7 @@
          }
       }
       
-      final String busStrategy = ClientBusSelector.selectStrategy(features);
+      final String busStrategy = ClientBusSelector.getInstance().selectStrategy(features);
       ClassLoader origClassLoader = getContextClassLoader();
       boolean restoreTCCL = false;
       Bus orig = null;
@@ -285,15 +285,15 @@
       }
    }
    
-   private static Bus getOrCreateBus(String strategy, ClassLoader threadContextClassLoader) {
+   private Bus getOrCreateBus(String strategy, ClassLoader threadContextClassLoader) {
       Bus bus = null;
       if (THREAD_BUS_STRATEGY.equals(strategy))
       {
-         bus = ProviderImpl.setValidThreadDefaultBus();
+         bus = setValidThreadDefaultBus();
       }
       else if (NEW_BUS_STRATEGY.equals(strategy))
       {
-         bus = new JBossWSBusFactory().createBus();
+         bus = ClientBusSelector.getInstance().createNewBus();
          //to prevent issues with CXF code using the default thread bus instead of the one returned here,
          //set the new bus as thread one, given the line above could have not done this if the current
          //thread is already assigned a bus
@@ -301,7 +301,7 @@
       }
       else if (TCCL_BUS_STRATEGY.equals(strategy))
       {
-         bus = JBossWSBusFactory.getClassLoaderDefaultBus(threadContextClassLoader);
+         bus = JBossWSBusFactory.getClassLoaderDefaultBus(threadContextClassLoader, ClientBusSelector.getInstance());
          //to prevent issues with CXF code using the default thread bus instead of the one returned here,
          //set the bus as thread one, given the line above could have not done this if we already had a
          //bus for the classloader and hence we did not create a new one
@@ -310,7 +310,7 @@
       return bus;
    }
    
-   private static void restoreThreadDefaultBus(final String busStrategy, final Bus origBus) {
+   private void restoreThreadDefaultBus(final String busStrategy, final Bus origBus) {
       if (origBus != null || !busStrategy.equals(Constants.THREAD_BUS_STRATEGY))
       {
          BusFactory.setThreadDefaultBus(origBus);
@@ -352,7 +352,7 @@
       return false;
    }
 
-   static Bus setValidThreadDefaultBus()
+   private Bus setValidThreadDefaultBus()
    {
       //we need to prevent using the default bus when the current
       //thread is not already associated to a bus. In those situations we create
@@ -360,7 +360,7 @@
       Bus bus = BusFactory.getThreadDefaultBus(false);
       if (bus == null)
       {
-         bus = new JBossWSBusFactory().createBus(); //this also set thread local bus internally as it's not set yet 
+         bus = ClientBusSelector.getInstance().createNewBus(); //this also set thread local bus internally as it's not set yet 
       }
       return bus;
    }
Index: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/SpringCustomClientBusSelector.java
===================================================================
--- modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/SpringCustomClientBusSelector.java	(revision 0)
+++ modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/SpringCustomClientBusSelector.java	(working copy)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client;
+
+import static org.jboss.wsf.stack.cxf.client.Constants.JBWS_CXF_JAXWS_CLIENT_BUS_SPRING_DESCRIPTOR;
+
+import org.apache.cxf.Bus;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
+
+public class SpringCustomClientBusSelector extends ClientBusSelector
+{
+   private static final String clientBusDescriptor = SecurityActions.getSystemProperty(JBWS_CXF_JAXWS_CLIENT_BUS_SPRING_DESCRIPTOR, "cxf-client.xml");
+   
+   @Override
+   public Bus createNewBus() {
+      return new JBossWSBusFactory().createBus(clientBusDescriptor);
+   }
+   
+}

Property changes on: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/SpringCustomClientBusSelector.java
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Rev Date
\ No newline at end of property
Index: modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
===================================================================
--- modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java	(revision 18945)
+++ modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java	(working copy)
@@ -30,6 +30,7 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.buslifecycle.BusLifeCycleListener;
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.jboss.wsf.stack.cxf.client.ClientBusSelector;
 import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
 
 /**
@@ -166,6 +167,29 @@
    }
    
    /**
+    * Gets the default bus for the given classloader; if a new Bus is needed,
+    * the creation is delegated to the specified ClientBusSelector instance.
+    * 
+    * @param classloader
+    * @param clientBusSelector
+    * @return
+    */
+   public static Bus getClassLoaderDefaultBus(final ClassLoader classloader, final ClientBusSelector clientBusSelector) {
+      Bus classLoaderBus;
+      synchronized (classLoaderBusses) {
+         classLoaderBus = classLoaderBusses.get(classloader);
+         if (classLoaderBus == null) {
+            classLoaderBus = clientBusSelector.createNewBus();
+            //register a listener for cleaning up the bus from the classloader association in the JBossWSBusFactory
+            BusLifeCycleListener listener = new ClassLoaderDefaultBusLifeCycleListener(classLoaderBus);
+            classLoaderBus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(listener);
+            classLoaderBusses.put(classloader, classLoaderBus);
+         }
+      }
+      return classLoaderBus;
+   }
+   
+   /**
     * Gets the default bus for the given classloader
     * 
     * @param classloader
