cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [4/4] cxf git commit: Experimentally simply remove spring and blueprint related classes to see how much cxf is tied to it
Date Fri, 23 Sep 2016 11:29:35 GMT
Experimentally simply remove spring and blueprint related classes to see how much cxf is tied to it


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5e965955
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5e965955
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5e965955

Branch: refs/heads/poc-remove-spring-bp
Commit: 5e96595577df58cafb780002fdc227333600b351
Parents: 7a5e269
Author: Christian Schneider <chris@die-schneider.net>
Authored: Fri Sep 23 13:29:06 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Fri Sep 23 13:29:06 2016 +0200

----------------------------------------------------------------------
 core/pom.xml                                    |   4 +
 .../cxf/bus/blueprint/BlueprintBeanLocator.java | 216 --------
 .../apache/cxf/bus/blueprint/BlueprintBus.java  |  78 ---
 .../BlueprintNameSpaceHandlerFactory.java       |  30 --
 .../blueprint/BundleDelegatingClassLoader.java  | 133 -----
 .../cxf/bus/blueprint/BusDefinitionParser.java  |  68 ---
 .../cxf/bus/blueprint/ConfigurerImpl.java       | 186 -------
 .../cxf/bus/blueprint/Messages.properties       |  26 -
 .../blueprint/NamespaceHandlerRegisterer.java   |  55 --
 .../org/apache/cxf/bus/osgi/CXFActivator.java   | 131 -----
 .../bus/osgi/CXFExtensionBundleListener.java    | 178 -------
 .../cxf/bus/spring/BusApplicationContext.java   | 338 ------------
 .../BusApplicationContextResourceResolver.java  | 104 ----
 .../cxf/bus/spring/BusDefinitionParser.java     | 299 -----------
 .../cxf/bus/spring/BusEntityResolver.java       |  89 ----
 .../bus/spring/BusExtensionPostProcessor.java   |  71 ---
 .../BusWiringBeanFactoryPostProcessor.java      | 174 ------
 ...rolledValidationXmlBeanDefinitionReader.java | 197 -------
 .../cxf/bus/spring/Jsr250BeanPostProcessor.java | 157 ------
 .../apache/cxf/bus/spring/Messages.properties   |  27 -
 .../apache/cxf/bus/spring/NamespaceHandler.java |  57 --
 .../cxf/bus/spring/SpringBeanLocator.java       | 313 -----------
 .../org/apache/cxf/bus/spring/SpringBus.java    | 141 -----
 .../apache/cxf/bus/spring/SpringBusFactory.java | 227 --------
 .../cxf/bus/spring/TunedDocumentLoader.java     | 146 -----
 .../org/apache/cxf/common/util/ClassHelper.java |  12 -
 .../cxf/common/util/ClasspathScanner.java       |  12 -
 .../cxf/common/util/SpringAopClassHelper.java   |  92 ----
 .../cxf/common/util/SpringClasspathScanner.java | 201 -------
 .../apache/cxf/common/util/SpringOsgiUtil.java  |  44 --
 .../AbstractBPBeanDefinitionParser.java         | 441 ---------------
 .../blueprint/InterceptorTypeConverter.java     |  42 --
 .../blueprint/SimpleBPBeanDefinitionParser.java |  87 ---
 .../spring/AbstractBeanDefinitionParser.java    | 533 -------------------
 .../AbstractFactoryBeanDefinitionParser.java    | 153 ------
 .../cxf/configuration/spring/BusWiringType.java |  37 --
 .../configuration/spring/ConfigurerImpl.java    | 289 ----------
 .../configuration/spring/JAXBBeanFactory.java   |  73 ---
 .../spring/MappingBeanDefinitionParser.java     |  59 --
 .../configuration/spring/Messages.properties    |  26 -
 .../spring/SimpleBeanDefinitionParser.java      |  33 --
 .../spring/StringBeanDefinitionParser.java      |  39 --
 .../cxf/internal/CXFAPINamespaceHandler.java    | 114 ----
 .../invoker/spring/SpringBeanFactory.java       |  65 ---
 .../bus/spring/BusApplicationContextTest.java   |  48 --
 .../bus/spring/BusApplicationListenerTest.java  |  53 --
 .../cxf/bus/spring/BusDefinitionParserTest.java | 168 ------
 .../cxf/bus/spring/SpringBusFactoryTest.java    | 279 ----------
 .../spring/ConfigurerImplTest.java              | 412 --------------
 .../cxf/configuration/spring/bean.properties    |  17 -
 .../cxf/configuration/spring/test-beans.xml     |  59 --
 .../configuration/spring/test-jaxb-beans.xml    |  43 --
 .../internal/CXFAPINamespaceHandlerTest.java    |  42 --
 53 files changed, 4 insertions(+), 6914 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index cda420d..1378389 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -141,6 +141,7 @@
             <groupId>org.codehaus.woodstox</groupId>
             <artifactId>woodstox-core-asl</artifactId>
         </dependency>
+        <!-- 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
@@ -169,6 +170,7 @@
             <scope>provided</scope>
             <optional>true</optional>
         </dependency>
+        -->
         <dependency>
             <groupId>org.apache.ws.xmlschema</groupId>
             <artifactId>xmlschema-core</artifactId>
@@ -211,6 +213,7 @@
             <optional>true</optional>
             <scope>provided</scope>
         </dependency>
+        <!--
         <dependency>
             <groupId>org.springframework.osgi</groupId>
             <artifactId>spring-osgi-io</artifactId>
@@ -223,6 +226,7 @@
             <optional>true</optional>
             <scope>provided</scope>
         </dependency>
+        -->
     </dependencies>
     <build>
         <plugins>

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBeanLocator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBeanLocator.java b/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBeanLocator.java
deleted file mode 100644
index 4db349d..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBeanLocator.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Logger;
-
-import org.apache.aries.blueprint.ExtendedBeanMetadata;
-import org.apache.aries.blueprint.services.ExtendedBlueprintContainer;
-import org.apache.cxf.bus.extension.ExtensionManagerImpl;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.ConfiguredBeanLocator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.container.NoSuchComponentException;
-import org.osgi.service.blueprint.reflect.BeanMetadata;
-import org.osgi.service.blueprint.reflect.BeanProperty;
-import org.osgi.service.blueprint.reflect.ComponentMetadata;
-
-/**
- * 
- */
-public class BlueprintBeanLocator implements ConfiguredBeanLocator {
-    private static final Logger LOG = LogUtils.getL7dLogger(BlueprintBeanLocator.class);
-    ConfiguredBeanLocator orig;
-    BlueprintContainer container;
-    BundleContext context;
-    
-    public BlueprintBeanLocator(ConfiguredBeanLocator orig, 
-                                BlueprintContainer cont, 
-                                BundleContext context) {
-        this.orig = orig;
-        this.container = cont;
-        this.context = context;
-        if (orig instanceof ExtensionManagerImpl) {
-            List<String> names = new ArrayList<String>(container.getComponentIds());
-            ((ExtensionManagerImpl)orig).removeBeansOfNames(names);
-        }
-    }
-    
-    static Class<?> getClassForMetaData(BlueprintContainer container, ComponentMetadata cmd) {
-        Class<?> cls = null;
-        if (cmd instanceof BeanMetadata) {
-            BeanMetadata bm = (BeanMetadata)cmd;
-            if (bm instanceof ExtendedBeanMetadata) {
-                cls = ((ExtendedBeanMetadata)bm).getRuntimeClass();
-            } 
-            if (cls == null && container instanceof ExtendedBlueprintContainer && bm.getClassName() != null) {
-                try {
-                    cls = ((ExtendedBlueprintContainer)container).loadClass(bm.getClassName());
-                } catch (ClassNotFoundException cnfe) {
-                    //ignore
-                }
-            }
-        }
-        return cls;
-    }
-    private Class<?> getClassForMetaData(ComponentMetadata cmd) {
-        return getClassForMetaData(container, cmd);
-    }
-    private ComponentMetadata getComponentMetadata(String id) {
-        try {
-            return container.getComponentMetadata(id);
-        } catch (NoSuchComponentException nsce) {
-            return null;
-        }
-    }
-    
-    public <T> T getBeanOfType(String name, Class<T> type) {
-        
-        ComponentMetadata cmd = getComponentMetadata(name);
-        Class<?> cls = getClassForMetaData(cmd);
-        if (cls != null && type.isAssignableFrom(cls)) {
-            return type.cast(container.getComponentInstance(name));
-        }
-        return orig.getBeanOfType(name, type);
-    }
-    /** {@inheritDoc}*/
-    public List<String> getBeanNamesOfType(Class<?> type) {
-        Set<String> names = new LinkedHashSet<String>();
-        for (String s : container.getComponentIds()) {
-            ComponentMetadata cmd = container.getComponentMetadata(s);
-            Class<?> cls = getClassForMetaData(cmd);
-            if (cls != null && type.isAssignableFrom(cls)) {
-                names.add(s);
-            }
-        }
-        names.addAll(orig.getBeanNamesOfType(type));
-        return new ArrayList<String>(names);
-    }
-
-    /** {@inheritDoc}*/
-    public <T> Collection<? extends T> getBeansOfType(Class<T> type) {
-        List<T> list = new ArrayList<T>();
-        
-        for (String s : container.getComponentIds()) {
-            ComponentMetadata cmd = container.getComponentMetadata(s);
-            Class<?> cls = getClassForMetaData(cmd);
-            if (cls != null && type.isAssignableFrom(cls)) {
-                list.add(type.cast(container.getComponentInstance(s)));
-            }
-        }
-        if (list.isEmpty() && context != null) {
-            try {
-                ServiceReference refs[] = context.getServiceReferences(type.getName(), null);
-                if (refs != null) {
-                    for (ServiceReference r : refs) {
-                        list.add(type.cast(context.getService(r)));
-                    }
-                }
-            } catch (Exception ex) {
-                //ignore, just don't support the OSGi services
-                LOG.info("Try to find the Bean with type:" + type 
-                    + " from OSGi services and get error: " + ex);  
-            }
-        }
-        list.addAll(orig.getBeansOfType(type));
-        
-        return list;
-    }
-
-    /** {@inheritDoc}*/
-    public <T> boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener) {
-        List<String> names = new ArrayList<String>();
-        boolean loaded = false;
-        for (String s : container.getComponentIds()) {
-            ComponentMetadata cmd = container.getComponentMetadata(s);
-            Class<?> cls = getClassForMetaData(cmd);
-            if (cls != null && type.isAssignableFrom(cls)) {
-                names.add(s);
-            }
-        }
-        Collections.reverse(names);
-        for (String s : names) {
-            ComponentMetadata cmd = container.getComponentMetadata(s);
-            Class<?> beanType = getClassForMetaData(cmd);
-            Class<? extends T> t = beanType.asSubclass(type);
-            if (listener.loadBean(s, t)) {
-                Object o = container.getComponentInstance(s);
-                if (listener.beanLoaded(s, type.cast(o))) {
-                    return true;
-                }
-                loaded = true;
-            }
-        }
-        
-        try {
-            if (context != null) {
-                ServiceReference refs[] = context.getServiceReferences(type.getName(), null);
-                if (refs != null) {
-                    for (ServiceReference r : refs) {
-                        Object o2 = context.getService(r);
-                        Class<? extends T> t = o2.getClass().asSubclass(type);
-                        if (listener.loadBean(t.getName(), t)) {
-                            if (listener.beanLoaded(t.getName(), type.cast(o2))) {
-                                return true;
-                            }
-                            loaded = true;
-                        }
-                    }
-                }
-            }
-        } catch (Exception ex) {
-            //ignore, just don't support the OSGi services
-            LOG.info("Try to find the Bean with type:" + type 
-                + " from OSGi services and get error: " + ex);  
-        }        
-        return orig.loadBeansOfType(type, listener) || loaded;
-    }
-
-    public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value) {
-        ComponentMetadata cmd = getComponentMetadata(beanName);
-        if (cmd instanceof BeanMetadata) {
-            BeanMetadata br = (BeanMetadata)cmd;
-            for (BeanProperty s : br.getProperties()) {
-                if (propertyName.equals(s.getName())) {
-                    return true;
-                }
-            }
-            return false;
-        }
-        return orig.hasConfiguredPropertyValue(beanName, propertyName, value);
-    }
-
-    public boolean hasBeanOfName(String name) {
-        ComponentMetadata cmd = getComponentMetadata(name);
-        if (cmd instanceof BeanMetadata) {
-            return true;
-        }        
-        return orig.hasBeanOfName(name);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java b/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
deleted file mode 100644
index e1aeb7f..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintBus.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import org.apache.cxf.bus.extension.ExtensionManagerBus;
-import org.apache.cxf.configuration.ConfiguredBeanLocator;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.resource.ClassLoaderResolver;
-import org.apache.cxf.resource.ResourceManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-
-/**
- * 
- */
-public class BlueprintBus extends ExtensionManagerBus {
-    BundleContext context;
-    BlueprintContainer container;
-    
-    public BlueprintBus() {
-        // Using the BlueprintBus Classloader to load the extensions
-        super(null, null, BlueprintBus.class.getClassLoader());
-    }
-    
-    public void setBundleContext(final BundleContext c) {
-        context = c;
-        ClassLoader bundleClassLoader =
-            AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
-                public ClassLoader run() {
-                    return new BundleDelegatingClassLoader(c.getBundle(), 
-                                                           this.getClass().getClassLoader());
-                }
-            });
-        super.setExtension(bundleClassLoader, ClassLoader.class);
-        // Setup the resource resolver with the bundle classloader
-        ResourceManager rm = super.getExtension(ResourceManager.class);
-        rm.addResourceResolver(new ClassLoaderResolver(bundleClassLoader));
-        super.setExtension(c, BundleContext.class);
-    }
-    public void setBlueprintContainer(BlueprintContainer con) {
-        container = con;
-        setExtension(new ConfigurerImpl(con), Configurer.class);
-        setExtension(new BlueprintBeanLocator(getExtension(ConfiguredBeanLocator.class), container, context),
-                           ConfiguredBeanLocator.class);
-    }
-    @Override
-    public String getId() {
-        if (id == null) {
-            if (context == null) {
-                id = super.getId();
-            } else {
-                id = context.getBundle().getSymbolicName() + "-" 
-                    + DEFAULT_BUS_ID + Integer.toString(this.hashCode());
-            }
-        }
-        return id;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintNameSpaceHandlerFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintNameSpaceHandlerFactory.java b/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintNameSpaceHandlerFactory.java
deleted file mode 100644
index 7f5d27c..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BlueprintNameSpaceHandlerFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-public interface BlueprintNameSpaceHandlerFactory {
-    /**
-     * Creates aries blueprint NamespaceHandler.
-     * The return type is untyped as aries blueprint is an
-     * optional import
-     *  
-     * @return handler
-     */
-    Object createNamespaceHandler();
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/BundleDelegatingClassLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BundleDelegatingClassLoader.java b/core/src/main/java/org/apache/cxf/bus/blueprint/BundleDelegatingClassLoader.java
deleted file mode 100644
index 8c00dc3..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BundleDelegatingClassLoader.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-import java.io.IOException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-
-import org.osgi.framework.Bundle;
-
-/**
- * A ClassLoader delegating to a given OSGi bundle.
- */
-public class BundleDelegatingClassLoader extends ClassLoader {
-
-    private final Bundle bundle;
-    private final ClassLoader classLoader;
-
-    public BundleDelegatingClassLoader(Bundle bundle) {
-        this(bundle, null);
-    }
-
-    public BundleDelegatingClassLoader(Bundle bundle, ClassLoader classLoader) {
-        this.bundle = bundle;
-        this.classLoader = classLoader;
-    }
-
-    protected Class<?> findClass(final String name) throws ClassNotFoundException {
-        try {
-            return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
-                public Class<?> run() throws ClassNotFoundException {
-                    return bundle.loadClass(name);
-                }
-            });
-        } catch (PrivilegedActionException e) {
-            Exception cause = e.getException();
-          
-            if (cause instanceof ClassNotFoundException) {
-                throw (ClassNotFoundException)cause;
-            } else {
-                throw (RuntimeException)cause;
-            }
-        }    
-    }
-
-    protected URL findResource(final String name) {
-        URL resource = AccessController.doPrivileged(new PrivilegedAction<URL>() {
-            public URL run() {
-                return bundle.getResource(name);
-            }
-        });        
-        if (classLoader != null && resource == null) {
-            resource = classLoader.getResource(name);
-        }
-        return resource;
-    }
-
-    protected Enumeration<URL> findResources(final String name) throws IOException {
-        Enumeration<URL> urls;
-        try {
-            urls =  AccessController.doPrivileged(new PrivilegedExceptionAction<Enumeration<URL>>() {
-                @SuppressWarnings("unchecked")
-                public Enumeration<URL> run() throws IOException {
-                    return bundle.getResources(name);
-                }
-          
-            });
-        } catch (PrivilegedActionException e) {
-            Exception cause = e.getException();
-        
-            if (cause instanceof IOException) {
-                throw (IOException)cause;
-            } else {
-                throw (RuntimeException)cause;
-            }
-        }
-      
-        if (urls == null) {
-            urls = Collections.enumeration(new ArrayList<URL>());
-        }
-      
-        return urls;    
-    }
-
-    protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
-        Class<?> clazz;
-        try {
-            clazz = findClass(name);
-        } catch (ClassNotFoundException cnfe) {
-            if (classLoader != null) {
-                try {
-                    clazz = classLoader.loadClass(name);
-                } catch (ClassNotFoundException e) {
-                    throw new ClassNotFoundException(name + " from bundle " + bundle.getBundleId() 
-                                                     + " (" + bundle.getSymbolicName() + ")", cnfe);
-                }
-            } else {
-                throw new ClassNotFoundException(name + " from bundle " + bundle.getBundleId() 
-                                                 + " (" + bundle.getSymbolicName() + ")", cnfe);
-            }
-        }
-        if (resolve) {
-            resolveClass(clazz);
-        }
-        return clazz;
-    }
-
-    public Bundle getBundle() {
-        return bundle;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/BusDefinitionParser.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/BusDefinitionParser.java b/core/src/main/java/org/apache/cxf/bus/blueprint/BusDefinitionParser.java
deleted file mode 100644
index 2ea3559..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/BusDefinitionParser.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-
-import org.w3c.dom.Element;
-
-import org.apache.aries.blueprint.ParserContext;
-import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
-import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser;
-import org.osgi.service.blueprint.reflect.Metadata;
-
-public class BusDefinitionParser 
-    extends AbstractBPBeanDefinitionParser {
-
-    public BusDefinitionParser() {
-    }
-    
-    public Metadata parse(Element element, ParserContext context) {
-        String bname = element.hasAttribute("bus") ? element.getAttribute("bus") : "cxf";
-        String id = element.hasAttribute("id") ? element.getAttribute("id") : null;
-        MutableBeanMetadata cxfBean = getBus(context, bname);
-        parseAttributes(element, context, cxfBean);
-        parseChildElements(element, context, cxfBean);
-        context.getComponentDefinitionRegistry().removeComponentDefinition(bname);
-        if (!StringUtils.isEmpty(id)) {
-            cxfBean.addProperty("id", createValue(context, id));
-        }
-        return cxfBean;
-    }
-    protected void processBusAttribute(Element element, ParserContext ctx, 
-                                       MutableBeanMetadata bean, String val) {
-        //nothing
-    }
-    protected boolean hasBusProperty() {
-        return false;
-    }
-
-
-    @Override
-    protected void mapElement(ParserContext ctx, MutableBeanMetadata bean, Element el, String name) {
-        if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)
-            || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name)
-            || "features".equals(name)) {
-            bean.addProperty(name, parseListData(ctx, bean, el));
-        } else if ("properties".equals(name)) { 
-            bean.addProperty(name, parseMapData(ctx, bean, el));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java b/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java
deleted file mode 100644
index bf0ce8c..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/ConfigurerImpl.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.aries.blueprint.services.ExtendedBlueprintContainer;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.Configurable;
-import org.apache.cxf.configuration.Configurer;
-import org.osgi.service.blueprint.container.BlueprintContainer;
-import org.osgi.service.blueprint.container.NoSuchComponentException;
-import org.osgi.service.blueprint.reflect.BeanMetadata;
-import org.osgi.service.blueprint.reflect.ComponentMetadata;
-
-/**
- * 
- */
-public class ConfigurerImpl implements Configurer {
-    private static final Logger LOG = LogUtils.getL7dLogger(ConfigurerImpl.class);
-    BlueprintContainer container;
-    
-    private final Map<String, List<MatcherHolder>> wildCardBeanDefinitions
-        = new TreeMap<String, List<MatcherHolder>>();
-
-    static class MatcherHolder implements Comparable<MatcherHolder> {
-        Matcher matcher;
-        String wildCardId;
-        MatcherHolder(String orig, Matcher matcher) {
-            wildCardId = orig;
-            this.matcher = matcher;
-        }
-        @Override
-        public int compareTo(MatcherHolder mh) {
-            Integer literalCharsLen1 = this.wildCardId.replaceAll("\\*", "").length();
-            Integer literalCharsLen2 = mh.wildCardId.replaceAll("\\*", "").length();
-            // The expression with more literal characters should end up on the top of the list
-            return literalCharsLen1.compareTo(literalCharsLen2) * -1;
-        }
-    }
-    
-    
-    public ConfigurerImpl(BlueprintContainer con) {
-        container = con;
-        initializeWildcardMap();
-    }
-    private boolean isWildcardBeanName(String bn) {
-        return bn.indexOf('*') != -1 || bn.indexOf('?') != -1
-            || (bn.indexOf('(') != -1 && bn.indexOf(')') != -1);
-    }
-
-    private void initializeWildcardMap() {
-        for (String s : container.getComponentIds()) {
-            if (isWildcardBeanName(s)) {
-                ComponentMetadata cmd = container.getComponentMetadata(s);
-                Class<?> cls = BlueprintBeanLocator.getClassForMetaData(container, cmd);
-                if (cls != null) {
-                    String orig = s;
-                    if (s.charAt(0) == '*') {
-                        //old wildcard
-                        s = "." + s.replaceAll("\\.", "\\."); 
-                    }
-                    Matcher matcher = Pattern.compile(s).matcher("");
-                    List<MatcherHolder> m = wildCardBeanDefinitions.get(cls.getName());
-                    if (m == null) {
-                        m = new ArrayList<MatcherHolder>();
-                        wildCardBeanDefinitions.put(cls.getName(), m);
-                    }
-                    MatcherHolder holder = new MatcherHolder(orig, matcher);
-                    m.add(holder);
-                }
-            }
-        }
-    }
-
-    public void configureBean(Object beanInstance) {
-        configureBean(null, beanInstance, true);
-    }
-    
-    public void configureBean(String bn, Object beanInstance) {
-        configureBean(bn, beanInstance, true);
-    }
-    public synchronized void configureBean(String bn, Object beanInstance, boolean checkWildcards) {
-        if (null == bn) {
-            bn = getBeanName(beanInstance);
-        }
-        
-        if (null == bn) {
-            return;
-        }
-        if (checkWildcards) {
-            configureWithWildCard(bn, beanInstance);
-        }
-        
-        if (container instanceof ExtendedBlueprintContainer) {
-            ComponentMetadata cm = null;
-            try {
-                cm = container.getComponentMetadata(bn);
-            } catch (NoSuchComponentException nsce) {
-                cm = null;
-            }
-            if (cm instanceof BeanMetadata) {
-                ((ExtendedBlueprintContainer)container).injectBeanInstance((BeanMetadata)cm, beanInstance);
-            }
-        }
-    }
-    
-    private void configureWithWildCard(String bn, Object beanInstance) {
-        if (!wildCardBeanDefinitions.isEmpty()) {
-            Class<?> clazz = beanInstance.getClass();            
-            while (!Object.class.equals(clazz)) {
-                String className = clazz.getName();
-                List<MatcherHolder> matchers = wildCardBeanDefinitions.get(className);
-                if (matchers != null) {
-                    for (MatcherHolder m : matchers) {
-                        synchronized (m.matcher) {
-                            m.matcher.reset(bn);
-                            if (m.matcher.matches()) {
-                                configureBean(m.wildCardId, beanInstance, false);
-                                return;
-                            }
-                        }
-                    }
-                }
-                clazz = clazz.getSuperclass();
-            }
-        }
-    }
-
-    protected String getBeanName(Object beanInstance) {
-        if (beanInstance instanceof Configurable) {
-            return ((Configurable)beanInstance).getBeanName();
-        }
-        String beanName = null;
-        Method m = null;
-        try {
-            m = beanInstance.getClass().getDeclaredMethod("getBeanName", (Class[])null);
-        } catch (NoSuchMethodException ex) {
-            try {
-                m = beanInstance.getClass().getMethod("getBeanName", (Class[])null);
-            } catch (NoSuchMethodException e) {
-                //ignore
-            }
-        }
-        if (m != null) {
-            try {
-                beanName = (String)(m.invoke(beanInstance));
-            } catch (Exception ex) {
-                LogUtils.log(LOG, Level.WARNING, "ERROR_DETERMINING_BEAN_NAME_EXC", ex);
-            }
-        }
-        
-        if (null == beanName) {
-            LogUtils.log(LOG, Level.FINE, "COULD_NOT_DETERMINE_BEAN_NAME_MSG",
-                         beanInstance.getClass().getName());
-        }
-      
-        return beanName;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/Messages.properties
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/Messages.properties b/core/src/main/java/org/apache/cxf/bus/blueprint/Messages.properties
deleted file mode 100644
index ed8f59a..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/Messages.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-#    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.
-#
-#
-NO_MATCHING_BEAN_MSG = Could not find a definition for bean with id {0} - no injection will be performed.
-COULD_NOT_DETERMINE_BEAN_NAME_MSG = Could not determine bean name for instance of class {0}.
-ERROR_DETERMINING_BEAN_NAME_EXC = Failed to determine bean name.
-JAXB_PROPERTY_EDITOR_EXC = Property editor failed to bind element {0}.
-WILDCARD_BEAN_ID_WITH_NO_CLASS_MSG = Configuration bean with id {0} that uses a ''*'' or wildcard must have a class attribute.
-ONE_WILDCARD_BEAN_ID_PER_CLASS_MSG = A wildcard configuration bean with id {0} already exists for class {1}. The wildcard bean with id {2} will be ignored.  

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/blueprint/NamespaceHandlerRegisterer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/blueprint/NamespaceHandlerRegisterer.java b/core/src/main/java/org/apache/cxf/bus/blueprint/NamespaceHandlerRegisterer.java
deleted file mode 100644
index 14d4ced..0000000
--- a/core/src/main/java/org/apache/cxf/bus/blueprint/NamespaceHandlerRegisterer.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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.cxf.bus.blueprint;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.aries.blueprint.NamespaceHandler;
-import org.apache.cxf.common.logging.LogUtils;
-import org.osgi.framework.BundleContext;
-
-public final class NamespaceHandlerRegisterer {
-    private static final Logger LOG = LogUtils.getL7dLogger(NamespaceHandlerRegisterer.class);
-
-    private NamespaceHandlerRegisterer() {
-    }
-
-    public static void register(BundleContext bc, BlueprintNameSpaceHandlerFactory factory,
-                                String... namespaces) {
-        try {
-            Object handler = factory.createNamespaceHandler();
-            for (String namespace : namespaces) {
-                Dictionary<String, String> properties = new Hashtable<String, String>();
-                properties.put("osgi.service.blueprint.namespace", namespace);
-                bc.registerService(NamespaceHandler.class.getName(), handler, properties);
-                LOG.fine("Registered blueprint namespace handler for " + namespace);
-            }
-        } catch (Throwable e) {
-            if (e instanceof NoClassDefFoundError) {
-                LOG.log(Level.INFO, "Aries Blueprint packages not available. So namespaces will not be registered");
-            } else {
-                LOG.log(Level.WARNING, "Unexpected exception when trying to install Aries Blueprint namespaces", e);
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/osgi/CXFActivator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/osgi/CXFActivator.java b/core/src/main/java/org/apache/cxf/bus/osgi/CXFActivator.java
deleted file mode 100644
index c66d136..0000000
--- a/core/src/main/java/org/apache/cxf/bus/osgi/CXFActivator.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * 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.cxf.bus.osgi;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.cxf.bus.blueprint.BlueprintNameSpaceHandlerFactory;
-import org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer;
-import org.apache.cxf.bus.extension.Extension;
-import org.apache.cxf.bus.extension.ExtensionRegistry;
-import org.apache.cxf.internal.CXFAPINamespaceHandler;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.cm.ManagedServiceFactory;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * Is called in OSGi on start and stop of the cxf bundle.
- * Manages 
- * - CXFBundleListener
- * - Attaching ManagedWorkqueues to config admin service
- * - OsgiBusListener
- * - Blueprint namespaces
- */
-public class CXFActivator implements BundleActivator {
-    
-    private List<Extension> extensions;
-    private ManagedWorkQueueList workQueues;
-    private ServiceTracker configAdminTracker;
-    private CXFExtensionBundleListener cxfBundleListener;
-    private ServiceRegistration workQueueServiceRegistration;
-    
-    
-
-    /** {@inheritDoc}*/
-    public void start(BundleContext context) throws Exception {
-        workQueues = new ManagedWorkQueueList();
-        cxfBundleListener = new CXFExtensionBundleListener(context.getBundle().getBundleId());
-        context.addBundleListener(cxfBundleListener);
-        cxfBundleListener.registerExistingBundles(context);
-
-        configAdminTracker = new ServiceTracker(context, ConfigurationAdmin.class.getName(), null);
-        configAdminTracker.open();
-        workQueues.setConfigAdminTracker(configAdminTracker);
-        workQueueServiceRegistration = registerManagedServiceFactory(context, ManagedServiceFactory.class, 
-                                                                     workQueues,
-                                                                     ManagedWorkQueueList.FACTORY_PID);
-                
-        extensions = new ArrayList<Extension>();
-        extensions.add(createOsgiBusListenerExtension(context));
-        extensions.add(createManagedWorkQueueListExtension(workQueues));
-        ExtensionRegistry.addExtensions(extensions);
-
-        BlueprintNameSpaceHandlerFactory factory = new BlueprintNameSpaceHandlerFactory() {
-                
-            @Override
-            public Object createNamespaceHandler() {
-                return new CXFAPINamespaceHandler();
-            }
-        };
-        NamespaceHandlerRegisterer.register(context, factory,
-                                            "http://cxf.apache.org/blueprint/core",
-                                            "http://cxf.apache.org/configuration/beans",
-                                            "http://cxf.apache.org/configuration/parameterized-types",
-                                            "http://cxf.apache.org/configuration/security",
-                                            "http://schemas.xmlsoap.org/wsdl/",
-                                            "http://www.w3.org/2005/08/addressing",
-                                            "http://schemas.xmlsoap.org/ws/2004/08/addressing");
-
-    }
-
-    private ServiceRegistration registerManagedServiceFactory(BundleContext context,
-                                                              Class<?> serviceClass,
-                                                              Object service, 
-                                                              String servicePid) {
-        Properties props = new Properties();
-        props.put(Constants.SERVICE_PID, servicePid);  
-        return context.registerService(serviceClass.getName(), service, props);
-    }
-
-    private Extension createOsgiBusListenerExtension(BundleContext context) {
-        Extension busListener = new Extension(OSGIBusListener.class);
-        busListener.setArgs(new Object[] {context});
-        return busListener;
-    }
-
-    private static Extension createManagedWorkQueueListExtension(final ManagedWorkQueueList workQueues) {
-        return new Extension(ManagedWorkQueueList.class) {
-            public Object getLoadedObject() {
-                return workQueues;
-            }
-
-            public Extension cloneNoObject() {
-                return this;
-            }
-        };
-    }
-
-    /** {@inheritDoc}*/
-    public void stop(BundleContext context) throws Exception {
-        context.removeBundleListener(cxfBundleListener);
-        cxfBundleListener.shutdown();
-        workQueues.shutDown();
-        workQueueServiceRegistration.unregister();
-        configAdminTracker.close();
-        ExtensionRegistry.removeExtensions(extensions);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/osgi/CXFExtensionBundleListener.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/osgi/CXFExtensionBundleListener.java b/core/src/main/java/org/apache/cxf/bus/osgi/CXFExtensionBundleListener.java
deleted file mode 100644
index 7713c33..0000000
--- a/core/src/main/java/org/apache/cxf/bus/osgi/CXFExtensionBundleListener.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * 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.cxf.bus.osgi;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Logger;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.bus.extension.Extension;
-import org.apache.cxf.bus.extension.ExtensionException;
-import org.apache.cxf.bus.extension.ExtensionRegistry;
-import org.apache.cxf.bus.extension.TextExtensionFragmentParser;
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.SynchronousBundleListener;
-
-public class CXFExtensionBundleListener implements SynchronousBundleListener {
-    private static final Logger LOG = LogUtils.getL7dLogger(CXFActivator.class);
-    private long id;
-    private ConcurrentMap<Long, List<OSGiExtension>> extensions 
-        = new ConcurrentHashMap<Long, List<OSGiExtension>>(16, 0.75f, 4);
-    
-    public CXFExtensionBundleListener(long bundleId) {
-        this.id = bundleId;
-    }
-    
-    public void registerExistingBundles(BundleContext context) throws IOException {
-        for (Bundle bundle : context.getBundles()) {
-            if ((bundle.getState() == Bundle.RESOLVED 
-                || bundle.getState() == Bundle.STARTING 
-                || bundle.getState() == Bundle.ACTIVE 
-                || bundle.getState() == Bundle.STOPPING)
-                && bundle.getBundleId() != context.getBundle().getBundleId()) {
-                register(bundle);
-            }
-        }
-    }
-
-    /** {@inheritDoc}*/
-    public void bundleChanged(BundleEvent event) {
-        if (event.getType() == BundleEvent.RESOLVED && id != event.getBundle().getBundleId()) {
-            register(event.getBundle());
-        } else if (event.getType() == BundleEvent.UNRESOLVED || event.getType() == BundleEvent.UNINSTALLED) {
-            unregister(event.getBundle().getBundleId());
-        }
-    }
-  
-    protected void register(final Bundle bundle) {
-        Enumeration<?> e = bundle.findEntries("META-INF/cxf/", "bus-extensions.txt", false);
-        while (e != null && e.hasMoreElements()) {
-            List<Extension> orig = new TextExtensionFragmentParser(null).getExtensions((URL)e.nextElement());
-            addExtensions(bundle, orig);
-        }
-    }
-
-    private boolean addExtensions(final Bundle bundle, List<Extension> orig) {
-        if (orig.isEmpty()) {
-            return false;
-        }
-        
-        List<String> names = new ArrayList<String>(orig.size());
-        for (Extension ext : orig) {
-            names.add(ext.getName());
-        }
-        LOG.info("Adding the extensions from bundle " + bundle.getSymbolicName() 
-                 + " (" + bundle.getBundleId() + ") " + names); 
-        List<OSGiExtension> list = extensions.get(bundle.getBundleId());
-        if (list == null) {
-            list = new CopyOnWriteArrayList<OSGiExtension>();
-            List<OSGiExtension> preList = extensions.putIfAbsent(bundle.getBundleId(), list);
-            if (preList != null) {
-                list = preList;
-            }
-        }
-        for (Extension ext : orig) {
-            list.add(new OSGiExtension(ext, bundle));
-        }
-        ExtensionRegistry.addExtensions(list);
-        return !list.isEmpty();
-    }
-
-    protected void unregister(final long bundleId) {
-        List<OSGiExtension> list = extensions.remove(bundleId);
-        if (list != null) {
-            LOG.info("Removing the extensions for bundle " + bundleId);
-            ExtensionRegistry.removeExtensions(list);
-        }
-    }
-
-    public void shutdown() {
-        while (!extensions.isEmpty()) {
-            unregister(extensions.keySet().iterator().next());
-        }
-    }
-    
-    public class OSGiExtension extends Extension {
-        final Bundle bundle;
-        Object serviceObject;
-        public OSGiExtension(Extension e, Bundle b) {
-            super(e);
-            bundle = b;
-        }
-
-        public void setServiceObject(Object o) {
-            serviceObject = o;
-            obj = o;
-        }
-        public Object load(ClassLoader cl, Bus b) {
-            if (interfaceName == null && bundle.getBundleContext() != null) {
-                ServiceReference ref = bundle.getBundleContext().getServiceReference(className);
-                if (ref != null && ref.getBundle().getBundleId() == bundle.getBundleId()) {
-                    Object o = bundle.getBundleContext().getService(ref);
-                    serviceObject = o;
-                    obj = o;
-                    return obj;
-                }
-            }
-            return super.load(cl, b);
-        }
-        protected Class<?> tryClass(String name, ClassLoader cl) {
-            Class<?> c = null;
-            Throwable origExc = null;
-            try {
-                c = bundle.loadClass(className);
-            } catch (Throwable e) {
-                origExc = e;
-            }
-            if (c == null) {
-                try {
-                    return super.tryClass(name, cl);
-                } catch (ExtensionException ee) {
-                    if (origExc != null) {
-                        throw new ExtensionException(new Message("PROBLEM_LOADING_EXTENSION_CLASS",
-                                                                 Extension.LOG, name),
-                                                     origExc);
-                    } else {
-                        throw ee;
-                    }
-                }
-            }
-            return c;
-        }
-
-        public Extension cloneNoObject() {
-            OSGiExtension ext = new OSGiExtension(this, bundle);
-            ext.obj = serviceObject;
-            return ext;
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java b/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
deleted file mode 100644
index 36d951b..0000000
--- a/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/**
- * 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.cxf.bus.spring;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.cxf.common.classloader.ClassLoaderUtils;
-import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.common.util.SystemPropertyAction;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.interceptor.Fault;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
-import org.springframework.beans.factory.xml.BeansDtdResolver;
-import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver;
-import org.springframework.beans.factory.xml.NamespaceHandlerResolver;
-import org.springframework.beans.factory.xml.PluggableSchemaResolver;
-import org.springframework.beans.factory.xml.ResourceEntityResolver;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextException;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.UrlResource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-
-public class BusApplicationContext extends ClassPathXmlApplicationContext {
-    
-    private static final String DEFAULT_CXF_CFG_FILE = "META-INF/cxf/cxf.xml";
-    private static final String DEFAULT_CXF_EXT_CFG_FILE = "classpath*:META-INF/cxf/cxf.extension";
-
-    private static final Logger LOG = LogUtils.getL7dLogger(BusApplicationContext.class);
-    
-    private NamespaceHandlerResolver nsHandlerResolver;
-    private boolean includeDefaults;
-    private String[] cfgFiles;
-    private URL[] cfgFileURLs;
-    
-    public BusApplicationContext(String cf, boolean include) {
-        this(cf, include, null);
-    }
-    public BusApplicationContext(String[] cfs, boolean include) {
-        this(cfs, include, null);
-    }
-    
-    public BusApplicationContext(URL url, boolean include) {
-        this(url, include, null);
-    }
-    public BusApplicationContext(URL[] urls, boolean include) {
-        this(urls, include, null);
-    }
-
-    public BusApplicationContext(String cf, boolean include, ApplicationContext parent) {
-        this(new String[] {cf}, include, parent);
-    }
-    
-    public BusApplicationContext(URL url, boolean include, ApplicationContext parent) {
-        this(new URL[] {url}, include, parent, null);
-    } 
-    public BusApplicationContext(String[] cf, boolean include, ApplicationContext parent) {
-        this(cf, include, parent, null);
-    }
-    public BusApplicationContext(String[] cf, boolean include, 
-                                 ApplicationContext parent, NamespaceHandlerResolver res) {
-        super(new String[0], false, parent);
-        cfgFiles = cf;
-        includeDefaults = include;
-        nsHandlerResolver = res;
-        try {
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
-                public Boolean run() throws Exception {
-                    refresh();
-                    return Boolean.TRUE;
-                }
-                
-            });
-        } catch (PrivilegedActionException e) {
-            if (e.getException() instanceof RuntimeException) {
-                throw (RuntimeException)e.getException();
-            }
-            throw new Fault(e);
-        }
-    }
-    public BusApplicationContext(URL[] url, boolean include,
-                                 ApplicationContext parent) {
-        this(url, include, parent, null);
-    }
-    public BusApplicationContext(URL[] url, boolean include,
-                                 ApplicationContext parent,
-                                 NamespaceHandlerResolver res) {
-        super(new String[0], false, parent);
-        cfgFileURLs = url;
-        includeDefaults = include;
-        nsHandlerResolver = res;
-        try {
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
-                public Boolean run() throws Exception {
-                    refresh();
-                    return Boolean.TRUE;
-                }
-                
-            });
-        } catch (PrivilegedActionException e) {
-            if (e.getException() instanceof RuntimeException) {
-                throw (RuntimeException)e.getException();
-            }
-            throw new Fault(e);
-        }
-    } 
-    
-    @Override
-    protected Resource[] getConfigResources() {
-        List<Resource> resources = new ArrayList<Resource>();
-       
-        if (includeDefaults) {
-            try {
-                PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(Thread
-                    .currentThread().getContextClassLoader());
-                
-                Collections.addAll(resources, resolver.getResources(DEFAULT_CXF_CFG_FILE));
-
-                Resource[] exts = resolver.getResources(DEFAULT_CXF_EXT_CFG_FILE);
-                for (Resource r : exts) {
-                    try (InputStream is = r.getInputStream();
-                        BufferedReader rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {
-                        String line = rd.readLine();
-                        while (line != null) {
-                            if (!"".equals(line)) {
-                                resources.add(resolver.getResource(line));
-                            }
-                            line = rd.readLine();
-                        }
-                    }
-                }
-
-            } catch (IOException ex) {
-                // ignore  
-            }  
-        }
-        
-        boolean usingDefault = false;
-        if (null == cfgFiles) {
-            String cfgFile = SystemPropertyAction.getPropertyOrNull(Configurer.USER_CFG_FILE_PROPERTY_NAME);
-            if (cfgFile != null) {
-                cfgFiles = new String[] {cfgFile};
-            }
-        }        
-        if (null == cfgFiles) {
-            cfgFiles = new String[] {Configurer.DEFAULT_USER_CFG_FILE};
-            usingDefault = true;
-        }
-        for (String cfgFile : cfgFiles) {
-            final Resource cpr = findResource(cfgFile);
-            boolean exists = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
-                public Boolean run() {
-                    return cpr != null && cpr.exists();
-                }
-                
-            });
-            if (exists) {
-                resources.add(cpr);
-                LogUtils.log(LOG, Level.INFO, "USER_CFG_FILE_IN_USE", cfgFile);
-            } else {
-                if (!usingDefault) {
-                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_NOT_LOADED", cfgFile);
-                    String message = (new Message("USER_CFG_FILE_NOT_LOADED", LOG, cfgFile)).toString();
-                    throw new ApplicationContextException(message);
-                } 
-            }
-        }
-            
-        if (null != cfgFileURLs) {
-            for (URL cfgFileURL : cfgFileURLs) {
-                UrlResource ur = new UrlResource(cfgFileURL);
-                if (ur.exists()) {
-                    resources.add(ur);
-                } else {
-                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_NOT_FOUND_MSG", cfgFileURL);
-                }
-            }
-        } 
-        
-        String sysCfgFileUrl = SystemPropertyAction.getPropertyOrNull(Configurer.USER_CFG_FILE_PROPERTY_URL);
-        if (null != sysCfgFileUrl) {
-            try {
-                UrlResource ur = new UrlResource(sysCfgFileUrl);
-                if (ur.exists()) {
-                    resources.add(ur);
-                } else {
-                    LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_NOT_FOUND_MSG", sysCfgFileUrl);
-                }            
-            } catch (MalformedURLException e) {            
-                LogUtils.log(LOG, Level.WARNING, "USER_CFG_FILE_URL_ERROR_MSG", sysCfgFileUrl);
-            }
-        }
-        
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Creating application context with resources: " + resources);
-        }
-        
-        if (0 == resources.size()) {
-            return null;
-        }
-        Resource[] res = new Resource[resources.size()];
-        res = resources.toArray(res);
-        return res;
-    }
-    
-    public static Resource findResource(final String cfgFile) {
-        try {
-            return AccessController.doPrivileged(new PrivilegedAction<Resource>() {
-                public Resource run() {
-                    Resource cpr = new ClassPathResource(cfgFile);
-                    if (cpr.exists()) {
-                        return cpr;
-                    }
-                    try {
-                        //see if it's a URL
-                        URL url = new URL(cfgFile);
-                        cpr = new UrlResource(url);
-                        if (cpr.exists()) {
-                            return cpr;
-                        }
-                    } catch (MalformedURLException e) {
-                        //ignore
-                    }
-                    //try loading it our way
-                    URL url = ClassLoaderUtils.getResource(cfgFile, BusApplicationContext.class);
-                    if (url != null) {
-                        cpr = new UrlResource(url);
-                        if (cpr.exists()) {
-                            return cpr;
-                        }
-                    }
-                    cpr = new FileSystemResource(cfgFile);
-                    if (cpr.exists()) {
-                        return cpr;
-                    }
-                    return null;
-                }
-            });
-        } catch (AccessControlException ex) {
-            //cannot read the user config file
-            return null;
-        }
-    }
-    
-    @Override
-    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
-        // Spring always creates a new one of these, which takes a fair amount
-        // of time on startup (nearly 1/2 second) as it gets created for every
-        // spring context on the classpath
-        if (nsHandlerResolver == null) {
-            nsHandlerResolver = new DefaultNamespaceHandlerResolver();
-        }
-        reader.setNamespaceHandlerResolver(nsHandlerResolver);
-        
-        String mode = getSpringValidationMode();
-        if (null != mode) {
-            reader.setValidationModeName(mode);
-        }
-        reader.setNamespaceAware(true); 
-        
-        setEntityResolvers(reader);        
-    }
-    
-    static String getSpringValidationMode() {
-        return AccessController.doPrivileged(new PrivilegedAction<String>() {
-            public String run() {
-                String mode = SystemPropertyAction.getPropertyOrNull("org.apache.cxf.spring.validation.mode");
-                if (mode == null) {
-                    mode = SystemPropertyAction.getPropertyOrNull("spring.validation.mode");
-                }
-                return mode;
-            }
-        });
-    }
-        
-    
-    void setEntityResolvers(XmlBeanDefinitionReader reader) {
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        reader.setEntityResolver(new BusEntityResolver(cl, new BeansDtdResolver(),
-            new PluggableSchemaResolver(cl)));
-    }
-    @Override
-    protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
-            // Create a new XmlBeanDefinitionReader for the given BeanFactory.
-        XmlBeanDefinitionReader beanDefinitionReader = 
-            new ControlledValidationXmlBeanDefinitionReader(beanFactory);
-        beanDefinitionReader.setNamespaceHandlerResolver(nsHandlerResolver);
-        
-        // Configure the bean definition reader with this context's
-        // resource loading environment.
-        beanDefinitionReader.setResourceLoader(this);
-        beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
-
-        // Allow a subclass to provide custom initialization of the reader,
-        // then proceed with actually loading the bean definitions.
-        initBeanDefinitionReader(beanDefinitionReader);
-        loadBeanDefinitions(beanDefinitionReader);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java b/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
deleted file mode 100644
index 434a851..0000000
--- a/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContextResourceResolver.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * 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.cxf.bus.spring;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.cxf.common.injection.NoJSR250Annotations;
-import org.apache.cxf.resource.ResourceResolver;
-
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.NoSuchBeanDefinitionException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.core.io.Resource;
-
-@NoJSR250Annotations
-public class BusApplicationContextResourceResolver 
-    implements ResourceResolver, ApplicationContextAware {
-    
-    ApplicationContext context;
-    
-    public BusApplicationContextResourceResolver() {
-    }
-    public BusApplicationContextResourceResolver(ApplicationContext c) {
-        context = c;
-    }
-    
-
-    public InputStream getAsStream(String name) {
-        Resource r = context.getResource(name);
-        if (r != null && r.exists()) {
-            try {
-                return r.getInputStream();
-            } catch (IOException e) {
-                //ignore and return null
-            }
-        } 
-        r = context.getResource("/" + name);
-        if (r != null && r.exists()) {
-            try {
-                return r.getInputStream();
-            } catch (IOException e) {
-                //ignore and return null
-            }
-        } 
-        return null;
-    }
-
-    public <T> T resolve(String resourceName, Class<T> resourceType) {
-           
-        try {
-            T resource = null;
-            if (resourceName == null) {
-                String names[] = context.getBeanNamesForType(resourceType);
-                if (names != null && names.length > 0) {
-                    resource = resourceType.cast(context.getBean(names[0], resourceType));
-                }
-            } else {
-                resource = resourceType.cast(context.getBean(resourceName, resourceType));
-            }
-            return resource;
-        } catch (NoSuchBeanDefinitionException def) {
-            //ignore
-        }
-        try {
-            if (ClassLoader.class.isAssignableFrom(resourceType)) {
-                return resourceType.cast(context.getClassLoader());
-            } else if (URL.class.isAssignableFrom(resourceType)) {
-                Resource r = context.getResource(resourceName);
-                if (r != null && r.exists()) {
-                    r.getInputStream().close(); //checks to see if the URL really can resolve
-                    return resourceType.cast(r.getURL());
-                }
-            }
-        } catch (IOException e) {
-            //ignore
-        }
-        return null;
-    }
-
-
-    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-        context = applicationContext;        
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java b/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
deleted file mode 100644
index 847ce28..0000000
--- a/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * 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.cxf.bus.spring;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.w3c.dom.Element;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.common.injection.NoJSR250Annotations;
-import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
-import org.apache.cxf.configuration.spring.BusWiringType;
-import org.apache.cxf.feature.Feature;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
-import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.message.Message;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.PropertyValue;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.support.AbstractBeanDefinition;
-import org.springframework.beans.factory.support.BeanDefinitionBuilder;
-import org.springframework.beans.factory.xml.ParserContext;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-
-public class BusDefinitionParser extends AbstractBeanDefinitionParser {
-    private static AtomicInteger counter = new AtomicInteger(0);
-
-    public BusDefinitionParser() {
-        super();
-        setBeanClass(BusConfig.class);
-    }
-
-    protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean) {
-        String bus = element.getAttribute("bus");        
-        if (StringUtils.isEmpty(bus)) {
-            bus = element.getAttribute("name");
-            if (StringUtils.isEmpty(bus)) {
-                element.setAttribute("bus", bus);
-            }
-        }
-        element.removeAttribute("name");
-        if (StringUtils.isEmpty(bus)) {
-            bus = "cxf";
-        }
-        String id = element.getAttribute("id");
-        if (!StringUtils.isEmpty(id)) {
-            bean.addPropertyValue("id", id);
-        }
-
-        super.doParse(element, ctx, bean);
-        
-        if (ctx.getRegistry().containsBeanDefinition(bus)) {
-            BeanDefinition def = ctx.getRegistry().getBeanDefinition(bus);
-            copyProps(bean, def);
-            bean.addConstructorArgValue(bus);
-        } else if (!"cxf".equals(bus)) {
-            bean.getRawBeanDefinition().setBeanClass(SpringBus.class);
-            bean.setDestroyMethodName("shutdown");
-            try {
-                element.setUserData("ID", bus, null);
-                bean.getRawBeanDefinition().getPropertyValues().removePropertyValue("bus");
-            } catch (Throwable t) {
-                //likely not DOM level 3, ignore
-            }
-        } else {
-            addBusWiringAttribute(bean, BusWiringType.PROPERTY, bus, ctx);
-            bean.getRawBeanDefinition().setAttribute(WIRE_BUS_CREATE, 
-                                                     resolveId(element, null, ctx));
-            bean.addConstructorArgValue(bus);
-        }
-    }
-    protected boolean processBusAttribute(Element element, ParserContext ctx, 
-                                          BeanDefinitionBuilder bean,
-                                          String val) {
-        return false;
-    }
-    private void copyProps(BeanDefinitionBuilder src, BeanDefinition def) {
-        for (PropertyValue v : src.getBeanDefinition().getPropertyValues().getPropertyValues()) {
-            if (!"bus".equals(v.getName())) {
-                def.getPropertyValues().addPropertyValue(v.getName(), v.getValue());
-            }
-            src.getBeanDefinition().getPropertyValues().removePropertyValue(v);
-        }
-        
-    }
-
-    @Override
-    protected void mapElement(ParserContext ctx, 
-                              BeanDefinitionBuilder bean, 
-                              Element e, 
-                              String name) {
-        if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)
-            || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name)
-            || "features".equals(name)) {
-            List<?> list = ctx.getDelegate().parseListElement(e, bean.getBeanDefinition());
-            bean.addPropertyValue(name, list);
-        } else if ("properties".equals(name)) {
-            Map<?, ?> map = ctx.getDelegate().parseMapElement(e, bean.getBeanDefinition());
-            bean.addPropertyValue("properties", map);
-        }
-    }
-    @Override
-    protected String resolveId(Element element, AbstractBeanDefinition definition, 
-                               ParserContext ctx) {
-        String bus = null;
-        try {
-            bus = (String)element.getUserData("ID");
-        } catch (Throwable t) {
-            //ignore
-        }
-        if (bus == null) {
-            bus = element.getAttribute("bus");        
-            if (StringUtils.isEmpty(bus)) {
-                bus = element.getAttribute("name");
-            }
-            if (StringUtils.isEmpty(bus)) {
-                bus = Bus.DEFAULT_BUS_ID + ".config" + counter.getAndIncrement();
-            } else {
-                bus = bus + ".config";
-            }
-            try {
-                element.setUserData("ID", bus, null);
-            } catch (Throwable t) {
-                //maybe no DOM level 3, ignore, but, may have issues with the counter 
-            }
-        }
-        return bus;
-    }
-    
-    @NoJSR250Annotations
-    public static class BusConfig extends AbstractBasicInterceptorProvider
-        implements ApplicationContextAware {
-        
-        Bus bus;
-        String busName;
-        String id;
-        Collection<Feature> features;
-        Map<String, Object> properties;
-        
-        public BusConfig(String busName) {
-            this.busName = busName;
-        }
-        
-        public void setBus(Bus bb) {
-            if (bus == bb) {
-                return;
-            }
-            if (properties != null) {
-                bb.setProperties(properties);
-                properties = null;
-            }
-            if (!getInInterceptors().isEmpty()) {
-                bb.getInInterceptors().addAll(getInInterceptors());
-            }
-            if (!getOutInterceptors().isEmpty()) {
-                bb.getOutInterceptors().addAll(getOutInterceptors());
-            }
-            if (!getInFaultInterceptors().isEmpty()) {
-                bb.getInFaultInterceptors().addAll(getInFaultInterceptors());
-            }
-            if (!getOutFaultInterceptors().isEmpty()) {
-                bb.getOutFaultInterceptors().addAll(getOutFaultInterceptors());
-            }
-            if (!StringUtils.isEmpty(id)) {
-                bb.setId(id);
-            }
-            if (features != null) {
-                bb.setFeatures(features);
-                features = null;
-            }
-            bus = bb;
-        }
-
-        public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
-            if (bus != null) {
-                return;
-            }             
-        }
-        
-        public List<Interceptor<? extends Message>> getOutFaultInterceptors() {
-            if (bus != null) {
-                return bus.getOutFaultInterceptors();
-            }
-            return super.getOutFaultInterceptors();
-        }
-
-        public List<Interceptor<? extends Message>> getInFaultInterceptors() {
-            if (bus != null) {
-                return bus.getInFaultInterceptors();
-            }
-            return super.getInFaultInterceptors();
-        }
-
-        public List<Interceptor<? extends Message>> getInInterceptors() {
-            if (bus != null) {
-                return bus.getInInterceptors();
-            }
-            return super.getInInterceptors();
-        }
-
-        public List<Interceptor<? extends Message>> getOutInterceptors() {
-            if (bus != null) {
-                return bus.getOutInterceptors();
-            }
-            return super.getOutInterceptors();
-        }
-
-        public void setInInterceptors(List<Interceptor<? extends Message>> interceptors) {
-            if (bus != null) {
-                bus.getInInterceptors().addAll(interceptors);
-            } else {
-                super.setInInterceptors(interceptors);
-            }
-        }
-
-        public void setInFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
-            if (bus != null) {
-                bus.getInFaultInterceptors().addAll(interceptors);
-            } else {
-                super.setInFaultInterceptors(interceptors);
-            }
-        }
-
-        public void setOutInterceptors(List<Interceptor<? extends Message>> interceptors) {
-            if (bus != null) {
-                bus.getOutInterceptors().addAll(interceptors);
-            } else {
-                super.setOutInterceptors(interceptors);
-            }
-        }
-
-        public void setOutFaultInterceptors(List<Interceptor<? extends Message>> interceptors) {
-            if (bus != null) {
-                bus.getOutFaultInterceptors().addAll(interceptors);
-            } else {
-                super.setOutFaultInterceptors(interceptors);
-            }
-        }
-        
-        public Collection<Feature> getFeatures() {
-            if (bus != null) {
-                return bus.getFeatures();
-            }
-            return features;
-        }
-
-        public void setFeatures(Collection<? extends Feature> features) {
-            if (bus != null) {
-                bus.setFeatures(features);
-            } else {
-                this.features = CastUtils.cast(features);
-            }
-            
-        }
-        
-        public Map<String, Object> getProperties() {
-            if (bus != null) {
-                return bus.getProperties();
-            } 
-            return properties;
-        }
-        public void setProperties(Map<String, Object> s) {
-            if (bus != null) {
-                bus.setProperties(s);
-            } else {
-                this.properties = s;
-            }
-        }
-        
-        public void setId(String s) {
-            id = s;
-        }
-
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5e965955/core/src/main/java/org/apache/cxf/bus/spring/BusEntityResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/bus/spring/BusEntityResolver.java b/core/src/main/java/org/apache/cxf/bus/spring/BusEntityResolver.java
deleted file mode 100644
index 65d3ffc..0000000
--- a/core/src/main/java/org/apache/cxf/bus/spring/BusEntityResolver.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * 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.cxf.bus.spring;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import org.apache.cxf.common.logging.LogUtils;
-import org.springframework.beans.factory.xml.DelegatingEntityResolver;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PropertiesLoaderUtils;
-import org.springframework.util.CollectionUtils;
-
-/**
- * 
- */
-public class BusEntityResolver extends DelegatingEntityResolver  {
-    
-    private static final Logger LOG = LogUtils.getL7dLogger(BusEntityResolver.class);
-    
-    private EntityResolver dtdResolver;
-    private EntityResolver schemaResolver;
-    private Map<String, String> schemaMappings;
-    private ClassLoader classLoader;
-    
-    public BusEntityResolver(ClassLoader loader, EntityResolver dr, EntityResolver sr) {
-        super(dr, sr);
-        classLoader = loader;
-        dtdResolver = dr;
-        schemaResolver = sr;
-        
-        try {
-            Properties mappings = PropertiesLoaderUtils.loadAllProperties("META-INF/spring.schemas", 
-                                                                          classLoader);
-            schemaMappings = new ConcurrentHashMap<String, String>(mappings.size());
-            CollectionUtils.mergePropertiesIntoMap(mappings, schemaMappings);
-        } catch (IOException e) {
-            //ignore
-        }
-    }
-
-    @Override
-    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
-        InputSource source = super.resolveEntity(publicId, systemId);
-        if (null == source && null != systemId) {
-            // try the schema and dtd resolver in turn, ignoring the suffix in publicId
-            LOG.log(Level.FINE, "Attempting to resolve systemId {0}", systemId);
-            source = schemaResolver.resolveEntity(publicId, systemId);                
-            if (null == source) {
-                source = dtdResolver.resolveEntity(publicId, systemId); 
-            }
-        }
-        String resourceLocation = schemaMappings.get(systemId);
-        if (resourceLocation != null && publicId == null) {
-            Resource resource = new ClassPathResource(resourceLocation, classLoader);
-            if (resource != null && resource.exists()) {
-                source.setPublicId(systemId);    
-                source.setSystemId(resource.getURL().toString());
-            }
-        }
-        return source;
-    }    
-}


Mime
View raw message