cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r449700 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/resources/META-INF/cxf/ rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/ rt/bindings/xml/src/main/resources/ME...
Date Mon, 25 Sep 2006 15:02:14 GMT
Author: andreasmyth
Date: Mon Sep 25 08:02:11 2006
New Revision: 449700

URL: http://svn.apache.org/viewvc?view=rev&rev=449700
Log:
[JIRA CXF-32] Spring cfg for all non-core extensions.
Used custom application context in order to pull in fragments of same name from multiple jars.

Added:
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties   (with props)
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java   (with props)
Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/ExtensionManagerImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java
    incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
    incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLWrapTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/HeaderClientServerTest.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Mon Sep 25 08:02:11 2006
@@ -74,14 +74,21 @@
 
     private Map cachedBinding = new HashMap<BindingInfo, Binding>();
 
-    @Resource
     private Bus bus;
-
+    private Collection<String> activationNamespaces;    
+    
+    @Resource
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
     @Resource
-    private Collection<String> activationNamespaces;
+    public void setActivationNamespaces(Collection<String> ans) {
+        activationNamespaces = ans;
+    }
 
     @PostConstruct
-    void registerSelf() {
+    void register() {
         if (null == bus) {
             return;
         }

Added: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean class="org.apache.cxf.binding.soap.SoapBindingFactory" lazy-init="true">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+        <property name="activationNamespaces">
+            <set>
+                <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
+                <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
+                <value>http://cxf.apache.org/transports/jms</value>
+            </set>
+        </property>
+    </bean>
+</beans>

Propchange: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Mon Sep 25 08:02:11 2006
@@ -38,14 +38,22 @@
 public class XMLBindingFactory extends AbstractBindingFactory {
 
     private Map cachedBinding = new HashMap<BindingInfo, Binding>();
-    @Resource
+
     private Bus bus;
+    private Collection<String> activationNamespaces;
     
     @Resource
-    private Collection<String> activationNamespaces;
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
+    @Resource
+    public void setActivationNamespaces(Collection<String> ans) {
+        activationNamespaces = ans;
+    }
     
     @PostConstruct
-    void registerSelf() {
+    void register() {
         if (null == bus) {
             return;
         }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/bus-extensions.xml Mon Sep 25 08:02:11 2006
@@ -15,7 +15,7 @@
   "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.
+  under the License.cf
 -->
 <extensions xmlns="http://cxf.apache.org/bus/extension">
 

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean class="org.apache.cxf.binding.xml.XMLBindingFactory" lazy-init="true">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+        <property name="activationNamespaces">
+            <set>
+                <value>http://cxf.apache.org/bindings/xformat</value>
+            </set>
+        </property>
+    </bean>
+</beans>

Propchange: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java Mon Sep 25 08:02:11 2006
@@ -0,0 +1,102 @@
+/**
+ * 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.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.Configurer;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.UrlResource;
+
+public class BusApplicationContext extends AbstractXmlApplicationContext {
+    
+    private static final String DEFAULT_CXF_CFG_FILE = "META-INF/cxf/cxf.xml";
+    private static final String DEFAULT_CXF_EXT_CFG_FILE = "META-INF/cxf/cxf-extension.xml";
+    private static final Logger LOG = LogUtils.getL7dLogger(BusApplicationContext.class);
+    
+    private String cfgFile;
+    private boolean includeDefaults;
+    
+    BusApplicationContext(String cf, boolean include) {
+        cfgFile = cf;
+        includeDefaults = include;
+    }
+
+    @Override
+    protected Resource[] getConfigResources() {
+  
+        List<Resource> resources = new ArrayList<Resource>();
+       
+        if (includeDefaults) {
+            try {
+                Enumeration<URL> urls = Thread.currentThread().getContextClassLoader()
+                    .getResources(DEFAULT_CXF_CFG_FILE);
+                while (urls.hasMoreElements()) {
+                    resources.add(new UrlResource(urls.nextElement()));
+                }
+                
+                urls = Thread.currentThread().getContextClassLoader()
+                    .getResources(DEFAULT_CXF_EXT_CFG_FILE);
+                while (urls.hasMoreElements()) {
+                    resources.add(new UrlResource(urls.nextElement()));
+                }      
+            } catch (IOException ex) {
+                // ignore  
+            }  
+        }
+        
+        if (null == cfgFile) {
+            cfgFile = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+        }
+        if (null == cfgFile) {
+            cfgFile = Configurer.DEFAULT_USER_CFG_FILE;
+        }
+        ClassPathResource cpr = new ClassPathResource(cfgFile);
+        if (cpr.exists()) {
+            resources.add(cpr);
+        } else {
+            LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
+        }
+        
+        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;
+    }
+    
+    
+
+}

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java Mon Sep 25 08:02:11 2006
@@ -19,29 +19,18 @@
 
 package org.apache.cxf.bus.spring;
 
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.configuration.spring.ConfigurerImpl;
 import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.core.io.ClassPathResource;
 
 public class SpringBusFactory implements BusFactory {
     
-    private static final String DEFAULT_CXF_CFG_FILE = "META-INF/cxf/cxf.xml";
-    private static final String DEFAULT_CXF_EXT_CFG_FILE = "META-INF/cxf/cxf-extension.xml";
     private static final String DEFAULT_BUS_ID = "cxf";
     
     private static final Logger LOG = LogUtils.getL7dLogger(SpringBusImpl.class);
@@ -67,56 +56,20 @@
         return createBus(cfgFile, true);
     }
     
-    public Bus createBus(String cfgFile, boolean includeDefaults) {
+    public Bus createBus(String cfgFile, boolean includeDefaults) {        
         
-        List<String> cfgFileLocations = new ArrayList<String>();
-        
-        if (includeDefaults) {
-            try {
-                Enumeration<URL> resources = Thread.currentThread().getContextClassLoader()
-                    .getResources(DEFAULT_CXF_CFG_FILE);                
-                if (resources.hasMoreElements()) {
-                    cfgFileLocations.add(DEFAULT_CXF_CFG_FILE);
-                }
-                resources = Thread.currentThread().getContextClassLoader()
-                    .getResources(DEFAULT_CXF_EXT_CFG_FILE);
-                if (resources.hasMoreElements()) {
-                    cfgFileLocations.add(DEFAULT_CXF_EXT_CFG_FILE);
-                }      
-            } catch (IOException ex) {
-                // ignore  
-            }  
-        }
-        
-        if (null == cfgFile) {
-            cfgFile = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
-        }
-        if (null == cfgFile) {
-            cfgFile = Configurer.DEFAULT_USER_CFG_FILE;
-        }
-        ClassPathResource cpr = new ClassPathResource(cfgFile);
-        if (cpr.exists()) {
-            cfgFileLocations.add(cfgFile);
-        } else {
-            LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
-        }
-        
-        if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Creating application context with cfg files: " + cfgFileLocations);
-        }
-        String[] locations = new String[cfgFileLocations.size()];
-        locations = cfgFileLocations.toArray(locations);
-        
-        ApplicationContext ac = null;
+        BusApplicationContext bac = null;
         try {      
-            ac = new ClassPathXmlApplicationContext(locations);           
+            bac = new BusApplicationContext(cfgFile, includeDefaults);           
         } catch (BeansException ex) {
             LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
+            
         }
         
-        Bus bus = (Bus)ac.getBean(DEFAULT_BUS_ID);
+        bac.refresh();
+        Bus bus = (Bus)bac.getBean(DEFAULT_BUS_ID);
         
-        Configurer configurer = new ConfigurerImpl(ac);
+        Configurer configurer = new ConfigurerImpl(bac);
         bus.setExtension(configurer, Configurer.class);
 
         return bus;

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/ExtensionManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/ExtensionManagerImpl.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/ExtensionManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/ExtensionManagerImpl.java Mon Sep 25 08:02:11 2006
@@ -23,9 +23,11 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.extension.ExtensionManager;
 import org.apache.cxf.helpers.CastUtils;
 import org.springframework.beans.BeansException;
@@ -37,6 +39,7 @@
 
 public class ExtensionManagerImpl implements ExtensionManager, BeanFactoryPostProcessor {
 
+    private static final Logger LOG = LogUtils.getL7dLogger(ExtensionManagerImpl.class);
     private static final String ACTIVATION_NAMESPACES_PROPERTY_NAME = "activationNamespaces";
     
     private Map<String, Collection<String>> deferred;
@@ -50,7 +53,12 @@
         Collection<String> beanNames = deferred.get(namespace);
         if (null != beanNames) {
             for (String n : beanNames) {
-                factory.getBean(n);
+                try {
+                    factory.getBean(n);
+                } catch (BeansException ex) {
+                    LogUtils.log(LOG, Level.WARNING, "EXTENSION_ACTIVATION_EXC", ex, namespace);
+                    throw ex;
+                }
             }
             beanNames = null;
             deferred.remove(namespace);
@@ -73,14 +81,18 @@
             if (null == pv) {
                 continue;
             }
-            List<String> activationNamespaces = null;
+            Collection<String> activationNamespaces = null;
             try {     
-                List<?> values = (List<?>)pv.getValue();
+                Collection<?> values = (Collection<?>)pv.getValue();
                 activationNamespaces = CastUtils.cast(values);
             } catch (ClassCastException ex) {
+                ex.printStackTrace();
                 continue;
             }
             for (String ns : activationNamespaces) {
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.fine("registering bean " + n + " for deferred activation in namespace " + ns);
+                }
                 addDeferred(ns, n);
             }  
         }

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties Mon Sep 25 08:02:11 2006
@@ -0,0 +1 @@
+EXTENSION_ACTIVATION_EXC = Failed to activate extension for namespace {0}.
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java (added)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java Mon Sep 25 08:02:11 2006
@@ -0,0 +1,37 @@
+/**
+ * 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 junit.framework.TestCase;
+
+public class BusApplicationContextTest extends TestCase {
+
+    public void testGetResources() {
+        BusApplicationContext ctx = new BusApplicationContext("nowhere.xml", false);
+        assertNull("Unexpected number of resources", ctx.getConfigResources());
+        String cfgFile = "/org/apache/cxf/bus/spring/resources/bus-overwrite.xml";
+        ctx = new BusApplicationContext(cfgFile, false);
+        assertEquals("Unexpected number of resources", 1, ctx.getConfigResources().length);
+        ctx = new BusApplicationContext("nowhere.xml", true);
+        assertEquals("Unexpected number of resources", 1, ctx.getConfigResources().length);
+        ctx = new BusApplicationContext(cfgFile, true);
+        assertEquals("Unexpected number of resources", 2, ctx.getConfigResources().length);
+    }
+}

Propchange: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/servlet/ServletTransportFactory.java Mon Sep 25 08:02:11 2006
@@ -38,31 +38,51 @@
 
 public class ServletTransportFactory implements ConduitInitiator, DestinationFactory {
 
-    Bus bus;
     EndpointReferenceType reference;
-    @Resource
-    Collection<String> activationNamespaces;
+    
+    private Bus bus;    
+    private Collection<String> activationNamespaces;
+    
     
     
     public ServletTransportFactory(Bus b, EndpointReferenceType ref) {
-        bus = b;
-            
+        bus = b;      
         reference = ref;
     }
 
     public ServletTransportFactory() {
-        // TODO Auto-generated constructor stub
+    }
+    
+    public Bus getBus() {
+        return bus;
+    }
+
+    @Resource
+    public void setBus(Bus bus) {
+        this.bus = bus;
+    }
+    
+    @Resource
+    public void setActivationNamespaces(Collection<String> ans) {
+        activationNamespaces = ans;
     }
 
     @PostConstruct
-    void registerWithBindingManager() {
+    void register() {
+        if (null == bus) {
+            return;
+        }
         ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
-        for (String ns : activationNamespaces) {
-            cim.registerConduitInitiator(ns, this);
+        if (null != cim) {
+            for (String ns : activationNamespaces) {
+                cim.registerConduitInitiator(ns, this);
+            }
         }
         DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
-        for (String ns : activationNamespaces) {
-            dfm.registerDestinationFactory(ns, this);
+        if (null != dfm) {
+            for (String ns : activationNamespaces) {
+                dfm.registerDestinationFactory(ns, this);
+            }
         }
     }
 
@@ -79,15 +99,6 @@
     public Destination getDestination(EndpointInfo endpointInfo)
         throws IOException {
         return new ServletDestination(bus, null, endpointInfo, reference);
-    }
-
-    public Bus getBus() {
-        return bus;
-    }
-
-    @Resource
-    public void setBus(Bus bus) {
-        this.bus = bus;
     }
 
 }

Added: incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean class="org.apache.cxf.jaxws.servlet.ServletTransportFactory" lazy-init="true">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+        <property name="activationNamespaces">
+            <set>
+                <value>http://schemas.xmlsoap.org/wsdl/servlet</value>               
+            </set>
+        </property>
+    </bean>
+</beans>

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java (original)
+++ incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java Mon Sep 25 08:02:11 2006
@@ -23,10 +23,16 @@
 import java.util.Iterator;
 import java.util.List;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+
 
 public class EventProcessorImpl implements EventProcessor {      
     protected List<EventListenerInfo> listenerList;
     protected EventCache cache;
+    private Bus bus;
     
     public EventProcessorImpl() {
         this(null);
@@ -35,6 +41,18 @@
     public EventProcessorImpl(EventCache eventCache) {
         listenerList = new ArrayList<EventListenerInfo>();
         cache = eventCache == null ? new EventCacheImpl() : eventCache;
+    }
+    
+    @Resource
+    public void setBus(Bus bus) {        
+        this.bus = bus;
+    }
+    
+    @PostConstruct
+    public void register() {
+        if (null != bus) {
+            bus.setExtension(this, EventProcessor.class);
+        }
     }
     
     public void addEventListener(EventListener l) {

Modified: incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java Mon Sep 25 08:02:11 2006
@@ -25,6 +25,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.management.MBeanServer;
 
@@ -43,7 +44,7 @@
     implements InstrumentationManager, EventListener {
     static final Logger LOG = LogUtils.getL7dLogger(InstrumentationManagerImpl.class);
 
-    Bus bus;
+    private Bus bus;
     
     private List <Instrumentation> instrumentations;
     private JMXManagedComponentManager jmxManagedComponentManager;
@@ -66,6 +67,13 @@
     public void setBus(Bus bus) {        
         this.bus = bus;
         initInstrumentationManagerImpl();
+    }
+    
+    @PostConstruct
+    public void register() {
+        if (null != bus) {
+            bus.setExtension(this, InstrumentationManager.class);
+        }
     }
     
     public void initInstrumentationManagerImpl() {

Added: incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean id="org.apache.cxf.event.EventProcessor" class="org.apache.cxf.event.EventProcessorImpl">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+    </bean>
+    
+    <bean id="org.apache.cxf.management.InstrumentationManager" class="org.apache.cxf.management.InstrumentationManagerImpl">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+    </bean>
+    
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java Mon Sep 25 08:02:11 2006
@@ -38,20 +38,39 @@
 
 public class HTTPTransportFactory implements ConduitInitiator, DestinationFactory {
     
-    Bus bus;
+    private Bus bus;
+    private Collection<String> activationNamespaces;
     
     @Resource
-    Collection<String> activationNamespaces;
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
+    public Bus getBus() {
+        return bus;
+    }
+    
+    @Resource
+    public void setActivationNamespaces(Collection<String> ans) {
+        activationNamespaces = ans;
+    }
     
     @PostConstruct
     void registerWithBindingManager() {
+        if (null == bus) {
+            return;
+        }
         ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
-        for (String ns : activationNamespaces) {
-            cim.registerConduitInitiator(ns, this);
+        if (null != cim) {
+            for (String ns : activationNamespaces) {
+                cim.registerConduitInitiator(ns, this);
+            }
         }
         DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
-        for (String ns : activationNamespaces) {
-            dfm.registerDestinationFactory(ns, this);
+        if (null != dfm) {
+            for (String ns : activationNamespaces) {
+                dfm.registerDestinationFactory(ns, this);
+            }
         }
     }
 
@@ -68,14 +87,5 @@
     public Destination getDestination(EndpointInfo endpointInfo)
         throws IOException {
         return new JettyHTTPDestination(bus, this, endpointInfo);
-    }
-
-    public Bus getBus() {
-        return bus;
-    }
-
-    @Resource
-    public void setBus(Bus bus) {
-        this.bus = bus;
     }
 }

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean class="org.apache.cxf.transport.http.HTTPTransportFactory" lazy-init="true">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+        <property name="activationNamespaces">
+            <set>
+                <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
+                <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
+                <value>http://schemas.xmlsoap.org/wsdl/http/</value>
+                <value>http://cxf.apache.org/transports/http/configuration</value>
+                <value>http://cxf.apache.org/bindings/xformat</value>
+            </set>
+        </property>
+    </bean>
+</beans>

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java Mon Sep 25 08:02:11 2006
@@ -37,13 +37,25 @@
 
 public class JMSTransportFactory implements ConduitInitiator, DestinationFactory  {
 
-    Bus bus;
+    private Bus bus;
+    private Collection<String> activationNamespaces;
     
     @Resource
-    Collection<String> activationNamespaces;
+    public void setBus(Bus b) {
+        bus = b;
+    }
+    
+    public Bus getBus() {
+        return bus;
+    }
     
+    @Resource
+    public void setActivationNamespaces(Collection<String> ans) {
+        activationNamespaces = ans;
+    }
+        
     @PostConstruct
-    void registerWithBindingManager() {
+    void register() {
         ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
         for (String ns : activationNamespaces) {
             cim.registerConduitInitiator(ns, this);
@@ -66,13 +78,5 @@
         //TODO
         return new JMSDestination(bus, this, endpointInfo);
     }
-    
-    public Bus getBus() {
-        return bus;
-    }
-    
-    @Resource
-    public void setBus(Bus bus) {
-        this.bus = bus;
-    }
+   
 }

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml Mon Sep 25 08:02:11 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:foo="http://cxf.apache.org/configuration/foo"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean class="org.apache.cxf.transport.jms.JMSTransportFactory" lazy-init="true">
+        <property name="bus">
+            <ref bean="cxf"/>
+        </property>
+        <property name="activationNamespaces">
+            <set>
+                <value>http://cxf.apache.org/transports/jms</value>
+                <value>http://cxf.apache.org/transports/jms/configuration</value>
+            </set>
+        </property>
+    </bean>
+</beans>

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-extension.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -38,7 +38,7 @@
 import org.apache.hello_world_doc_lit_bare.SOAPService;
 import org.apache.hello_world_doc_lit_bare.types.TradePriceData;
 
-public class DOCBareClientServerTest extends ClientServerTestBase {
+public class DOCBareClientServerTest extends ClientServerTestBase {    
 
     private final QName serviceName = new QName("http://apache.org/hello_world_doc_lit_bare",
                                                 "SOAPService");

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java?view=auto&rev=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java Mon Sep 25 08:02:11 2006
@@ -0,0 +1,120 @@
+/**
+ * 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.systest.bus;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusException;
+import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.apache.cxf.endpoint.ServerRegistry;
+import org.apache.cxf.event.EventProcessor;
+import org.apache.cxf.management.InstrumentationManager;
+import org.apache.cxf.phase.PhaseManager;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.workqueue.WorkQueueManager;
+import org.apache.cxf.wsdl.WSDLManager;
+
+public class SpringBusFactoryTest extends TestCase {
+    
+    public void testKnownExtensions() throws BusException {
+        Bus bus = new SpringBusFactory().createBus();
+        assertNotNull(bus);
+        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);  
+        assertNotNull("No binding factory manager", bfm);
+        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
+        assertNotNull("No destination factory manager", dfm);
+        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
+        assertNotNull("No conduit initiator manager", cim);
+        
+        assertNotNull("No wsdl manager", bus.getExtension(WSDLManager.class));
+        assertNotNull("No phase manager", bus.getExtension(PhaseManager.class));
+        assertNotNull("No workqueue manager", bus.getExtension(WorkQueueManager.class));
+        assertNotNull("No lifecycle manager", bus.getExtension(BusLifeCycleManager.class));
+        assertNotNull("No service registry", bus.getExtension(ServerRegistry.class));
+        assertNotNull("No instrumentation manager", bus.getExtension(InstrumentationManager.class));
+        assertNotNull("No event processor", bus.getExtension(EventProcessor.class));
+        
+        
+        try {
+            bfm.getBindingFactory("http://cxf.apache.org/unknown");
+        } catch (BusException ex) {
+            // expected
+        }
+        assertNotNull("binding factory not available", 
+                      bfm.getBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/"));
+        assertNotNull("binding factory not available", 
+                      bfm.getBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/http"));
+        assertNotNull("binding factory not available", 
+                      bfm.getBindingFactory("http://cxf.apache.org/transports/jms"));   
+        assertNotNull("binding factory not available", 
+                      bfm.getBindingFactory("http://cxf.apache.org/bindings/xformat"));
+        
+        
+        try {
+            cim.getConduitInitiator("http://cxf.apache.org/unknown");
+        } catch (BusException ex) {
+            // expected
+        }
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/http/"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://cxf.apache.org/transports/http/configuration"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://cxf.apache.org/bindings/xformat"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://cxf.apache.org/transports/jms"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://cxf.apache.org/transports/jms/configuration"));
+        assertNotNull("conduit initiator not available", 
+                      cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/servlet"));
+        
+        try {
+            dfm.getDestinationFactory("http://cxf.apache.org/unknown");
+        } catch (BusException ex) {
+            // expected
+        }
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/http/"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://cxf.apache.org/bindings/xformat"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://cxf.apache.org/transports/jms"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://cxf.apache.org/transports/jms/configuration"));
+        assertNotNull("destination factory not available", 
+                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/servlet"));
+        
+        
+    }
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/bus/SpringBusFactoryTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/callback/CallbackClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -51,7 +51,7 @@
     private static final QName PORT_TYPE_CALLBACK
         = new QName("http://apache.org/callback", "CallbackPortType");
     
-    public static Test suite() throws Exception {
+    public static Test suite() throws Exception {        
         TestSuite suite = new TestSuite(CallbackClientServerTest.class);
         return new ClientServerSetupBase(suite) {
             public void startServers() throws Exception {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -56,7 +56,7 @@
                                                 "SOAPDispatchService");
     private final QName portName = new QName("http://apache.org/hello_world_soap_http", "SoapDispatchPort");
 
-    public static class Server extends TestServerBase {
+    public static class Server extends TestServerBase {        
 
         protected void run() {
             Object implementor = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -49,7 +49,7 @@
     private final QName portName = new QName("http://apache.org/hello_world_xml_http/wrapped", 
                                              "XMLDispatchPort");
 
-    public static class Server extends TestServerBase {
+    public static class Server extends TestServerBase {        
 
         protected void run() {
             Object implementor = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java Mon Sep 25 08:02:11 2006
@@ -52,7 +52,7 @@
     private HandlerTest handlerTest;
 
 
-    public static Test suite() throws Exception {
+    public static Test suite() throws Exception {        
         TestSuite suite = new TestSuite(HandlerInvocationTest.class);
         return new ClientServerSetupBase(suite) {
             public void startServers() throws Exception {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java Mon Sep 25 08:02:11 2006
@@ -40,7 +40,7 @@
 
     private final QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortRPCLit");
 
-    public static class Server extends TestServerBase {
+    public static class Server extends TestServerBase {        
 
         protected void run()  {
             Object implementor = new RPCLitGreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -60,6 +60,7 @@
                 "SoapPort2");
 
     public static class Server extends TestServerBase {
+        
 
         protected void run()  {
             Object implementor = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLBareTest.java Mon Sep 25 08:02:11 2006
@@ -39,7 +39,7 @@
 
     private final QName portName = new QName("http://apache.org/hello_world_xml_http/bare", "XMLPort");
 
-    public static class Server extends TestServerBase {
+    public static class Server extends TestServerBase {        
 
         protected void run() {
             Object implementor = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLWrapTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLWrapTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLWrapTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLWrapTest.java Mon Sep 25 08:02:11 2006
@@ -40,6 +40,7 @@
     private final QName portName = new QName("http://apache.org/hello_world_xml_http/wrapped", "XMLPort");
 
     public static class Server extends TestServerBase {
+        
 
         protected void run() {
             Object implementor = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/HeaderClientServerTest.java?view=diff&rev=449700&r1=449699&r2=449700
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/HeaderClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/HeaderClientServerTest.java Mon Sep 25 08:02:11 2006
@@ -58,7 +58,7 @@
     
     
     public static class MyServer extends TestServerBase {
-
+        
         protected void run()  {
             Object implementor = new TestHeaderImpl();
             String address = "http://localhost:9104/SoapHeaderContext/SoapHeaderPort";



Mime
View raw message