Author: alessio.soldano(a)jboss.com
Date: 2010-05-25 13:14:33 -0400 (Tue, 25 May 2010)
New Revision: 12323
Removed:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/jbossws-cxf.xml
Log:
[JBWS-3033] Modify our configurer to extend the CXF ConfigurerImpl and install it by
default using our integration configuration
Deleted:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java 2010-05-25
16:36:47 UTC (rev 12322)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java 2010-05-25
17:14:33 UTC (rev 12323)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.client.configuration;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.configuration.Configurer;
-
-
-/**
- * A simple bean created through cxf-extension-jbossws.xml in order to
- * install the JBossWS configurer.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 04-May-2010
- */
-public class ConfigurerInstaller
-{
- private Bus bus;
-
- public ConfigurerInstaller()
- {
- //NOOP
- }
-
- public Bus getBus()
- {
- return bus;
- }
-
- public void setBus(Bus bus)
- {
- this.bus = bus;
- updateConfigurer();
- }
-
- protected void updateConfigurer()
- {
- bus.setExtension(new JBossWSCXFConfigurer(bus.getExtension(Configurer.class)),
Configurer.class);
- }
-}
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-25
16:36:47 UTC (rev 12322)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-25
17:14:33 UTC (rev 12323)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.stack.cxf.client.configuration;
-import org.apache.cxf.configuration.Configurer;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
+import org.apache.cxf.configuration.spring.ConfigurerImpl;
import org.apache.cxf.databinding.DataBinding;
import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
@@ -38,23 +38,25 @@
* @author alessio.soldano(a)jboss.com
* @since 05-Oct-2009
*/
-public class JBossWSCXFConfigurer extends DelegatingConfigurer
+public class JBossWSCXFConfigurer extends ConfigurerImpl
{
protected BindingCustomization customization;
- public JBossWSCXFConfigurer(Configurer delegate)
+ @Override
+ public void configureBean(Object beanInstance)
{
- super(delegate);
+ customConfigure(beanInstance);
+ super.configureBean(beanInstance);
}
-
- public JBossWSCXFConfigurer(Configurer delegate, BindingCustomization customization)
+
+ @Override
+ public void configureBean(String name, Object beanInstance)
{
- super(delegate);
- this.customization = customization;
+ customConfigure(beanInstance);
+ super.configureBean(name, beanInstance);
}
- @Override
- protected void internalConfigure(Object beanInstance)
+ protected void customConfigure(Object beanInstance)
{
if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
{
@@ -85,7 +87,7 @@
//customize default databinding (early pulls in ServiceFactory default
databinding and configure it, as it's lazily loaded)
serviceFactory.reset();
DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
- setBindingCustomization(serviceFactoryDataBinding, customization);
+ configureBindingCustomization(serviceFactoryDataBinding, customization);
serviceFactory.setDataBinding(serviceFactoryDataBinding);
//customize user provided databinding (CXF later overrides the ServiceFactory
databinding using the user provided one)
if (factory.getDataBinding() == null)
@@ -95,7 +97,7 @@
}
else
{
- setBindingCustomization(factory.getDataBinding(), customization);
+ configureBindingCustomization(factory.getDataBinding(), customization);
}
}
//add other configurations here below
@@ -115,7 +117,7 @@
ReflectionServiceFactoryBean serviceFactory = factory.getServiceFactory();
serviceFactory.reset();
DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
- setBindingCustomization(serviceFactoryDataBinding, customization);
+ configureBindingCustomization(serviceFactoryDataBinding, customization);
serviceFactory.setDataBinding(serviceFactoryDataBinding);
//customize user provided databinding (CXF later overrides the ServiceFactory
databinding using the user provided one)
if (factory.getDataBinding() == null)
@@ -125,7 +127,7 @@
}
else
{
- setBindingCustomization(factory.getDataBinding(), customization);
+ configureBindingCustomization(factory.getDataBinding(), customization);
}
}
//add other configurations here below
@@ -153,7 +155,7 @@
}
@SuppressWarnings("unchecked")
- protected static void setBindingCustomization(DataBinding db, BindingCustomization
customization)
+ protected static void configureBindingCustomization(DataBinding db,
BindingCustomization customization)
{
//JAXB
if (customization instanceof JAXBBindingCustomization)
Modified:
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml
===================================================================
---
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml 2010-05-25
16:36:47 UTC (rev 12322)
+++
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml 2010-05-25
17:14:33 UTC (rev 12323)
@@ -1,10 +1,6 @@
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
- <bean id="clientConfigurerInstaller"
class="org.jboss.wsf.stack.cxf.client.configuration.ConfigurerInstaller">
- <property name="bus" ref="cxf"/>
- </bean>
-
<!--
<bean id="logInbound"
class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<bean id="logOutbound"
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
Modified: stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/jbossws-cxf.xml 2010-05-25
16:36:47 UTC (rev 12322)
+++
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/jbossws-cxf.xml 2010-05-25
17:14:33 UTC (rev 12323)
@@ -44,9 +44,8 @@
</property>
<property name="bus" ref="cxf"/>
</bean>
- <bean id="org.apache.cxf.configuration.Configurer"
- class="org.apache.cxf.configuration.spring.ConfigurerImpl">
- </bean>
+
+ <bean id="org.apache.cxf.configuration.Configurer"
class="org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer"/>
<bean id="org.apache.cxf.binding.BindingFactoryManager"
class="org.apache.cxf.binding.BindingFactoryManagerImpl">
<property name="mapProvider">