cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r450750 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/configuration/ common/common/src/main/java/org/apache/cxf/configuration/spring/ common/common/src/test/java/org/apache/cxf/configuration/spring/ common/metacode/s...
Date Thu, 28 Sep 2006 07:56:14 GMT
Author: andreasmyth
Date: Thu Sep 28 00:56:12 2006
New Revision: 450750

URL: http://svn.apache.org/viewvc?view=rev&rev=450750
Log:
[JIRA CXF-26] Explicit injection into objects created by the runtime (i.e. conduits, destinations, extensions loaded via the proprietary extension manager implementation).
[JIRA CXF-123] Registered property editors for all complex types so far used in configuration (for both bus implementations, hence the use of a distinct fragment name cxf-property-editors.xml).
Annotation of methods in AbstractConfigurableBeanBase class with XmlTransient to fix unmarshalling problems of complex types.
Once off system test ManagedBusTest to demonstrate how to configure the instrumentation manager to be jmx enabled - can be deleted later on.

Added:
    incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/
    incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml   (with props)
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml   (with props)
    incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-property-editors.xml   (with props)
    incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-property-editors.xml   (with props)
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-property-editors.xml   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java   (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml   (with props)
Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/AbstractConfigurableBeanBase.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorRegistrar.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/Messages.properties
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.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/AbstractHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/AbstractConfigurableBeanBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/AbstractConfigurableBeanBase.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/AbstractConfigurableBeanBase.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/AbstractConfigurableBeanBase.java Thu Sep 28 00:56:12 2006
@@ -21,19 +21,24 @@
 
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlTransient;
+
 public abstract class AbstractConfigurableBeanBase implements Configurable {
     
     private List<ConfigurationProvider> fallbackProviders;
+
     private List<ConfigurationProvider> overwriteProviders;
     
+    @XmlTransient
     public String getBeanName() {
-        return this.getClass().getName();
+        return getClass().getName();
     }
-
+    
     public List<ConfigurationProvider> getFallbackProviders() {
         return fallbackProviders;
     }
     
+    @XmlTransient
     public void setFallbackProviders(List<ConfigurationProvider> fallbackProviders) {
         this.fallbackProviders = fallbackProviders;
     }
@@ -42,6 +47,7 @@
         return overwriteProviders;
     }
 
+    @XmlTransient
     public void setOverwriteProviders(List<ConfigurationProvider> overwriteProviders) {
         this.overwriteProviders = overwriteProviders;
     }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Thu Sep 28 00:56:12 2006
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.configuration.spring;
 
+import java.lang.reflect.Method;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -32,7 +33,6 @@
 import org.springframework.beans.factory.wiring.BeanWiringInfo;
 import org.springframework.beans.factory.wiring.BeanWiringInfoResolver;
 import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 
 public class ConfigurerImpl extends BeanConfigurerSupport implements Configurer {
@@ -56,7 +56,7 @@
         ClassPathResource cpr = new ClassPathResource(cfgFile);
         if (cpr.exists()) {
             try {
-                ApplicationContext ac = new ClassPathXmlApplicationContext(cfgFile);
+                ApplicationContext ac = new JaxbClassPathXmlApplicationContext(cfgFile);
                 setApplicationContext(ac);
             } catch (BeansException ex) {
                 LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
@@ -76,12 +76,12 @@
             return;
         }
         
-        if (!(beanInstance instanceof Configurable)) {
+        final String beanName = getBeanName(beanInstance);
+        
+        if (null == beanName) {
             return;
         }
         
-        final String beanName = ((Configurable)beanInstance).getBeanName();
-        
         setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
             public BeanWiringInfo resolveWiringInfo(Object instance) {
                 if (null != beanName && !"".equals(beanName)) {
@@ -98,12 +98,36 @@
             // users often wonder why the settings in their configuration files seem
             // to have no effect - the most common cause is that they have been using
             // incorrect bean ids
-            LOG.log(Level.INFO, "NO_MATCHING_BEAN_MSG", beanName);
+            LogUtils.log(LOG, Level.INFO, "NO_MATCHING_BEAN_MSG", new Object[] {beanName});
+            // LOG.log(Level.INFO, "NO_MATCHING_BEAN_MSG", beanName);
+        }
+    }
+    
+    protected String getBeanName(Object beanInstance) {
+        if (beanInstance instanceof Configurable) {
+            return ((Configurable)beanInstance).getBeanName();
         }
+        String beanName = null;
+        try {
+            Method m = beanInstance.getClass().getDeclaredMethod("getBeanName", (Class[])null);
+            beanName = (String)(m.invoke(beanInstance));
+        } catch (NoSuchMethodException ex) {
+            // ignore
+        } catch (Exception ex) {
+            LogUtils.log(LOG, Level.WARNING, "ERROR_DETERMINING_BEAN_NAME_EXC", ex);
+        }
+        
+        if (null == beanName) {
+            LogUtils.log(LOG, Level.INFO, "COULD_NOT_DETERMINE_BEAN_NAME_MSG", 
+                         new Object[] {beanInstance.getClass().getName()});
+        }
+      
+        return beanName;
     }
     
     private void setApplicationContext(ApplicationContext ac) {
         appContext = ac;
         setBeanFactory(appContext.getAutowireCapableBeanFactory());
     }
+    
 }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java Thu Sep 28 00:56:12 2006
@@ -19,22 +19,40 @@
 
 package org.apache.cxf.configuration.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.beans.BeansException;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.UrlResource;
 
 public class JaxbClassPathXmlApplicationContext extends ClassPathXmlApplicationContext {
     
-    public JaxbClassPathXmlApplicationContext(String configLocation) throws BeansException {
-        super(configLocation);
+    private static final String CXF_PROPERTY_EDITORS_CFG_FILE = "META-INF/cxf/cxf-property-editors.xml";
+    private static final Logger LOG = LogUtils.getL7dLogger(JaxbClassPathXmlApplicationContext.class);
+    
+    String[] cfgFileLocations;
+    
+    public JaxbClassPathXmlApplicationContext(String location) throws BeansException {
+        super(new String[]{location});
     }
 
-    public JaxbClassPathXmlApplicationContext(String[] configLocations) throws BeansException {
-        super(configLocations);
+    public JaxbClassPathXmlApplicationContext(String[] locations) throws BeansException {
+        super(locations);
+        cfgFileLocations = locations;
     }
     
-    
-
     @Override
     protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
         reader.setDocumentReaderClass(JaxbBeanDefinitionDocumentReader.class);
@@ -43,6 +61,51 @@
         reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
         reader.setNamespaceAware(true);  
               
+    }
+    
+    @Override
+    protected Resource[] getConfigResources() {
+  
+        List<Resource> resources = new ArrayList<Resource>();
+       
+        try {
+            Enumeration<URL> urls = Thread.currentThread().getContextClassLoader()
+                .getResources(CXF_PROPERTY_EDITORS_CFG_FILE);
+            while (urls.hasMoreElements()) {
+                resources.add(new UrlResource(urls.nextElement()));
+            }
+        } catch (IOException ex) {
+            // ignore
+        }  
+       
+        if (null == cfgFileLocations || cfgFileLocations.length == 0) {
+            cfgFileLocations = new String[1];
+            cfgFileLocations[0] = System.getProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME);
+            if (null == cfgFileLocations[0]) {
+                cfgFileLocations[0] = Configurer.DEFAULT_USER_CFG_FILE;
+            }
+        }
+        
+        for (String cfgFile : cfgFileLocations) {
+
+            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;
     }
    
 }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorRegistrar.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorRegistrar.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorRegistrar.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorRegistrar.java Thu Sep 28 00:56:12 2006
@@ -21,12 +21,17 @@
 
 import java.util.ArrayList;
 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.logging.LogUtils;
 import org.springframework.beans.PropertyEditorRegistrar;
 import org.springframework.beans.PropertyEditorRegistry;
 
 public class JaxbPropertyEditorRegistrar implements PropertyEditorRegistrar {
+    private static final Logger LOG = LogUtils.getL7dLogger(JaxbPropertyEditorRegistrar.class);
+    
     private String packageName;
     private List<String> propertyClassNames;
 
@@ -64,7 +69,11 @@
                     ex.printStackTrace();
                 }
                 if (null != cls) {
+                    
                     registry.registerCustomEditor(cls, editor);
+                    if (LOG.isLoggable(Level.FINE)) {
+                        LOG.fine("registered editor for class: " + cls.getName());
+                    }
                 }
             }
         }

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/Messages.properties?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/Messages.properties (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/spring/Messages.properties Thu Sep 28 00:56:12 2006
@@ -1,4 +1,6 @@
-NO_MATCHING_BEAN _MSG= Could not find a definition for bean with id {0} - no injection will be performed.
+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.
 USER_CFG_FILE_NOT_FOUND_MSG = Could not find the configuration file {0} on the classpath.
 JAXB_PROPERTY_EDITOR_EXC = Property editor failed to bind element {0}.
 APP_CONTEXT_CREATION_FAILED_MSG = Failed to create application context.

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java (original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java Thu Sep 28 00:56:12 2006
@@ -147,6 +147,26 @@
                      new Short((short)21), sb.getUnsignedByteAttr());
     }
     
+    public void testGetBeanName() {
+        ConfigurerImpl configurer = new ConfigurerImpl((String)null);
+        Object beanInstance = new Configurable() {
+
+            public String getBeanName() {
+                return "a";
+            }
+        };
+        assertEquals("a", configurer.getBeanName(beanInstance));
+        final class NamedBean {
+            public String getBeanName() {
+                return "b";
+            }
+        }
+        beanInstance = new NamedBean(); 
+        assertEquals("b", configurer.getBeanName(beanInstance));
+        beanInstance = this;
+        assertNull(configurer.getBeanName(beanInstance));
+    }
+    
     final class SimpleBean implements Configurable {
         
         private String beanName;
@@ -307,9 +327,6 @@
 
         public void setBeanName(String beanName) {
             this.beanName = beanName;
-        }
-
-        
-        
+        }    
     }
 }

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml (original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml Thu Sep 28 00:56:12 2006
@@ -19,7 +19,6 @@
 -->
 <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">
     

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml (original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml Thu Sep 28 00:56:12 2006
@@ -19,7 +19,6 @@
 -->
 <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">
  

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml (original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml Thu Sep 28 00:56:12 2006
@@ -19,7 +19,6 @@
 -->
 <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">
     

Added: incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml (added)
+++ incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,42 @@
+<?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:im="http://cxf.apache.org/management"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+    <bean id="org.apache.cxf.configuration.security.customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list>
+                <bean class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+                    <property name="packageName" value="org.apache.cxf.configuration.security"/>
+                    <property name="propertyClassNames">
+                        <list>
+                            <value>AuthorizationPolicy</value>
+                            <value>SSLClientPolicy</value>
+                            <value>SSLServerPolicy</value>
+                        </list>
+                    </property>
+                </bean>
+           </list>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/common/metacode/src/main/resources/META-INF/cxf/cxf-property-editors.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java Thu Sep 28 00:56:12 2006
@@ -30,6 +30,7 @@
 import java.util.Map;
 
 import org.apache.cxf.common.injection.ResourceInjector;
+import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.extension.ExtensionManager;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.resource.ResourceResolver;
@@ -126,6 +127,13 @@
         }
  
         Object obj = e.load(loader);
+        
+        Configurer configurer = (Configurer)(activated.get(Configurer.class));
+        if (null != configurer) {
+            configurer.configureBean(obj);
+        }
+        
+        
         
         // let the object know for which namespaces it has been activated
         ResourceResolver namespacesResolver = null;

Modified: 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=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusApplicationContext.java Thu Sep 28 00:56:12 2006
@@ -30,21 +30,23 @@
 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.apache.cxf.configuration.spring.JaxbClassPathXmlApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.UrlResource;
 
-public class BusApplicationContext extends AbstractXmlApplicationContext {
+public class BusApplicationContext extends JaxbClassPathXmlApplicationContext {
     
     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 CXF_PROPERTY_EDITORS_CFG_FILE = "META-INF/cxf/cxf-property-editors.xml";
     private static final Logger LOG = LogUtils.getL7dLogger(BusApplicationContext.class);
     
-    private String cfgFile;
     private boolean includeDefaults;
+    private String cfgFile;
     
     BusApplicationContext(String cf, boolean include) {
+        super((String[])null);
         cfgFile = cf;
         includeDefaults = include;
     }
@@ -66,7 +68,14 @@
                     .getResources(DEFAULT_CXF_EXT_CFG_FILE);
                 while (urls.hasMoreElements()) {
                     resources.add(new UrlResource(urls.nextElement()));
-                }      
+                } 
+                
+                urls = Thread.currentThread().getContextClassLoader()
+                    .getResources(CXF_PROPERTY_EDITORS_CFG_FILE);
+                while (urls.hasMoreElements()) {
+                    resources.add(new UrlResource(urls.nextElement()));
+                } 
+                
             } catch (IOException ex) {
                 // ignore  
             }  
@@ -96,6 +105,13 @@
         res = resources.toArray(res);
         return res;
     }
+
+    @Override
+    protected String[] getConfigLocations() {
+        return super.getConfigLocations();
+    }
+    
+    
     
     
 

Modified: 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=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusApplicationContextTest.java Thu Sep 28 00:56:12 2006
@@ -22,7 +22,7 @@
 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());
@@ -30,8 +30,8 @@
         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);
+        ctx = new BusApplicationContext(cfgFile, true);
+        assertEquals("Unexpected number of resources", 3, ctx.getConfigResources().length);
     }
 }

Added: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml (added)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,32 @@
+<?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"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    
+    <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list merge="true">
+           </list>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

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

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

Propchange: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/test.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java Thu Sep 28 00:56:12 2006
@@ -78,24 +78,34 @@
         assertEquals("Unexpected bean name", PORT_NAME.toString(), endpoint.getBeanName());
         assertTrue("Unexpected value for property validating", !endpoint.getValidating());
    
+        System.out.println("endpoint interceptors");
         List<Interceptor> interceptors = endpoint.getInInterceptors();
+        printInterceptors("in", interceptors);        
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = endpoint.getOutInterceptors();
+        printInterceptors("out", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = endpoint.getInFaultInterceptors();
+        printInterceptors("inFault", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = endpoint.getOutFaultInterceptors();
+        printInterceptors("outFault", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         
+        System.out.println("service interceptors");
         org.apache.cxf.service.ServiceImpl svc = (org.apache.cxf.service.ServiceImpl)endpoint.getService();
         assertEquals("Unexpected bean name", SERVICE_NAME.toString(), svc.getBeanName());
         interceptors = svc.getInInterceptors();
+        printInterceptors("in", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = svc.getOutInterceptors();
+        printInterceptors("out", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = svc.getInFaultInterceptors();
+        printInterceptors("inFault", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
         interceptors = svc.getOutFaultInterceptors();
+        printInterceptors("outFault", interceptors);
         assertNull("Unexpected test interceptor", findTestInterceptor(interceptors));
     }
     
@@ -239,6 +249,12 @@
             }
         }
         return null;
+    }
+    
+    private void printInterceptors(String type, List<Interceptor> interceptors) {
+        for (Interceptor i : interceptors) {
+            System.out.println("    " + type + ": " + i.getClass().getName());
+        }
     }
     
     @SuppressWarnings("unchecked")

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=450750&r1=450749&r2=450750
==============================================================================
--- 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 Thu Sep 28 00:56:12 2006
@@ -58,7 +58,7 @@
             setJMXConnectorPolicy(new JMXConnectorPolicyType());
         }      
     }
-    
+       
     public Bus getBus() {
         return bus;
     }
@@ -76,10 +76,16 @@
         }
     }
     
+    @Override
+    public String getBeanName() {
+        return InstrumentationManager.class.getName();
+    }
+    
     public void initInstrumentationManagerImpl() {
         LOG.info("Setting up InstrumentationManager");
         
         if (getInstrumentation().isEnabled()) {
+            LOG.fine("Instrumentation is enabled.");
             instrumentations = new LinkedList<Instrumentation>();
             //regist to the event process
             ComponentEventFilter componentEventFilter = new ComponentEventFilter();
@@ -89,7 +95,8 @@
             }    
         }
             
-        if (getInstrumentation().isJMXEnabled()) {           
+        if (getInstrumentation().isJMXEnabled()) {  
+            LOG.fine("JMX is enabled.");
             jmxManagedComponentManager = new JMXManagedComponentManager();
             jmxManagedComponentManager.init(getJMXConnectorPolicy());
         }
@@ -97,7 +104,7 @@
     
     public void shutdown() {
         if (LOG.isLoggable(Level.INFO)) {
-            LOG.info("Shutdown InstrumentationManager ");
+            LOG.info("Shutdown InstrumentationManager");
         }
         
         if (jmxManagedComponentManager != null) {

Added: incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-property-editors.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-property-editors.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-property-editors.xml (added)
+++ incubator/cxf/trunk/rt/management/src/main/resources/META-INF/cxf/cxf-property-editors.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,57 @@
+<?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:im="http://cxf.apache.org/management"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+    <bean id="org.apache.cxf.management.customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list>
+                <!--
+                <ref bean="org.apache.cxf.management.JaxbPropertyEditorRegistrar"/>
+                -->
+                <bean class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+                    <property name="packageName" value="org.apache.cxf.management"/>
+                    <property name="propertyClassNames">
+                        <list>
+                            <value>InstrumentationType</value>
+                            <value>JMXConnectorPolicyType</value>
+                        </list>
+                    </property>
+                </bean>
+           </list>
+        </property>
+    </bean>
+    <!--
+    <bean id="org.apache.cxf.management.JaxbPropertyEditorRegistrar"
+          class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+        <property name="customEditorConfigurer" ref="customEditorConfigurer"/>
+        <property name="packageName" value="org.apache.cxf.management"/>
+        <property name="propertyClassNames">
+            <list>
+                <value>InstrumentationType</value>
+                <value>JMXConnectorPolicyType</value>
+            </list>
+        </property>
+    </bean>
+    -->
+</beans>
\ No newline at end of file

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

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

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

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Thu Sep 28 00:56:12 2006
@@ -50,7 +50,7 @@
 public abstract class AbstractHTTPDestination extends HTTPDestinationConfigBean  implements Destination {
     static final Logger LOG = LogUtils.getL7dLogger(AbstractHTTPDestination.class);
     
-    private static final long serialVersionUID = 1L;        
+    private static final long serialVersionUID = 1L;
 
     protected final Bus bus;
     protected final ConduitInitiator conduitInitiator;
@@ -85,6 +85,13 @@
         address.setValue(getAddressValue());
         reference.setAddress(address);
     }
+    
+    @Override
+    public String getBeanName() {
+        return endpointInfo.getName().toString() + ".http-destination";
+    }
+
+
 
     /**
      * @return the reference associated with this Destination

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Thu Sep 28 00:56:12 2006
@@ -115,7 +115,7 @@
              t,
              null,
              null);
-    }
+    }    
 
     /**
      * Constructor, allowing subsititution of
@@ -144,6 +144,11 @@
               ? new URL(getAddress())
               : new URL(t.getAddress().getValue());
         target = getTargetReference(t);
+    }
+    
+    @Override
+    public String getBeanName() {
+        return endpointInfo.getName().toString() + ".http-conduit";
     }
     
     /**

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=450750&r1=450749&r2=450750
==============================================================================
--- 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 Thu Sep 28 00:56:12 2006
@@ -26,6 +26,7 @@
 import javax.annotation.Resource;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
@@ -76,16 +77,27 @@
 
     public Conduit getConduit(EndpointInfo endpointInfo)
         throws IOException {
-        return new HTTPConduit(bus, endpointInfo);
+        return getConduit(endpointInfo, null);
     }
 
     public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target)
         throws IOException {
-        return new HTTPConduit(bus, endpointInfo, target);
+        HTTPConduit conduit = 
+            target == null ? new HTTPConduit(bus, endpointInfo) : new HTTPConduit(bus, endpointInfo, target);
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(conduit);
+        }
+        return conduit;  
     }
 
     public Destination getDestination(EndpointInfo endpointInfo)
         throws IOException {
-        return new JettyHTTPDestination(bus, this, endpointInfo);
+        JettyHTTPDestination destination = new JettyHTTPDestination(bus, this, endpointInfo);
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(destination);
+        }
+        return destination;   
     }
 }

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java Thu Sep 28 00:56:12 2006
@@ -51,8 +51,15 @@
     JettyHTTPServerEngine(Bus bus, String protocol, int p) {
         port = p;
         init();
-    }
+    }    
     
+    @Override
+    public String getBeanName() {
+        return JettyHTTPServerEngine.class.getName() + "." + port;
+    }
+
+
+
     static synchronized JettyHTTPServerEngine getForPort(Bus bus, String protocol, int p) {
         JettyHTTPServerEngine ref = portMap.get(p);
         if (ref == null) {

Added: incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-property-editors.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-property-editors.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-property-editors.xml (added)
+++ incubator/cxf/trunk/rt/transports/http/src/main/resources/META-INF/cxf/cxf-property-editors.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,42 @@
+<?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:im="http://cxf.apache.org/management"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+    <bean id="org.apache.cxf.transports.http.customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list>
+                <bean class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+                    <property name="packageName" value="org.apache.cxf.transports.http.configuration"/>
+                    <property name="propertyClassNames">
+                        <list>
+                            <value>HTTPClientPolicy</value>
+                            <value>HTTPServerPolicy</value>
+                            <value>HTTPListenerPolicy</value>
+                        </list>
+                    </property>
+                </bean>
+           </list>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

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

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

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

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java Thu Sep 28 00:56:12 2006
@@ -41,6 +41,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.ConfigurationProvider;
+import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.io.AbstractCachedOutputStream;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -77,6 +78,11 @@
 
         initConfig();
     } 
+     
+    @Override
+    public String getBeanName() {
+        return endpointInfo.getName().toString() + ".jms-conduit-base";
+    }
 
     // prepare the message for send out , not actually send out the message
     public void send(Message message) throws IOException {        
@@ -189,7 +195,20 @@
     }
 
     private void initConfig() {
-        JMSConduitConfigBean bean = new JMSConduitConfigBean();
+        
+        final class JMSConduitConfiguration extends JMSConduitConfigBean {
+
+            @Override
+            public String getBeanName() {
+                return endpointInfo.getName().toString() + ".jms-conduit";
+            }
+        }
+        JMSConduitConfigBean bean = new JMSConduitConfiguration();
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(bean);
+        }
+        
         if (!bean.isSetClient()) {
             bean.setClient(new JMSClientBehaviorPolicyType());
         }

Modified: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?view=diff&rev=450750&r1=450749&r2=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java Thu Sep 28 00:56:12 2006
@@ -21,12 +21,10 @@
 
 
 import java.io.ByteArrayInputStream;
-
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
@@ -41,13 +39,13 @@
 import javax.jms.JMSException;
 import javax.jms.Queue;
 import javax.jms.QueueSender;
-
 import javax.jms.TextMessage;
 import javax.naming.NamingException;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.ConfigurationProvider;
+import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.io.AbstractCachedOutputStream;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -89,6 +87,11 @@
         reference.setAddress(address);        
     }
     
+    @Override
+    public String getBeanName() {
+        return endpointInfo.getName().toString() + ".jms-destination-base";
+    }
+    
     public EndpointReferenceType getAddress() {       
         return reference;
     }
@@ -259,7 +262,20 @@
     }
     
     private void initConfig() {
-        JMSDestinationConfigBean bean = new JMSDestinationConfigBean();
+        
+        final class JMSDestinationConfiguration extends JMSDestinationConfigBean {
+
+            @Override
+            public String getBeanName() {
+                return endpointInfo.getName().toString() + ".jms-destination";
+            }
+        }
+        JMSDestinationConfigBean bean = new JMSDestinationConfiguration();
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(bean);
+        }
+        
         if (!bean.isSetServer()) {
             bean.setServer(new JMSServerBehaviorPolicyType());
         }

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=450750&r1=450749&r2=450750
==============================================================================
--- 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 Thu Sep 28 00:56:12 2006
@@ -26,6 +26,7 @@
 import javax.annotation.Resource;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
@@ -66,17 +67,27 @@
         }
     }
    
-    public Conduit getConduit(EndpointInfo targetInfo) throws IOException {
-        return new JMSConduit(bus, targetInfo);
+    public Conduit getConduit(EndpointInfo targetInfo) throws IOException {        
+        return getConduit(targetInfo, null);
     }
 
     public Conduit getConduit(EndpointInfo endpointInfo, EndpointReferenceType target) throws IOException {
-        return new JMSConduit(bus, endpointInfo, target);
+        Conduit conduit = 
+            target == null ? new JMSConduit(bus, endpointInfo) : new JMSConduit(bus, endpointInfo, target);
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(conduit);
+        }
+        return conduit;
     }
 
     public Destination getDestination(EndpointInfo endpointInfo) throws IOException {
-        //TODO
-        return new JMSDestination(bus, this, endpointInfo);
+        JMSDestination destination = new JMSDestination(bus, this, endpointInfo);
+        Configurer configurer = bus.getExtension(Configurer.class);
+        if (null != configurer) {
+            configurer.configureBean(destination);
+        }
+        return destination;
     }
    
 }

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-property-editors.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-property-editors.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-property-editors.xml (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/cxf/cxf-property-editors.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,52 @@
+<?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:im="http://cxf.apache.org/management"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+    <bean id="org.apache.cxf.transports.jms.customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list>
+                <bean class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+                    <property name="packageName" value="org.apache.cxf.transports.jms"/>
+                    <property name="propertyClassNames">
+                        <list>
+                            <value>JMSAddressPolicyType</value>
+                            <value>JMSClientBehaviorPolicyType</value>
+                            <value>JMSServerBehaviorPolicyType</value>
+                        </list>
+                    </property>
+                </bean>
+                <bean class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+                    <property name="packageName" value="org.apache.cxf.transports.jms.jms_conf"/>
+                    <property name="propertyClassNames">
+                        <list>
+                            <value>JMSClientConfig</value>
+                            <value>JMSServerConfig</value>
+                            <value>JMSSessionPoolConfigPolicy</value>
+                        </list>
+                    </property>
+                </bean>
+           </list>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

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

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

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

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java Thu Sep 28 00:56:12 2006
@@ -0,0 +1,42 @@
+/**
+ * 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.management;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.cxf.CXFBusFactory;
+import org.apache.cxf.configuration.Configurer;
+
+public class ManagedBusTest extends TestCase {
+
+    public void testManagedBus() {
+        CXFBusFactory factory = new CXFBusFactory();
+        Map<String, Object> properties = new HashMap<String, Object>();
+        properties.put(Configurer.USER_CFG_FILE_PROPERTY_NAME, 
+                       "org/apache/cxf/systest/management/managed.xml");
+        Bus bus = factory.createBus(null, properties);
+        factory.setDefaultBus(bus);
+        // bus.run();
+    }
+}

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

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

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml?view=auto&rev=450750
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml (added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml Thu Sep 28 00:56:12 2006
@@ -0,0 +1,63 @@
+<?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:im="http://cxf.apache.org/management"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+   <!--
+    <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+        <property name="propertyEditorRegistrars">
+            <list merge="true">
+                <ref bean="org.apache.cxf.management.JaxbPropertyEditorRegistrar"/>
+           </list>
+        </property>
+    </bean>
+    
+    <bean id="org.apache.cxf.management.JaxbPropertyEditorRegistrar"
+          class="org.apache.cxf.configuration.spring.JaxbPropertyEditorRegistrar">
+        <property name="packageName" value="org.apache.cxf.management"/>
+        <property name="propertyClassNames">
+            <list>
+                <value>InstrumentationType</value>
+                <value>JMXConnectorPolicyType</value>
+            </list>
+        </property>
+    </bean>
+    -->
+    
+    <bean id="org.apache.cxf.management.InstrumentationManager" abstract="true">    
+        <property name="instrumentation">
+            <value>
+                <im:instrumentation Enabled="true" JMXEnabled="true"/>
+            </value>
+        </property>
+        <property name="JMXConnectorPolicy">
+            <value>
+                <im:JMXConnectorPolicy 
+                    Threaded="true" 
+                    Daemon="false"
+                    JMXServiceURL="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/server"/>
+            </value>
+        </property>
+    </bean> 
+ 
+</beans>
\ No newline at end of file

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

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

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/managed.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message