cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r500649 [1/3] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/ api/src/main/java/org/apache/cxf/configuration/ api/src/main/java/org/apache/cxf/extension/ api/src/main/java/org/apache/cxf/service/model/ common/common/ common/com...
Date Sat, 27 Jan 2007 22:40:21 GMT
Author: dandiep
Date: Sat Jan 27 14:40:15 2007
New Revision: 500649

URL: http://svn.apache.org/viewvc?view=rev&rev=500649
Log:
o Refactored the Buses so that we now have
  - ExtensionManagerBus: This bus does not have any dependencies on Spring. It 
    will still find components dynamically, but has more limited configuration 
    as Spring isn't needed.
  - CXFBusImpl: This is a simple bean Bus that anyone can use (Spring, 
    developers, etc). It doesn't have any pre built in extension or
    configuration mechanisms, its up to the container to provide it.
o The working assumption in the above is that if people need Configuration, 
  they need Spring anyway, so they should use the SpringBus. Now we have a
  non-Spring option which makes Spring an optional dependency.
o Made it so bindings & transports didn't have to register themselves with
  their respective managers (it wasn't working anyway as not all of them did
  it). Instead, use a "DeferredMap" which can load the extensions non-
  invasively.
o Removed redundant cxf.bus.cxf package
o Refactored configuration per the discussion on the cxf-dev list.
  ConfigurationProviders aren't needed any more so the cxf-tools-xjc-cfg 
  modules were removed.
o Removed caching of bindings in SoapBindingFactory as it will leak memory.

Also, I started on Spring 2.0 configuration schemas for JAX-WS. This has
highlighted that we need a way to reuse schemas in WSDL and in Spring which
doesn't force people to use our own JaxbApplicationContext class. Spring 2.0
provides a mechanism to do this via NamespaceHandlers and 
BeanDefinitionParsers. However, these don't operate directly on the beans, 
but instead on the BeanDefinitions. I've committed a small example to the jaxws
module for interested parties. This will definitely change in the future 
though. I'll try to write up a better summary for the dev list soon...


Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurable.java
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurable.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java
      - copied, changed from r498611, incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurer.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusFactory.java
      - copied, changed from r498611, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java
      - copied, changed from r499171, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/
      - copied from r498611, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/Extension.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionException.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionException.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionFragmentParser.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionFragmentParser.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManager.java
      - copied, changed from r498611, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/extension/ExtensionManager.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
      - copied, changed from r500610, 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/configuration/
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java   (with props)
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/CXFBusImplTest.java
      - copied, changed from r498611, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/CXFBusImplTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/
      - copied from r498611, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/ExtensionFragmentParserTest.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/ExtensionFragmentParserTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/ExtensionManagerTest.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/ExtensionTest.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/ExtensionTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java
      - copied, changed from r500610, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/MyService.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/extension1.xml
      - copied unchanged from r500610, incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/extension/extension1.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/README.txt
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/README.txt
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/
      - copied from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/Address.java
      - copied unchanged from r500610, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/Address.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/Foo.java
      - copied unchanged from r500610, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/Foo.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/ObjectFactory.java
      - copied unchanged from r500610, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/ObjectFactory.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/Point.java
      - copied unchanged from r500610, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/Point.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/foo/package-info.java
      - copied unchanged from r500610, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/package-info.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
      - copied, changed from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorTest.java
      - copied, changed from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/JaxbPropertyEditorTest.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-jaxb-property-types.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf-property-editors.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/cxf.xml
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/cxf.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/test-beans.xml
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/test-beans.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/configuration/spring/test-jaxb-beans.xml
      - copied unchanged from r498611, incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/test-jaxb-beans.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointBean.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointBeanDefinitionParser.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/NamespaceHandler.java   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/spring.handlers   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/META-INF/spring.schemas   (with props)
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/resources/org/apache/cxf/jaxws/spring/jaxws.xsd   (with props)
Removed:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/extension/
    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/Configurable.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/ConfigurationProvider.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurer.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/test/java/org/apache/cxf/configuration/README.txt
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/foo/
    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/JaxbPropertyEditorTest.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/common/common/src/test/java/org/apache/cxf/configuration/spring/test-beans.xml
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/configuration/spring/test-jaxb-beans.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/extension/
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/cxf/
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ServiceModelHttpConfigurationProvider.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/ServiceModelHttpConfigurationProvider.java
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ServiceModelJMSConfigurationProvider.java
    incubator/cxf/trunk/tools/xjc/cfg/
    incubator/cxf/trunk/tools/xjc/cfg-test/
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
    incubator/cxf/trunk/common/common/pom.xml
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java
    incubator/cxf/trunk/metacode/pom.xml
    incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
    incubator/cxf/trunk/rt/bindings/http/src/main/resources/META-INF/cxf/cxf-extension-http-binding.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.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/cxf/cxf-extension-xml.xml
    incubator/cxf/trunk/rt/core/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBusFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/resources/bus-overwrite.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ConfiguredEndpointTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/servlet/spring.xml
    incubator/cxf/trunk/rt/management/pom.xml
    incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
    incubator/cxf/trunk/rt/management/src/main/resources/schemas/configuration/instrumentation.xsd
    incubator/cxf/trunk/rt/transports/http/pom.xml
    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/JettyHTTPServerEngine.java
    incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-conduit.xsd
    incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-destination.xsd
    incubator/cxf/trunk/rt/transports/http/src/main/resources/schemas/configuration/http-listener.xsd
    incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
    incubator/cxf/trunk/rt/transports/http/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java
    incubator/cxf/trunk/rt/transports/http2/pom.xml
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPServerEngine.java
    incubator/cxf/trunk/rt/transports/http2/src/main/resources/schemas/configuration/http-conduit.xsd
    incubator/cxf/trunk/rt/transports/http2/src/main/resources/schemas/configuration/http-destination.xsd
    incubator/cxf/trunk/rt/transports/http2/src/main/resources/schemas/configuration/http-listener.xsd
    incubator/cxf/trunk/rt/transports/http2/src/test/java/org/apache/cxf/transport/http/HTTPConduitTest.java
    incubator/cxf/trunk/rt/transports/http2/src/test/java/org/apache/cxf/transport/http/JettyHTTPDestinationTest.java
    incubator/cxf/trunk/rt/transports/jms/pom.xml
    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/JMSTransportBase.java
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-conduit.xsd
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-destination.xsd
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd
    incubator/cxf/trunk/rt/ws/rm/pom.xml
    incubator/cxf/trunk/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
    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/basicDOCBare/Server.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/management/ManagedBusTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/wsa_interceptors.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/decoupled.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/decoupled_bare.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/rminterceptors.xml
    incubator/cxf/trunk/tools/xjc/pom.xml

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/Bus.java Sat Jan 27 14:40:15 2007
@@ -38,5 +38,4 @@
     void shutdown(boolean wait);
     
     void run();
-
 }

Copied: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java (from r498611, incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurer.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java?view=diff&rev=500649&p1=incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurer.java&r1=498611&p2=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/configuration/Configurer.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/Configurer.java Sat Jan 27 14:40:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.configuration;
 
+
 public interface Configurer {
     
     String DEFAULT_USER_CFG_FILE = "cxf.xml";
@@ -28,4 +29,5 @@
     String USER_CFG_FILE_PROPERTY_URL = "cxf.config.file.url";
 
     void configureBean(Object beanInstance);
+
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java Sat Jan 27 14:40:15 2007
@@ -99,5 +99,23 @@
     public AtomicReference<Object[]> getExtensors() {
         return extensors;
     }
-
+    
+    /**
+     * Lookup a configuration value. This may be found in the properties holder supplied
+     * (i.e. an EndpointInfo or ServiceInfo), or it may be a property on the Bus itself.
+     * If no value is found, the defaultValue is returned.
+     * 
+     * @param <T>
+     * @param props
+     * @param defaultValue
+     * @param type
+     * @return
+     */
+    public <T> T getTraversedExtensor(T defaultValue, Class<T> type) {
+        T extensor = getExtensor(type);
+        if (extensor == null) {
+            return defaultValue;
+        }
+        return extensor;
+    }
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java Sat Jan 27 14:40:15 2007
@@ -66,4 +66,25 @@
     public void setAddress(String a) {
         address = a;
     }
+    
+    @Override
+    public <T> T getTraversedExtensor(T defaultValue, Class<T> type) {
+        T value = getExtensor(type);
+        
+        if (value == null) {
+            if (value == null && binding != null) {
+                value = binding.getExtensor(type);
+            }
+            
+            if (service != null && value == null) {
+                value = service.getExtensor(type);
+            }
+            
+            if (value == null) {
+                value = defaultValue;
+            }
+        }
+        
+        return value;
+    }
 }

Modified: incubator/cxf/trunk/common/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/pom.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/common/common/pom.xml (original)
+++ incubator/cxf/trunk/common/common/pom.xml Sat Jan 27 14:40:15 2007
@@ -118,12 +118,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>jaxme</groupId>
-            <artifactId>jaxme2</artifactId>
-            <scope>test</scope>
-        </dependency>
-
     </dependencies>
    
     <!-- will remove this after it is got sync to central repository -->

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/test/DummyBus.java Sat Jan 27 14:40:15 2007
@@ -21,10 +21,12 @@
 
 
 import java.util.ResourceBundle;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
+import org.apache.cxf.service.model.AbstractPropertiesHolder;
 
 public class DummyBus extends AbstractBasicInterceptorProvider implements Bus {    
     // for initialise behaviours
@@ -81,6 +83,12 @@
     
     //    @Override
     public String getId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public <T> T getConfiguration(AbstractPropertiesHolder props, T defaultValue, Class<T> type) {
         // TODO Auto-generated method stub
         return null;
     }

Modified: incubator/cxf/trunk/metacode/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/metacode/pom.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/metacode/pom.xml (original)
+++ incubator/cxf/trunk/metacode/pom.xml Sat Jan 27 14:40:15 2007
@@ -149,11 +149,6 @@
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.cxf</groupId>
-                        <artifactId>cxf-tools-xjc-cfg</artifactId>
-                        <version>${project.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.apache.cxf</groupId>
                         <artifactId>cxf-tools-xjc-dv</artifactId>
                         <version>${project.version}</version>
                     </dependency>

Modified: incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java Sat Jan 27 14:40:15 2007
@@ -20,13 +20,10 @@
 
 import java.util.Collection;
 
-import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
-import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.http.interceptor.ContentTypeOutInterceptor;
 import org.apache.cxf.binding.http.interceptor.DatabindingInSetupInterceptor;
 import org.apache.cxf.binding.http.interceptor.DatabindingOutSetupInterceptor;
@@ -41,30 +38,15 @@
 public class HttpBindingFactory extends AbstractBindingFactory {
 
     public static final String HTTP_BINDING_ID = "http://apache.org/cxf/binding/http";
-    private Bus bus;
     private Collection<String> activationNamespaces;    
-       
-    @Resource
-    public void setBus(Bus b) {
-        bus = b;
-    }
     
     @Resource
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }
-
-    @PostConstruct
-    void register() {
-        if (null == bus) {
-            return;
-        }
-        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
-        if (null != bfm) {
-            for (String ns : activationNamespaces) {
-                bfm.registerBindingFactory(ns, this);
-            }
-        }
+    
+    public Collection<String> getActivationNamespaces() {
+        return activationNamespaces;
     }
 
     public Binding createBinding(BindingInfo bi) {

Modified: incubator/cxf/trunk/rt/bindings/http/src/main/resources/META-INF/cxf/cxf-extension-http-binding.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/main/resources/META-INF/cxf/cxf-extension-http-binding.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/main/resources/META-INF/cxf/cxf-extension-http-binding.xml (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/main/resources/META-INF/cxf/cxf-extension-http-binding.xml Sat Jan 27 14:40:15 2007
@@ -25,7 +25,6 @@
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
     
     <bean class="org.apache.cxf.binding.http.HttpBindingFactory" lazy-init="true">
-        <property name="bus" ref="cxf"/>
         <property name="activationNamespaces">
             <set>
                 <value>http://apache.org/cxf/binding/http</value>

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=500649&r1=500648&r2=500649
==============================================================================
--- 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 Sat Jan 27 14:40:15 2007
@@ -21,12 +21,9 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
-import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.wsdl.extensions.ExtensibilityElement;
 import javax.wsdl.extensions.mime.MIMEContent;
@@ -34,10 +31,8 @@
 import javax.wsdl.extensions.mime.MIMEPart;
 import javax.xml.namespace.QName;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
-import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor;
 import org.apache.cxf.binding.soap.interceptor.RPCInInterceptor;
 import org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor;
@@ -78,42 +73,20 @@
 
 public class SoapBindingFactory extends AbstractBindingFactory {
 
-    private Map cachedBinding = new HashMap<BindingInfo, Binding>();
-
     private boolean mtomEnabled = true;
     
-    private Bus bus;
     private Collection<String> activationNamespaces;    
-       
-    @Resource
-    public void setBus(Bus b) {
-        bus = b;
+
+    public Collection<String> getActivationNamespaces() {
+        return activationNamespaces;
     }
-    
+
     @Resource
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }
 
-    @PostConstruct
-    void register() {
-        if (null == bus) {
-            return;
-        }
-        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
-        if (null != bfm) {
-            for (String ns : activationNamespaces) {
-                bfm.registerBindingFactory(ns, this);
-            }
-        }
-    }
-
     public Binding createBinding(BindingInfo binding) {
-
-        if (cachedBinding.get(binding) != null) {
-            return (Binding) cachedBinding.get(binding);
-        }
-
         // TODO what about the mix style/use?
 
         // The default style should be doc-lit wrapped.

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/bus-extensions.xml Sat Jan 27 14:40:15 2007
@@ -19,7 +19,8 @@
 -->
 <extensions xmlns="http://cxf.apache.org/bus/extension">
 
-    <extension class="org.apache.cxf.binding.soap.SoapBindingFactory" deferred="true">
+    <extension class="org.apache.cxf.binding.soap.SoapBindingFactory" 
+      interface="org.apache.cxf.binding.BindingFactory" deferred="true">
         <namespace>http://schemas.xmlsoap.org/soap/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap/</namespace>
         <namespace>http://schemas.xmlsoap.org/wsdl/soap/http</namespace>

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/cxf/cxf-extension-soap.xml Sat Jan 27 14:40:15 2007
@@ -25,10 +25,6 @@
 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="cxf"/>
-        <property name="mtomEnabled">
-            <value>false</value>
-        </property>
         <property name="activationNamespaces">
             <set>
                 <value>http://schemas.xmlsoap.org/soap/</value>

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java Sat Jan 27 14:40:15 2007
@@ -66,7 +66,6 @@
     
     private BindingFactoryManager getBindingFactoryManager(String ns, Bus bus) throws BusException {
         SoapBindingFactory bindingFactory = new SoapBindingFactory();
-        bindingFactory.setBus(bus);
         BindingFactoryManager bfm = new BindingFactoryManagerImpl();
         bfm.registerBindingFactory(ns, bindingFactory);
         return bfm;

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=500649&r1=500648&r2=500649
==============================================================================
--- 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 Sat Jan 27 14:40:15 2007
@@ -22,13 +22,10 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 
-import org.apache.cxf.Bus;
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
-import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.binding.xml.interceptor.XMLFaultInInterceptor;
 import org.apache.cxf.binding.xml.interceptor.XMLFaultOutInterceptor;
 import org.apache.cxf.binding.xml.interceptor.XMLMessageInInterceptor;
@@ -42,30 +39,15 @@
 
     private Map cachedBinding = new HashMap<BindingInfo, Binding>();
 
-    private Bus bus;
     private Collection<String> activationNamespaces;
-    
-    @Resource
-    public void setBus(Bus b) {
-        bus = b;
-    }
-    
+
     @Resource
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }
-    
-    @PostConstruct
-    void register() {
-        if (null == bus) {
-            return;
-        }
-        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
-        if (null != bfm) {
-            for (String ns : activationNamespaces) {
-                bfm.registerBindingFactory(ns, this);
-            }
-        }
+
+    public Collection<String> getActivationNamespaces() {
+        return activationNamespaces;
     }
 
     public Binding createBinding(BindingInfo binding) {

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension-xml.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension-xml.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension-xml.xml (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/cxf/cxf-extension-xml.xml Sat Jan 27 14:40:15 2007
@@ -24,7 +24,6 @@
 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="cxf"/>
         <property name="activationNamespaces">
             <set>
                 <value>http://cxf.apache.org/bindings/xformat</value>

Modified: incubator/cxf/trunk/rt/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/pom.xml?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/pom.xml (original)
+++ incubator/cxf/trunk/rt/core/pom.xml Sat Jan 27 14:40:15 2007
@@ -42,6 +42,12 @@
             <artifactId>cxf-api</artifactId>
             <version>${project.version}</version>
         </dependency>
+        
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        
         <dependency>
             <groupId>org.apache.ws.commons</groupId>
             <artifactId>XmlSchema</artifactId>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java Sat Jan 27 14:40:15 2007
@@ -20,7 +20,6 @@
 package org.apache.cxf.binding;
 
 import java.util.Map;
-import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -31,27 +30,27 @@
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.extension.ExtensionManager;
 
 public final class BindingFactoryManagerImpl implements BindingFactoryManager {
     
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(BindingFactoryManagerImpl.class);
     
-    final Map<String, BindingFactory> bindingFactories;
-    Properties factoryNamespaceMappings;
-       
-    ExtensionManager extensionManager;
+    final Map<String, BindingFactory> bindingFactories; 
     Bus bus;
      
     public BindingFactoryManagerImpl() throws BusException {
         bindingFactories = new ConcurrentHashMap<String, BindingFactory>();
     }
     
-    @Resource
-    public void setExtensionManager(ExtensionManager em) {
-        extensionManager = em;
+    public BindingFactoryManagerImpl(Map<String, BindingFactory> bindingFactories) {
+        super();
+        if (!(bindingFactories instanceof ConcurrentHashMap)) {
+            bindingFactories = new ConcurrentHashMap<String, BindingFactory>(bindingFactories);
+        }
+        this.bindingFactories = bindingFactories;
     }
-    
+
+
     @Resource
     public void setBus(Bus b) {
         bus = b;
@@ -64,27 +63,6 @@
         }
     }
     
-    BindingFactory loadBindingFactory(String className, String ...namespaceURIs) throws BusException {
-        BindingFactory factory = null;
-        try {
-            Class<? extends BindingFactory> clazz = 
-                Class.forName(className).asSubclass(BindingFactory.class);
-
-            factory = clazz.newInstance();
-
-            for (String namespace : namespaceURIs) {
-                registerBindingFactory(namespace, factory);
-            }
-        } catch (ClassNotFoundException cnfe) {
-            throw new BusException(cnfe);
-        } catch (InstantiationException ie) {
-            throw new BusException(ie);
-        } catch (IllegalAccessException iae) {
-            throw new BusException(iae);
-        }
-        return factory;
-    }
-    
     public void registerBindingFactory(String name,
                                        BindingFactory factory) {
         bindingFactories.put(name, factory);
@@ -96,10 +74,6 @@
     
     public BindingFactory getBindingFactory(String namespace) throws BusException {
         BindingFactory factory = bindingFactories.get(namespace);
-        if (null == factory) { 
-            extensionManager.activateViaNS(namespace);            
-            factory = bindingFactories.get(namespace);
-        }
         if (null == factory) {
             throw new BusException(new Message("NO_BINDING_FACTORY_EXC", BUNDLE, namespace));
         }

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusFactory.java (from r498611, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusFactory.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusFactory.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusFactory.java&r1=498611&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusFactory.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusFactory.java Sat Jan 27 14:40:15 2007
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf;
+package org.apache.cxf.bus;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.extension.ExtensionManagerBus;
 
 public class CXFBusFactory implements BusFactory {
     
@@ -31,7 +32,7 @@
 
     public synchronized Bus getDefaultBus() {
         if (null == defaultBus) {
-            defaultBus = new CXFBusImpl();
+            defaultBus = new ExtensionManagerBus();
         }
         return defaultBus;
     }
@@ -49,7 +50,7 @@
     }
     
     public Bus createBus(Map<Class, Object> e, Map<String, Object> properties) {
-        return new CXFBusImpl(e, properties);
+        return new ExtensionManagerBus(e, properties);
     }
     
 }

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java (from r499171, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusImpl.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusImpl.java&r1=499171&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/CXFBusImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/CXFBusImpl.java Sat Jan 27 14:40:15 2007
@@ -17,93 +17,51 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf;
-
+package org.apache.cxf.bus;
 
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.bus.BusState;
-import org.apache.cxf.bus.cxf.extension.ExtensionManagerImpl;
 import org.apache.cxf.buslifecycle.BusLifeCycleManager;
-import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.configuration.spring.ConfigurerImpl;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
-import org.apache.cxf.resource.DefaultResourceManager;
-import org.apache.cxf.resource.PropertiesResolver;
-import org.apache.cxf.resource.ResourceManager;
-import org.apache.cxf.resource.ResourceResolver;
-import org.apache.cxf.resource.SinglePropertyResolver;
 
 public class CXFBusImpl extends AbstractBasicInterceptorProvider implements Bus {
     
-    public static final String BUS_PROPERTY_NAME = "bus";
-    private static final String BUS_ID_PROPERTY_NAME = "org.apache.cxf.bus.id";
-    private static final String DEFAULT_BUS_ID = "cxf";
-    
-    private static final String BUS_EXTENSION_RESOURCE = "META-INF/bus-extensions.xml";
-
     private Map<Class, Object> extensions;
     private BusLifeCycleManager lifeCycleManager;
     private String id;
-    private BusState state;
+    private BusState state;      
     
-    protected CXFBusImpl() {
-        this(new HashMap<Class, Object>());
+    public CXFBusImpl() {
+        this(null);
     }
 
-    protected CXFBusImpl(Map<Class, Object> e) {
-        this(e, new HashMap<String, Object>());
-    }
-    
-    protected CXFBusImpl(Map<Class, Object> e, Map<String, Object> properties) {
-        
-        extensions = e;
-        if (null == extensions) {
+    public CXFBusImpl(Map<Class, Object> extensions) {
+        if (extensions == null) {
             extensions = new HashMap<Class, Object>();
         }
-        if (null == properties) {
-            properties = new HashMap<String, Object>();
-        }
-        
-        Configurer configurer = (Configurer)extensions.get(Configurer.class);
-        if (null == configurer) {
-            String cfgFile = (String)properties.get(Configurer.USER_CFG_FILE_PROPERTY_NAME);
-            configurer = new ConfigurerImpl(cfgFile);
-            extensions.put(Configurer.class, configurer);
-        }
- 
-        id = getBusId(properties);
-        
-        ResourceManager resourceManager = new DefaultResourceManager();
-        
-        properties.put(BUS_ID_PROPERTY_NAME, BUS_PROPERTY_NAME);
-        properties.put(BUS_PROPERTY_NAME, this);
-        
-        ResourceResolver propertiesResolver = new PropertiesResolver(properties);
-        resourceManager.addResourceResolver(propertiesResolver);
-        
-        ResourceResolver busResolver = new SinglePropertyResolver(BUS_PROPERTY_NAME, this);
-        resourceManager.addResourceResolver(busResolver);
-        
-        extensions.put(ResourceManager.class, resourceManager);
-
-        new ExtensionManagerImpl(BUS_EXTENSION_RESOURCE, 
-                                 Thread.currentThread().getContextClassLoader(),
-                                 extensions,
-                                 resourceManager);
+        this.extensions = extensions;
         
         state = BusState.INITIAL;
-        
         lifeCycleManager = this.getExtension(BusLifeCycleManager.class);
         if (null != lifeCycleManager) {
             lifeCycleManager.initComplete();
         }
+    }
 
+    protected void setState(BusState state) {
+        this.state = state;
+    }
+    
+    public void setExtensions(Map<Class, Object> e) {
+        extensions = e;
+    }
+    
+    public void setId(String i) {
+        id = i;
     }
 
-      
     public final <T> T getExtension(Class<T> extensionType) {
         Object obj = extensions.get(extensionType);
         if (null != obj) {
@@ -111,11 +69,11 @@
         }
         return null;
     }
-
+    
     public <T> void setExtension(T extension, Class<T> extensionType) {
         extensions.put(extensionType, extension);
     }
-
+     
     public String getId() {
         return id;
     }
@@ -155,27 +113,5 @@
     
     protected BusState getState() {
         return state;
-    }
-    
-    private String getBusId(Map<String, Object> properties) {
-
-        String busId = null;
-
-        // first check properties
-        if (null != properties) {
-            busId = (String)properties.get(BUS_ID_PROPERTY_NAME);
-            if (null != busId && !"".equals(busId)) {
-                return busId;
-            }
-        }
-
-        // next check system properties
-        busId = System.getProperty(BUS_ID_PROPERTY_NAME);
-        if (null != busId && !"".equals(busId)) {
-            return busId;
-        }
-
-        // otherwise use default
-        return DEFAULT_BUS_ID;
     }
 }

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java Sat Jan 27 14:40:15 2007
@@ -0,0 +1,52 @@
+/**
+ * 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.extension;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+public class DeferredMap<V> extends ConcurrentHashMap<String, V> {
+
+    ExtensionManager em;
+    Class<V> type;
+
+    public DeferredMap(ExtensionManagerImpl em, Class<V> type) {
+        this.em = em;
+        
+        this.type = type;
+    }
+
+    @Override
+    public V get(Object key) {
+        // TODO Auto-generated method stub
+        V v = super.get(key);
+
+        if (v == null) {
+            String k = (String)key;
+            em.activateViaNS(k);
+
+            v = em.getExtension(k, type);
+            if (v != null) {
+                put(k, v);
+            }
+        }
+
+        return v;
+    }
+}

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

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/DeferredMap.java
------------------------------------------------------------------------------
    svn:executable = *

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

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java (from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/Extension.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/Extension.java&r1=500610&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/Extension.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/Extension.java Sat Jan 27 14:40:15 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf.extension;
+package org.apache.cxf.bus.extension;
 
 import java.util.ArrayList;
 import java.util.Collection;

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionException.java (from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionException.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionException.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionException.java&r1=500610&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionException.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionException.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionException.java Sat Jan 27 14:40:15 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf.extension;
+package org.apache.cxf.bus.extension;
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.i18n.UncheckedException;

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionFragmentParser.java (from r500610, incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionFragmentParser.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionFragmentParser.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionFragmentParser.java&r1=500610&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionFragmentParser.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionFragmentParser.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionFragmentParser.java Sat Jan 27 14:40:15 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf.extension;
+package org.apache.cxf.bus.extension;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManager.java (from r498611, incubator/cxf/trunk/api/src/main/java/org/apache/cxf/extension/ExtensionManager.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManager.java?view=diff&rev=500649&p1=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/extension/ExtensionManager.java&r1=498611&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManager.java&r2=500649
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/extension/ExtensionManager.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManager.java Sat Jan 27 14:40:15 2007
@@ -17,9 +17,11 @@
  * under the License.
  */
 
-package org.apache.cxf.extension;
+package org.apache.cxf.bus.extension;
 
 public interface ExtensionManager {
     
     void activateViaNS(String namespace);
+    
+    <T> T getExtension(String ns, Class<T> type);
 }

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java Sat Jan 27 14:40:15 2007
@@ -0,0 +1,151 @@
+/**
+ * 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.extension;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.cxf.binding.BindingFactory;
+import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.binding.BindingFactoryManagerImpl;
+import org.apache.cxf.bus.BusState;
+import org.apache.cxf.bus.CXFBusImpl;
+import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.NullConfigurer;
+import org.apache.cxf.resource.DefaultResourceManager;
+import org.apache.cxf.resource.PropertiesResolver;
+import org.apache.cxf.resource.ResourceManager;
+import org.apache.cxf.resource.ResourceResolver;
+import org.apache.cxf.resource.SinglePropertyResolver;
+import org.apache.cxf.transport.ConduitInitiator;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.transport.ConduitInitiatorManagerImpl;
+import org.apache.cxf.transport.DestinationFactory;
+import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.transport.DestinationFactoryManagerImpl;
+
+/**
+ * This bus uses CXF's built in extension manager to load components
+ * (as opposed to using the Spring bus implementation). While this is faster
+ * to load it doesn't allow extensive configuration and customization like
+ * the Spring bus does.
+ */
+public class ExtensionManagerBus extends CXFBusImpl {
+    
+    public static final String BUS_PROPERTY_NAME = "bus";
+    private static final String BUS_ID_PROPERTY_NAME = "org.apache.cxf.bus.id";
+    private static final String DEFAULT_BUS_ID = "cxf";
+    
+    private static final String BUS_EXTENSION_RESOURCE = "META-INF/bus-extensions.xml";
+
+    public ExtensionManagerBus(Map<Class, Object> e, Map<String, Object> properties) {
+        super();
+        
+        if (null == e) {
+            e = new HashMap<Class, Object>();
+        }
+
+        if (null == properties) {
+            properties = new HashMap<String, Object>();
+        }
+        
+        setExtensions(e);
+        
+        Configurer configurer = (Configurer)e.get(Configurer.class);
+        if (null == configurer) {
+            configurer = new NullConfigurer();
+            e.put(Configurer.class, configurer);
+        }
+ 
+        setId(getBusId(properties));
+        
+        ResourceManager resourceManager = new DefaultResourceManager();
+        
+        properties.put(BUS_ID_PROPERTY_NAME, BUS_PROPERTY_NAME);
+        properties.put(BUS_PROPERTY_NAME, this);
+        
+        ResourceResolver propertiesResolver = new PropertiesResolver(properties);
+        resourceManager.addResourceResolver(propertiesResolver);
+        
+        ResourceResolver busResolver = new SinglePropertyResolver(BUS_PROPERTY_NAME, this);
+        resourceManager.addResourceResolver(busResolver);
+        
+        e.put(ResourceManager.class, resourceManager);
+
+        ExtensionManagerImpl em = new ExtensionManagerImpl(BUS_EXTENSION_RESOURCE, 
+                                 Thread.currentThread().getContextClassLoader(),
+                                 e,
+                                 resourceManager);
+        
+        setState(BusState.INITIAL);
+        
+        BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class);
+        if (null != lifeCycleManager) {
+            lifeCycleManager.initComplete();
+            
+        }
+
+        DestinationFactoryManager dfm = this.getExtension(DestinationFactoryManager.class);
+        if (null == dfm) {
+            dfm = new DestinationFactoryManagerImpl(new DeferredMap<DestinationFactory>(em, 
+                DestinationFactory.class));
+            e.put(DestinationFactoryManager.class, dfm);
+        }
+
+        ConduitInitiatorManager cfm = this.getExtension(ConduitInitiatorManager.class);
+        if (null == cfm) {
+            cfm = new ConduitInitiatorManagerImpl(new DeferredMap<ConduitInitiator>(em, 
+                ConduitInitiator.class));
+            e.put(ConduitInitiatorManager.class, cfm);
+        }
+        
+        BindingFactoryManager bfm = this.getExtension(BindingFactoryManager.class);
+        if (null == bfm) {
+            bfm = new BindingFactoryManagerImpl(new DeferredMap<BindingFactory>(em, BindingFactory.class));
+            e.put(BindingFactoryManager.class, bfm);
+        }
+    }
+
+    public ExtensionManagerBus() {
+        this(null, null);
+    }
+    
+    private String getBusId(Map<String, Object> properties) {
+
+        String busId = null;
+
+        // first check properties
+        if (null != properties) {
+            busId = (String)properties.get(BUS_ID_PROPERTY_NAME);
+            if (null != busId && !"".equals(busId)) {
+                return busId;
+            }
+        }
+
+        // next check system properties
+        busId = System.getProperty(BUS_ID_PROPERTY_NAME);
+        if (null != busId && !"".equals(busId)) {
+            return busId;
+        }
+
+        // otherwise use default
+        return DEFAULT_BUS_ID;
+    }
+}

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

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
------------------------------------------------------------------------------
    svn:executable = *

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

Copied: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java (from r500610, 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/extension/ExtensionManagerImpl.java?view=diff&rev=500649&p1=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/extension/ExtensionManagerImpl.java&r1=500610&p2=incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java&r2=500649
==============================================================================
--- 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/extension/ExtensionManagerImpl.java Sat Jan 27 14:40:15 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.bus.cxf.extension;
+package org.apache.cxf.bus.extension;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -31,7 +31,6 @@
 
 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;
 import org.apache.cxf.resource.SinglePropertyResolver;
@@ -41,13 +40,20 @@
 
     public static final String EXTENSIONMANAGER_PROPERTY_NAME = "extensionManager";
     public static final String ACTIVATION_NAMESPACES_PROPERTY_NAME = "activationNamespaces";
+    public static final String BUS_EXTENSION_RESOURCE = "META-INF/bus-extensions.xml";
     
     private final ClassLoader loader;
     private ResourceManager resourceManager;
     private Map<String, Collection<Extension>> deferred;
     private final Map<Class, Object> activated;
+    private final Map<String, Collection<Object>> namespaced = 
+        new HashMap<String, Collection<Object>>();
 
-
+    public ExtensionManagerImpl(ClassLoader cl, Map<Class, Object> initialExtensions, 
+                                ResourceManager rm) {
+        this(BUS_EXTENSION_RESOURCE, cl, initialExtensions, rm);
+    }
+    
     public ExtensionManagerImpl(String resource, ClassLoader cl, Map<Class, Object> initialExtensions, 
         ResourceManager rm) {
 
@@ -68,7 +74,7 @@
         }
     }
 
-    public void activateViaNS(String namespaceURI) {
+    public synchronized void activateViaNS(String namespaceURI) {
         Collection<Extension> extensions = deferred.get(namespaceURI);
         if (null == extensions) {
             return;
@@ -133,8 +139,6 @@
             configurer.configureBean(obj);
         }
         
-        
-        
         // let the object know for which namespaces it has been activated
         ResourceResolver namespacesResolver = null;
         if (null != e.getNamespaces()) {            
@@ -155,7 +159,30 @@
         
         if (null != activated && null != e.getInterfaceName()) {
             activated.put(cls, obj);
+            
+            for (String ns : e.getNamespaces()) {
+                Collection<Object> intf2Obj = namespaced.get(ns);
+                if (intf2Obj == null) {
+                    intf2Obj = new ArrayList<Object>();
+                    namespaced.put(ns, intf2Obj);
+                }
+                intf2Obj.add(obj);
+            }
         }
     }
+
+    public <T> T getExtension(String ns, Class<T> type) {
+        Collection<Object> nsExts = namespaced.get(ns);
+        if (nsExts != null) {
+            for (Object o : nsExts) {
+                if (type.isAssignableFrom(o.getClass())) {
+                    return type.cast(o);
+                }
+            }
+        }
+        return null;
+    }
+    
+    
 
 }

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=500649&r1=500648&r2=500649
==============================================================================
--- 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 Sat Jan 27 14:40:15 2007
@@ -35,18 +35,16 @@
     
     private static final String DEFAULT_BUS_ID = "cxf";
     
-    private static final Logger LOG = LogUtils.getL7dLogger(SpringBusImpl.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(SpringBusFactory.class);
     
     private static Bus defaultBus;
 
     private ApplicationContext context;
 
     public SpringBusFactory() {
-        super();
     }
 
     public SpringBusFactory(ApplicationContext context) {
-        super();
         this.context = context;
     }
     

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java Sat Jan 27 14:40:15 2007
@@ -0,0 +1,26 @@
+/**
+ * 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.configuration;
+
+public class NullConfigurer implements Configurer {
+
+    public void configureBean(Object beanInstance) {
+    }
+
+}

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

Propchange: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/NullConfigurer.java
------------------------------------------------------------------------------
    svn:executable = *

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

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java Sat Jan 27 14:40:15 2007
@@ -0,0 +1,132 @@
+/**
+ * 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.configuration.spring;
+
+import java.lang.reflect.Method;
+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.Configurable;
+import org.apache.cxf.configuration.Configurer;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
+import org.springframework.beans.factory.wiring.BeanWiringInfo;
+import org.springframework.beans.factory.wiring.BeanWiringInfoResolver;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+
+public class ConfigurerImpl extends BeanConfigurerSupport implements Configurer {
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(ConfigurerImpl.class);
+    private static final String DEFAULT_USER_CFG_FILE = "cxf.xml";
+
+    private ApplicationContext appContext;
+    
+    public ConfigurerImpl() {
+        this(DEFAULT_USER_CFG_FILE);
+    }
+    
+    public ConfigurerImpl(String cfgFile) {
+        if (null == cfgFile) {
+            cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
+        }
+        if (null == cfgFile) {
+            cfgFile = DEFAULT_USER_CFG_FILE;
+        }
+        ClassPathResource cpr = new ClassPathResource(cfgFile);
+        if (cpr.exists()) {
+            try {
+                ApplicationContext ac = new JaxbClassPathXmlApplicationContext(cfgFile);
+                setApplicationContext(ac);
+            } catch (BeansException ex) {
+                LogUtils.log(LOG, Level.WARNING, "APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
+            }
+        } else {
+            LOG.log(Level.INFO, new Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
+        }
+    }
+    
+    public ConfigurerImpl(ApplicationContext ac) {
+        setApplicationContext(ac);
+    }
+    
+    public void configureBean(Object beanInstance) {
+
+        if (null == appContext) {
+            return;
+        }
+        
+        final String beanName = getBeanName(beanInstance);
+        
+        if (null == beanName) {
+            return;
+        }
+        
+        setBeanWiringInfoResolver(new BeanWiringInfoResolver() {
+            public BeanWiringInfo resolveWiringInfo(Object instance) {
+                if (null != beanName && !"".equals(beanName)) {
+                    return new BeanWiringInfo(beanName);
+                }
+                return null;
+            }
+        });
+        
+        try {
+            super.configureBean(beanInstance);
+            LOG.fine("Successfully performed injection.");
+        } catch (NoSuchBeanDefinitionException ex) {
+            // 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
+            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());
+    }
+}

Added: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java (added)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/JaxbClassPathXmlApplicationContext.java Sat Jan 27 14:40:15 2007
@@ -0,0 +1,117 @@
+/**
+ * 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.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.ApplicationContext;
+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 {
+    
+    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[] locations) throws BeansException {
+        this(locations, null);
+    }
+    
+    public JaxbClassPathXmlApplicationContext(String[] locations, ApplicationContext parent) 
+        throws BeansException {
+        super(locations, parent);
+        cfgFileLocations = locations;
+    }
+    
+    @Override
+    protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
+        reader.setDocumentReaderClass(JaxbBeanDefinitionDocumentReader.class);
+        // TODO: check why VALIDATION_XSD complains about mixed content in
+        // value elements - this should be legal according to the xsd
+        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/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/ConduitInitiatorManagerImpl.java Sat Jan 27 14:40:15 2007
@@ -31,7 +31,6 @@
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.extension.ExtensionManager;
 
 public final class ConduitInitiatorManagerImpl implements ConduitInitiatorManager {
 
@@ -40,9 +39,6 @@
     final Map<String, ConduitInitiator> conduitInitiators;
     
     private Bus bus;
-    
-    private ExtensionManager extensionManager;
-
     public ConduitInitiatorManagerImpl() {
         conduitInitiators = new ConcurrentHashMap<String, ConduitInitiator>();
     }
@@ -52,12 +48,6 @@
     }
     
     @Resource
-    public void setExtensionManager(ExtensionManager em) {
-        extensionManager = em;
-    }
-    
-    
-    @Resource
     public void setBus(Bus b) {
         bus = b;
     }
@@ -102,12 +92,6 @@
      */
     public ConduitInitiator getConduitInitiator(String namespace) throws BusException {
         ConduitInitiator factory = conduitInitiators.get(namespace);
-        
-        if (null == factory && extensionManager != null) { 
-            extensionManager.activateViaNS(namespace);            
-            factory = conduitInitiators.get(namespace);
-        }
-        
         if (null == factory) {
             throw new BusException(new Message("NO_CONDUIT_INITIATOR", BUNDLE, namespace));
         }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java?view=diff&rev=500649&r1=500648&r2=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/DestinationFactoryManagerImpl.java Sat Jan 27 14:40:15 2007
@@ -32,7 +32,6 @@
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.extension.ExtensionManager;
 
 public final class DestinationFactoryManagerImpl implements DestinationFactoryManager {
 
@@ -40,7 +39,6 @@
 
     final Map<String, DestinationFactory> destinationFactories;
     Properties factoryNamespaceMappings;
-    private ExtensionManager extensionManager; 
 
     private Bus bus;
 
@@ -52,13 +50,6 @@
         this.destinationFactories = destinationFactories;
     }
 
-  
-
-    @Resource
-    public void setExtensionManager(ExtensionManager em) {
-        extensionManager = em;
-    }
-    
     @Resource
     public void setBus(Bus b) {
         bus = b;
@@ -106,11 +97,6 @@
      */
     public DestinationFactory getDestinationFactory(String namespace) throws BusException {
         DestinationFactory factory = destinationFactories.get(namespace);
-        if (null == factory && extensionManager != null) {
-            extensionManager.activateViaNS(namespace);            
-            factory = destinationFactories.get(namespace);
-        }
-        
         if (null == factory) {
             throw new BusException(new Message("NO_DEST_FACTORY", BUNDLE, namespace));
         }

Added: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml?view=auto&rev=500649
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml (added)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/bus-extensions.xml Sat Jan 27 14:40:15 2007
@@ -0,0 +1,39 @@
+<?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.
+-->
+<extensions xmlns="http://cxf.apache.org/bus/extension">
+
+<!--    <extension class="org.apache.cxf.binding.BindingFactoryManagerImpl"-->
+<!--           interface="org.apache.cxf.binding.BindingFactoryManager"/>-->
+<!--    <extension class="org.apache.cxf.transport.DestinationFactoryManagerImpl"-->
+<!--           interface="org.apache.cxf.transport.DestinationFactoryManager"/>-->
+<!--    <extension class="org.apache.cxf.transport.ConduitInitiatorManagerImpl"-->
+<!--           interface="org.apache.cxf.transport.ConduitInitiatorManager"/>-->
+    <extension class="org.apache.cxf.wsdl11.WSDLManagerImpl"
+           interface="org.apache.cxf.wsdl.WSDLManager"/>
+    <extension class="org.apache.cxf.phase.PhaseManagerImpl"
+           interface="org.apache.cxf.phase.PhaseManager"/>
+    <extension class="org.apache.cxf.workqueue.WorkQueueManagerImpl"
+       	   interface="org.apache.cxf.workqueue.WorkQueueManager"/>
+    <extension class="org.apache.cxf.buslifecycle.CXFBusLifeCycleManager"
+       	   interface="org.apache.cxf.buslifecycle.BusLifeCycleManager"/>   	   
+    <extension class="org.apache.cxf.endpoint.ServerRegistryImpl"
+       	   interface="org.apache.cxf.endpoint.ServerRegistry"/>
+           
+</extensions>
\ No newline at end of file



Mime
View raw message