Author: alessio.soldano(a)jboss.com
Date: 2010-06-30 05:44:32 -0400 (Wed, 30 Jun 2010)
New Revision: 12551
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringConfigurer.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSConfigurer.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringConfigurer.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
Refactoring JBossWSConfigurer and enabling jaxbintros tests
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSConfigurer.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSConfigurer.java 2010-06-29
20:50:53 UTC (rev 12550)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSConfigurer.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * 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.
*
@@ -22,56 +22,16 @@
package org.jboss.wsf.stack.cxf.client.configuration;
import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.extension.BusExtension;
/**
- * A CXF configurer that sets JBossWS stuff / customizations / properties etc. in CXF
configurable beans
+ * Interface for JBossWS additions to CXF configurer
*
* @author alessio.soldano(a)jboss.com
- * @since 05-Oct-2009
+ * @since 30-Jun-2010
*/
-public class JBossWSConfigurer implements Configurer, BusExtension
+public interface JBossWSConfigurer extends Configurer
{
- private BeanCustomizer customizer;
+ public BeanCustomizer getCustomizer();
- public JBossWSConfigurer(BeanCustomizer customizer)
- {
- this.customizer = customizer;
- }
-
- @Override
- public void configureBean(Object beanInstance)
- {
- customConfigure(beanInstance);
- }
-
- @Override
- public void configureBean(String name, Object beanInstance)
- {
- customConfigure(beanInstance);
- }
-
- protected synchronized void customConfigure(Object beanInstance)
- {
- if (customizer != null)
- {
- customizer.customize(beanInstance);
- }
- }
-
- public BeanCustomizer getCustomizer()
- {
- return customizer;
- }
-
- public void setCustomizer(BeanCustomizer customizer)
- {
- this.customizer = customizer;
- }
-
- @Override
- public Class<?> getRegistrationType()
- {
- return Configurer.class;
- }
+ public void setCustomizer(BeanCustomizer customizer);
}
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2010-06-29
20:50:53 UTC (rev 12550)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -46,7 +46,7 @@
}
if (!extensions.containsKey(Configurer.class))
{
- extensions.put(Configurer.class, new JBossWSConfigurer(new BeanCustomizer()));
+ extensions.put(Configurer.class, new JBossWSNonSpringConfigurer(new
BeanCustomizer()));
}
Bus bus = new ExtensionManagerBus(extensions, properties);
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringConfigurer.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringConfigurer.java
(rev 0)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringConfigurer.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.configuration.Configurer;
+import org.apache.cxf.extension.BusExtension;
+
+/**
+ * A CXF configurer that sets JBossWS stuff / customizations / properties etc. in CXF
configurable beans
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Oct-2009
+ */
+public class JBossWSNonSpringConfigurer implements JBossWSConfigurer, BusExtension
+{
+ private BeanCustomizer customizer;
+
+ public JBossWSNonSpringConfigurer(BeanCustomizer customizer)
+ {
+ this.customizer = customizer;
+ }
+
+ @Override
+ public void configureBean(Object beanInstance)
+ {
+ customConfigure(beanInstance);
+ }
+
+ @Override
+ public void configureBean(String name, Object beanInstance)
+ {
+ customConfigure(beanInstance);
+ }
+
+ protected synchronized void customConfigure(Object beanInstance)
+ {
+ if (customizer != null)
+ {
+ customizer.customize(beanInstance);
+ }
+ }
+
+ public BeanCustomizer getCustomizer()
+ {
+ return customizer;
+ }
+
+ public void setCustomizer(BeanCustomizer customizer)
+ {
+ this.customizer = customizer;
+ }
+
+ @Override
+ public Class<?> getRegistrationType()
+ {
+ return Configurer.class;
+ }
+}
Property changes on:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringConfigurer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringConfigurer.java
===================================================================
---
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringConfigurer.java 2010-06-29
20:50:53 UTC (rev 12550)
+++
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringConfigurer.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -29,7 +29,7 @@
* @author alessio.soldano(a)jboss.com
* @since 05-Oct-2009
*/
-public class JBossWSSpringConfigurer extends ConfigurerImpl
+public class JBossWSSpringConfigurer extends ConfigurerImpl implements JBossWSConfigurer
{
private BeanCustomizer customizer;
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java 2010-06-29
20:50:53 UTC (rev 12550)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/NonSpringBusHolder.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -34,7 +34,7 @@
import org.apache.cxf.transport.DestinationFactory;
import org.apache.cxf.transport.servlet.ServletTransportFactory;
import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSNonSpringConfigurer;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSNonSpringBusFactory;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
@@ -123,7 +123,7 @@
ServerBeanCustomizer customizer = new ServerBeanCustomizer();
customizer.setBindingCustomization(customization);
customizer.setWsdlPublisher(wsdlPublisher);
- return new JBossWSConfigurer(customizer);
+ return new JBossWSNonSpringConfigurer(customizer);
}
}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2010-06-29
20:50:53 UTC (rev 12550)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2010-06-30
09:44:32 UTC (rev 12551)
@@ -36,7 +36,7 @@
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.spi.binding.BindingCustomization;
import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringConfigurer;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSConfigurer;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
import org.w3c.dom.Element;
@@ -54,7 +54,7 @@
private String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-cxf-jaxbintros/EndpointService";
private Bus bus;
- private JBossWSSpringConfigurer configurer;
+ private JBossWSConfigurer configurer;
public static Test suite()
{
@@ -130,7 +130,7 @@
}
/**
- * Setup binding customization on client side using the JBossWSCXFConfigurer
+ * Setup binding customization on client side using the JBossWSConfigurer
*
* @throws Exception
*/
@@ -141,7 +141,7 @@
BindingCustomizationFactory.populateBindingCustomization(getResourceURL("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").openStream(),
jaxbCustomizations);
bus = BusFactory.getThreadDefaultBus();
- configurer = (JBossWSSpringConfigurer)bus.getExtension(Configurer.class);
+ configurer = (JBossWSConfigurer)bus.getExtension(Configurer.class);
configurer.getCustomizer().setBindingCustomization(jaxbCustomizations);
}
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-06-29 20:50:53 UTC
(rev 12550)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-06-30 09:44:32 UTC
(rev 12551)
@@ -60,6 +60,3 @@
# on AS 5.x
org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
-# Temporarly exclude jaxbintro stuff (require additional refactoring on
-# # # JBossWSConfigurer)
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-06-29 20:50:53 UTC
(rev 12550)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-06-30 09:44:32 UTC
(rev 12551)
@@ -60,6 +60,3 @@
# on AS 5.x
org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
-# Temporarly exclude jaxbintro stuff (require additional refactoring on
-# # # JBossWSConfigurer)
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-06-29 20:50:53 UTC
(rev 12550)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-06-30 09:44:32 UTC
(rev 12551)
@@ -53,6 +53,3 @@
# [JBWS-3039] Spring 3 classpath scanning fails on AS 6
org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.*
-# Temporarly exclude jaxbintro stuff (require additional refactoring on
-# JBossWSConfigurer)
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-06-29 20:50:53 UTC
(rev 12550)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-06-30 09:44:32 UTC
(rev 12551)
@@ -53,6 +53,3 @@
# [JBWS-3039] Spring 3 classpath scanning fails on AS 6
org/jboss/test/ws/jaxws/cxf/webserviceref/WebServiceRefServletTestCase.*
-# Temporarly exclude jaxbintro stuff (require additional refactoring on
-# # JBossWSConfigurer)
-org/jboss/test/ws/jaxws/cxf/jaxbintros/**