Author: jim.ma
Date: 2014-01-15 05:00:35 -0500 (Wed, 15 Jan 2014)
New Revision: 18239
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/
stack/cxf/trunk/modules/addons/transports/http/undertow/pom.xml
stack/cxf/trunk/modules/addons/transports/http/undertow/src/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/SecurityActions.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestination.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestinationFactory.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngine.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineFactory.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/bus-extensions.txt
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineTest.java
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/resources/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/module.xml
Removed:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-jboss-httpserver-httpspi/
Modified:
stack/cxf/trunk/modules/addons/pom.xml
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/as/webservices/server/integration/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
stack/cxf/trunk/pom.xml
Log:
[JBWS-3702]:Add Undertow HttpDestinationFactory; Replace old httpserver
integration(modules) with new undertow implementation
Modified: stack/cxf/trunk/modules/addons/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/pom.xml 2014-01-15 06:23:18 UTC (rev 18238)
+++ stack/cxf/trunk/modules/addons/pom.xml 2014-01-15 10:00:35 UTC (rev 18239)
@@ -17,6 +17,7 @@
<!-- Modules -->
<modules>
<module>transports/http/httpserver</module>
+ <module>transports/http/undertow</module>
<module>transports/udp</module>
</modules>
Added: stack/cxf/trunk/modules/addons/transports/http/undertow/pom.xml
===================================================================
--- stack/cxf/trunk/modules/addons/transports/http/undertow/pom.xml
(rev 0)
+++ stack/cxf/trunk/modules/addons/transports/http/undertow/pom.xml 2014-01-15 10:00:35
UTC (rev 18239)
@@ -0,0 +1,92 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>JBoss Web Services - Stack CXF Undertow http transport</name>
+ <artifactId>jbossws-cxf-transports-undertow</artifactId>
+ <packaging>jar</packaging>
+
+ <parent>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-addons</artifactId>
+ <version>4.3.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.ws.projects</groupId>
+ <artifactId>jaxws-undertow-httpspi</artifactId>
+ </dependency>
+
+ <!-- CXF dependencies -->
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxws</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ </dependency>
+ <!-- Spring -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-asm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ </dependency>
+
+ <!--
+ useStrictFiltering requires dependency in all included modules
+
http://jira.codehaus.org/browse/MASSEMBLY-317
+ -->
+
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.ws</groupId>
+ <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Property changes on: stack/cxf/trunk/modules/addons/transports/http/undertow/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/SecurityActions.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/SecurityActions.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/SecurityActions.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.addons.transports.undertow;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Feb-2011
+ *
+ */
+class SecurityActions
+{
+ /**
+ * Get context classloader.
+ *
+ * @return the current context classloader
+ */
+ static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
{
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+ /**
+ * Set context classloader.
+ *
+ * @param classLoader the classloader
+ */
+ static void setContextClassLoader(final ClassLoader classLoader)
+ {
+ if (System.getSecurityManager() == null)
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+ else
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ return null;
+ }
+ });
+ }
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/SecurityActions.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestination.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestination.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestination.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.addons.transports.undertow;
+
+import io.undertow.server.HttpServerExchange;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.http.DestinationRegistry;
+import org.apache.cxf.transport.http_jaxws_spi.HttpHandlerImpl;
+import org.apache.cxf.transport.http_jaxws_spi.JAXWSHttpSpiDestination;
+import org.jboss.ws.undertow_httpspi.UndertowHttpExchange;
+
+/**
+ * HTTP destination to be used with the JDK6 httpserver; this extends the
+ * basic JAXWSHttpSpiDestination with all the mechanisms for properly
+ * handling destination and factory life-cycles.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ * @since 19-Aug-2010
+ *
+ */
+public class UndertowServerDestination extends JAXWSHttpSpiDestination
+{
+ static final Logger LOG = LogUtils.getL7dLogger(UndertowServerDestination.class);
+
+ private UndertowServerEngineFactory serverEngineFactory;
+ private UndertowServerEngine engine;
+ private URL url;
+
+ public UndertowServerDestination(Bus b, DestinationRegistry registry, EndpointInfo ei)
throws IOException
+ {
+ super(b, registry, ei);
+ this.serverEngineFactory = getServerEngineFactory();
+ getAddressValue(ei, true); //generate address if not specified
+ this.url = new URL(ei.getAddress());
+ }
+
+ @Override
+ protected Logger getLogger()
+ {
+ return LOG;
+ }
+
+ public void finalizeConfig()
+ {
+ engine = serverEngineFactory.retrieveHttpServerEngine(url.getPort());
+ if (engine == null)
+ {
+ try
+ {
+ engine = serverEngineFactory.createHttpServerEngine(url.getHost(),
url.getPort(), url.getProtocol());
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ if (!url.getProtocol().equals(engine.getProtocol()))
+ {
+ throw new IllegalStateException("Port " + engine.getPort() + " is
configured with wrong protocol \""
+ + engine.getProtocol() + "\" for \"" + url +
"\"");
+ }
+ }
+
+ protected UndertowServerEngineFactory getServerEngineFactory()
+ {
+ UndertowServerEngineFactory serverEngineFactory =
getBus().getExtension(UndertowServerEngineFactory.class);
+ // If it's not there, then create it and register it.
+ // Spring may override it later, but we need it here for default
+ // with no spring configuration.
+ if (serverEngineFactory == null)
+ {
+ serverEngineFactory = new UndertowServerEngineFactory(bus);
+ }
+ return serverEngineFactory;
+ }
+
+ /**
+ * Activate receipt of incoming messages.
+ */
+ protected void activate()
+ {
+ LOG.log(Level.FINE, "Activating receipt of incoming messages");
+ String addr = endpointInfo.getAddress();
+ try
+ {
+ new URL(addr);
+ }
+ catch (Exception e)
+ {
+ throw new Fault(e);
+ }
+ engine.addHandler(addr, new Handler(this,
SecurityActions.getContextClassLoader()));
+ }
+
+ /**
+ * Deactivate receipt of incoming messages.
+ */
+ protected void deactivate()
+ {
+ LOG.log(Level.FINE, "Deactivating receipt of incoming messages");
+ engine.removeHandler(endpointInfo.getAddress());
+ }
+
+ class Handler extends HttpHandlerImpl implements io.undertow.server.HttpHandler
+ {
+
+ private ClassLoader classLoader;
+
+ public Handler(JAXWSHttpSpiDestination destination, ClassLoader classLoader)
+ {
+ super(destination);
+ this.classLoader = classLoader;
+ }
+
+
+ @Override
+ public void handleRequest(HttpServerExchange exchange) throws Exception
+ {
+ ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
+ try
+ {
+ SecurityActions.setContextClassLoader(this.classLoader);
+ this.handle(new UndertowHttpExchange(exchange));
+ }
+ catch (Exception e)
+ {
+ LOG.throwing(Handler.class.getName(), "handle(" +
HttpServerExchange.class.getName() + " ex)", e);
+ if (e instanceof IOException)
+ {
+ throw (IOException) e;
+ }
+ else
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ finally
+ {
+ SecurityActions.setContextClassLoader(origClassLoader);
+ }
+
+ }
+ }
+
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestination.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestinationFactory.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestinationFactory.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestinationFactory.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.addons.transports.undertow;
+
+import java.io.IOException;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.transport.http.AbstractHTTPDestination;
+import org.apache.cxf.transport.http.DestinationRegistry;
+import org.apache.cxf.transport.http.HttpDestinationFactory;
+
+
+/**
+ * Factory for HttpServerDestination
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Apr-2011
+ *
+ */
+@NoJSR250Annotations()
+public class UndertowServerDestinationFactory implements HttpDestinationFactory
+{
+ @Override
+ public AbstractHTTPDestination createDestination(EndpointInfo endpointInfo, Bus bus,
DestinationRegistry registry)
+ throws IOException
+ {
+ return new UndertowServerDestination(bus, registry, endpointInfo);
+ }
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerDestinationFactory.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngine.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngine.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngine.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.addons.transports.undertow;
+
+import java.net.InetSocketAddress;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.jboss.ws.undertow_httpspi.PathUtils;
+import org.jboss.ws.undertow_httpspi.UndertowServer;
+import io.undertow.server.HttpHandler;
+
+/**
+ * A server engine that internally uses the JDK6 httpserver
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ * @since 19-Aug-2010
+ *
+ */
+public class UndertowServerEngine
+{
+ private static final Logger LOG = LogUtils.getL7dLogger(UndertowServerEngine.class);
+ private Bus bus;
+ private UndertowServerEngineFactory factory;
+ private String host;
+ private int port;
+ private int handlerCount;
+ private String protocol = "http";
+ private UndertowServer server;
+
+ public UndertowServerEngine(UndertowServerEngineFactory fac, Bus bus, String host, int
port)
+ {
+ this.bus = bus;
+ this.factory = fac;
+ this.host = host;
+ this.port = port;
+ }
+
+ public synchronized Bus getBus()
+ {
+ return bus;
+ }
+
+ public synchronized String getProtocol()
+ {
+ return protocol;
+ }
+
+ public synchronized int getPort()
+ {
+ return port;
+ }
+
+ public synchronized String getHost()
+ {
+ return host;
+ }
+
+ public synchronized void addHandler(String address, HttpHandler handler)
+ {
+ if (server == null) //start the server on first call
+ {
+ InetSocketAddress isa = host != null ? new InetSocketAddress(host, port) : new
InetSocketAddress(port);
+
+ server = new UndertowServer(isa.getPort(), isa.getHostName());
+ server.getPathHandler().addExactPath(PathUtils.getContextPath(address) +
PathUtils.getPath(address), handler);
+ server.start();
+ }
+ server.getPathHandler().addExactPath(PathUtils.getContextPath(address) +
PathUtils.getPath(address), handler);
+
+ handlerCount++;
+ }
+
+ public synchronized void removeHandler(String address)
+ {
+ server.getPathHandler().removeExactPath(PathUtils.getContextPath(address) +
PathUtils.getPath(address));
+ handlerCount--;
+ }
+
+ /**
+ * This method is called by the ServerEngine Factory to destroy the server
+ */
+ protected synchronized void stop() throws Exception
+ {
+ if (server != null)
+ {
+ server.stop();
+ }
+ }
+
+ /**
+ * This method will shut down the server engine and
+ * remove it from the factory's cache.
+ */
+ public synchronized void shutdown()
+ {
+ if (factory != null && handlerCount == 0)
+ {
+ factory.destroyForPort(port);
+ }
+ else
+ {
+ LOG.log(Level.WARNING, "FAILED_TO_SHUTDOWN_ENGINE_MSG", port);
+ }
+ }
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngine.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineFactory.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineFactory.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineFactory.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.addons.transports.undertow;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.buslifecycle.BusLifeCycleListener;
+import org.apache.cxf.buslifecycle.BusLifeCycleManager;
+import org.apache.cxf.common.logging.LogUtils;
+
+/**
+ * A server engine factory for the undertow engine
+ *
+ * @author Magesh Kumar B <mageshbk(a)jboss.com> (C) 2011 Red Hat Inc.
+ * @author alessio.soldano(a)jboss.com
+ * @since 19-Aug-2010
+ *
+ */
+public class UndertowServerEngineFactory implements BusLifeCycleListener
+{
+ private static final Logger LOG =
LogUtils.getL7dLogger(UndertowServerEngineFactory.class);
+ private static Map<Integer, UndertowServerEngine> portMap = new
HashMap<Integer, UndertowServerEngine>();
+
+ private BusLifeCycleManager lifeCycleManager;
+ private Bus bus;
+
+ public UndertowServerEngineFactory(Bus b)
+ {
+ setBus(b);
+ }
+
+ /**
+ * This call is used to set the bus. It should only be called once.
+ * @param bus
+ */
+ @Resource(name = "cxf")
+ public final void setBus(Bus bus)
+ {
+ assert this.bus == null || this.bus == bus;
+ this.bus = bus;
+ if (bus != null)
+ {
+ bus.setExtension(this, UndertowServerEngineFactory.class);
+ lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
+ if (null != lifeCycleManager)
+ {
+ lifeCycleManager.registerLifeCycleListener(this);
+ }
+ }
+ }
+
+ public Bus getBus()
+ {
+ return bus;
+ }
+
+ /**
+ * Retrieve a previously configured HttpServerEngine for the
+ * given port. If none exists, this call returns null.
+ */
+ public synchronized UndertowServerEngine retrieveHttpServerEngine(int port)
+ {
+ UndertowServerEngine engine = null;
+ synchronized(portMap)
+ {
+ engine = portMap.get(port);
+ }
+ return engine;
+ }
+
+ public synchronized UndertowServerEngine createHttpServerEngine(String host, int port,
String protocol)
+ throws IOException
+ {
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.fine("Creating HttpServer Engine for port " + port +
".");
+ }
+ UndertowServerEngine ref = null;
+ synchronized(portMap)
+ {
+ ref = retrieveHttpServerEngine(port);
+ if (null == ref)
+ {
+ ref = new UndertowServerEngine(this, bus, host, port);
+ portMap.put(port, ref);
+ }
+ // checking the protocol
+ if (!protocol.equals(ref.getProtocol()))
+ {
+ throw new IOException("Protocol mismatch for port " + port +
": " + "engine's protocol is "
+ + ref.getProtocol() + ", the url protocol is " + protocol);
+ }
+ }
+ return ref;
+ }
+
+ /**
+ * This method removes the Server Engine from the port map and stops it.
+ */
+ public synchronized void destroyForPort(int port)
+ {
+ synchronized(portMap)
+ {
+ UndertowServerEngine ref = portMap.remove(port);
+ if (ref != null)
+ {
+ if (LOG.isLoggable(Level.FINE)) {
+ LOG.fine("Stopping HttpServer Engine on port " + port +
".");
+ }
+ try
+ {
+ ref.stop();
+ }
+ catch (Exception e)
+ {
+ LOG.log(Level.WARNING, "", e);
+ }
+ }
+ }
+ }
+
+ public void initComplete()
+ {
+ // do nothing here
+ }
+
+ public synchronized void postShutdown()
+ {
+ // shut down the httpserver in the portMap
+ // To avoid the CurrentModificationException,
+ // do not use portMap.vaules directly
+ UndertowServerEngine[] engines = null;
+ synchronized (portMap) {
+ engines = portMap.values().toArray(new UndertowServerEngine[0]);
+ }
+ for (UndertowServerEngine engine : engines)
+ {
+ if (engine.getBus() == getBus())
+ {
+ engine.shutdown();
+ }
+ }
+ }
+
+ public void preShutdown()
+ {
+ // do nothing here
+ }
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineFactory.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/bus-extensions.txt
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/bus-extensions.txt
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/bus-extensions.txt 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.addons.transports.undertow.UndertowServerDestinationFactory::true
\ No newline at end of file
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/main/resources/META-INF/cxf/bus-extensions.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineTest.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineTest.java
(rev 0)
+++
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineTest.java 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,222 @@
+/*
+ * 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.addons.transports.undertow;
+
+import io.undertow.server.HttpServerExchange;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.spring.ConfigurerImpl;
+import org.easymock.classextension.EasyMock;
+import org.easymock.classextension.IMocksControl;
+import org.jboss.wsf.stack.cxf.addons.transports.undertow.UndertowServerEngine;
+import org.jboss.wsf.stack.cxf.addons.transports.undertow.UndertowServerEngineFactory;
+
+/**
+ * Tests for HttpServerEngine
+ *
+ * @author Magesh Kumar B <mageshbk(a)jboss.com> (C) 2011 Red Hat Inc.
+ * @author alessio.soldano(a)jboss.com
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ * @since 20-Aug-2010
+ *
+ */
+public class UndertowServerEngineTest extends TestCase {
+
+ private static final int THREAD_COUNT = 50;
+ private Bus bus;
+ private IMocksControl control;
+ private UndertowServerEngineFactory factory;
+ private static List<UndertowServerEngine> servers =
Collections.synchronizedList(new ArrayList<UndertowServerEngine>());
+
+
+ public void setUp() throws Exception
+ {
+ control = EasyMock.createNiceControl();
+ bus = control.createMock(Bus.class);
+ Configurer configurer = new ConfigurerImpl();
+ bus.getExtension(Configurer.class);
+ EasyMock.expectLastCall().andReturn(configurer).anyTimes();
+ }
+
+ public void testEngineRetrieval() throws Exception
+ {
+ control.replay();
+ factory = new UndertowServerEngineFactory(bus);
+ UndertowServerEngine engine = factory.createHttpServerEngine("localhost",
9234, "http");
+ assertTrue(engine == factory.retrieveHttpServerEngine(9234));
+ factory.destroyForPort(1234);
+ control.verify();
+ }
+
+ public void testHttpAndHttps() throws Exception
+ {
+ control.replay();
+ factory = new UndertowServerEngineFactory(bus);
+ UndertowServerEngine engine = factory.createHttpServerEngine("localhost",
9234, "http");
+ assertTrue("http".equals(engine.getProtocol()));
+ System.out.println("[JBWS-3079] FIXME: Add support for https protocol");
+ //UndertowServerEngine engine2 =
factory.createHttpServerEngine("localhost", 9235, "https");
+ //assertTrue("https".equals(engine2.getProtocol()));
+ factory.destroyForPort(9234);
+ //factory.destroyForPort(9235);
+
+ control.verify();
+ }
+
+ public void testMultiThreaded()
+ {
+ Thread threads[] = new Thread[THREAD_COUNT];
+ int i = 0;
+ // Initialize the threads
+ for (i = 0; i < THREAD_COUNT; i++)
+ {
+ threads[i] = new Thread(new FactoryInvoker());
+ }
+ // Start the threads
+ for (i = 0; i < THREAD_COUNT; i++)
+ {
+ threads[i].start();
+ }
+ // Wait for all threads to complete
+ while (servers.size() != THREAD_COUNT) {
+ try
+ {
+ Thread.sleep(100);
+ }
+ catch (InterruptedException ie)
+ {
+ // Ignore
+ }
+ }
+
+ UndertowServerEngine sharedEngine = servers.get(0);
+ for (UndertowServerEngine engine : servers)
+ {
+ assertEquals(sharedEngine, engine);
+ }
+ }
+
+ public void testHandler() throws Exception
+ {
+ MyTestHandler handler1 = new MyTestHandler();
+ MyTestHandler handler2 = new MyTestHandler();
+ control.replay();
+ factory = new UndertowServerEngineFactory(bus);
+ String urlStr1 = "http://localhost:9234/hello/test";
+ String urlStr2 = "http://localhost:9234/hello233/test";
+ UndertowServerEngine engine = factory.createHttpServerEngine("localhost",
9234, "http");
+ engine.addHandler(urlStr1, handler1);
+ engine.addHandler(urlStr2, handler2);
+ pingServer(new URL(urlStr1));
+ pingServer(new URL(urlStr2));
+ assertEquals(1, handler1.count.get());
+ assertEquals(1, handler2.count.get());
+ engine.removeHandler(urlStr1);
+ engine.removeHandler(urlStr2);
+ engine.shutdown();
+ factory.destroyForPort(9234);
+
+ control.verify();
+ }
+
+ private void pingServer(URL url)
+ {
+ try
+ {
+ HttpURLConnection connection1 = (HttpURLConnection) url.openConnection();
+ connection1.getInputStream();
+ connection1.disconnect();
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private class MyTestHandler implements io.undertow.server.HttpHandler
+ {
+ AtomicInteger count = new AtomicInteger(0);
+
+ public MyTestHandler()
+ {
+
+ }
+
+
+ @Override
+ public void handleRequest(HttpServerExchange exchange) throws Exception
+ {
+ count.incrementAndGet();
+ exchange.setResponseCode(200);
+ OutputStream os = exchange.getOutputStream();
+ os.write("Hello".getBytes());
+ os.flush();
+
+ }
+ }
+
+ private class FactoryInvoker implements Runnable
+ {
+ private UndertowServerEngineFactory _factory;
+
+ FactoryInvoker()
+ {
+ _factory = new UndertowServerEngineFactory(null);
+ }
+
+ public void run()
+ {
+ UndertowServerEngine engine = null;
+ try
+ {
+ // Delay makes sure the try blocks are initialized before calling
createHttpServerEngine,
+ // enhances the chance to enter the createHttpServerEngine simultaneously.
+ try
+ {
+ Thread.sleep(10);
+ }
+ catch (InterruptedException ie)
+ {
+ // Ignore
+ }
+ engine = _factory.createHttpServerEngine("127.0.0.1", 18001,
"http");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ servers.add(engine);
+ }
+ }
+}
Property changes on:
stack/cxf/trunk/modules/addons/transports/http/undertow/src/test/java/org/jboss/wsf/stack/cxf/addons/transports/undertow/UndertowServerEngineTest.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2014-01-15 06:23:18 UTC (rev 18238)
+++ stack/cxf/trunk/modules/dist/pom.xml 2014-01-15 10:00:35 UTC (rev 18239)
@@ -30,6 +30,12 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-transports-undertow</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-transports-udp</artifactId>
<version>${project.version}</version>
</dependency>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -33,11 +33,14 @@
<include>org.jboss.ws.cxf:jbossws-cxf-factories:jar</include>
<include>org.jboss.ws.cxf:jbossws-cxf-server:jar</include>
<include>org.jboss.ws.cxf:jbossws-cxf-transports-httpserver:jar</include>
+
<include>org.jboss.ws.cxf:jbossws-cxf-transports-undertow:jar</include>
<include>org.jboss.ws.cxf:jbossws-cxf-transports-udp:jar</include>
<include>org.jboss.ws.native:jbossws-native-core:jar</include>
<include>org.jboss.ws.native:jbossws-native-services:jar</include>
<include>org.jboss.ws.projects:jaxws-jboss-httpserver-httpspi:jar</include>
+
<include>org.jboss.ws.projects:jaxws-undertow-httpspi:jar</include>
<include>org.jboss.com.sun.httpserver:httpserver:jar</include>
+ <include>io.undertow:undertow-core:jar</include>
<include>org.apache.cxf:cxf-*</include>
<include>org.apache.cxf.services.sts:cxf-services-sts-core:jar</include>
<include>org.apache.cxf.services.ws-discovery:cxf-services-ws-discovery-api:jar</include>
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/as/webservices/server/integration/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/as/webservices/server/integration/main/module.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/as/webservices/server/integration/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -50,7 +50,7 @@
</exports>
</module>
<module name="org.jboss.ws.cxf.jbossws-cxf-factories"
services="export" export="true"/>
- <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver"
export="true">
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-undertow"
export="true">
<imports>
<include path="META-INF/cxf"/>
<include path="META-INF"/>
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -44,7 +44,7 @@
<module name="org.jboss.ws.cxf.jbossws-cxf-factories"
services="export" />
<!-- Apache CXF APIs only -->
<module name="org.apache.cxf" export="true" />
- <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver"
export="true" services="export" />
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-undertow"
export="true" services="export" />
<module name="org.jboss.ws.cxf.jbossws-cxf-transports-udp"
export="true" services="export" />
<module name="org.jboss.jaxbintros" export="true"/>
</dependencies>
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-server/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -52,7 +52,7 @@
<include path="META-INF"/>
</imports>
</module>
- <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver"
services="import">
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-undertow"
services="import">
<imports>
<include path="META-INF/cxf"/> <!-- required to also pull
in the bus extensions from META-INF -->
<include path="META-INF"/>
Added:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/module.xml
(rev 0)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.1"
name="org.jboss.ws.cxf.jbossws-cxf-transports-undertow">
+
+ <properties>
+ <property name="jboss.api" value="private"/>
+ </properties>
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="org.jboss.ws.spi" />
+ <module name="org.jboss.ws.common" />
+ <module name="javax.annotation.api" />
+ <module name="javax.xml.ws.api" />
+ <module name="org.jboss.ws.jaxws-undertow-httpspi" />
+ <module name="org.apache.cxf.impl" services="import">
+ <imports>
+ <include path="META-INF/cxf"/> <!-- required to also pull
in the bus extensions from META-INF -->
+ <include path="META-INF"/>
+ </imports>
+ </module>
+ <module name="io.undertow.core"/>
+ </dependencies>
+</module>
Property changes on:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main/module.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -49,7 +49,7 @@
<include path="META-INF"/>
</imports>
</module>
- <module name="org.jboss.ws.cxf.jbossws-cxf-transports-httpserver"
services="import">
+ <module name="org.jboss.ws.cxf.jbossws-cxf-transports-undertow"
services="import">
<imports>
<include path="META-INF/cxf"/> <!-- required to also pull
in the bus extensions from META-INF -->
<include path="META-INF"/>
Added:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/module.xml
(rev 0)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/module.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2010, Red Hat, Inc., 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.1"
name="org.jboss.ws.jaxws-undertow-httpspi">
+
+ <properties>
+ <property name="jboss.api" value="private"/>
+ </properties>
+
+ <resources>
+ <!-- Insert resources here -->
+ </resources>
+
+ <dependencies>
+ <module name="javax.xml.ws.api" />
+ <module name="io.undertow.core"/>
+ </dependencies>
+</module>
Property changes on:
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-undertow-httpspi/main/module.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2014-01-15
10:00:35 UTC (rev 18239)
@@ -40,9 +40,9 @@
<include name="**/jbossws-cxf-client.jar"/>
</fileset>
</copy>
- <copy
todir="@{targetdir}/org/jboss/ws/jaxws-jboss-httpserver-httpspi/main"
flatten="false" overwrite="true">
+ <copy todir="@{targetdir}/org/jboss/ws/jaxws-undertow-httpspi/main"
flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/jaxws-jboss-httpserver-httpspi.jar"/>
+ <include name="**/jaxws-undertow-httpspi.jar"/>
</fileset>
</copy>
<copy todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-server/main"
flatten="false" overwrite="true">
@@ -55,9 +55,9 @@
<include name="**/jbossws-cxf-factories.jar"/>
</fileset>
</copy>
- <copy
todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-transports-httpserver/main"
flatten="false" overwrite="true">
+ <copy
todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-transports-undertow/main"
flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
- <include name="**/jbossws-cxf-transports-httpserver.jar"/>
+ <include name="**/jbossws-cxf-transports-undertow.jar"/>
</fileset>
</copy>
<copy
todir="@{targetdir}/org/jboss/ws/cxf/jbossws-cxf-transports-udp/main"
flatten="false" overwrite="true">
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf 2014-01-15
06:23:18 UTC (rev 18238)
+++
stack/cxf/trunk/modules/resources/src/main/resources/resources/modules-deploy.conf 2014-01-15
10:00:35 UTC (rev 18239)
@@ -1 +1 @@
-org/apache/cxf/**, org/apache/neethi/**, org/apache/ws/commons/xmlschema/**,
org/jboss/ws/cxf/**, org/jboss/ws/api/**, org/jboss/ws/common/**,
org/jboss/ws/jaxws-client/**, org/jboss/ws/jaxws-jboss-httpserver-httpspi/**,
org/jboss/ws/saaj-impl/**, org/jboss/ws/spi/**, org/jboss/ws/tools/**, org/opensaml/**,
org/springframework/spring/**, org/jboss/ws/native/**
\ No newline at end of file
+org/apache/cxf/**, org/apache/neethi/**, org/apache/ws/commons/xmlschema/**,
org/jboss/ws/cxf/**, org/jboss/ws/api/**, org/jboss/ws/common/**,
org/jboss/ws/jaxws-client/**, org/jboss/ws/jaxws-jboss-httpserver-httpspi/**,
org/jboss/ws/jaxws-undertow-httpspi/**,org/jboss/ws/saaj-impl/**, org/jboss/ws/spi/**,
org/jboss/ws/tools/**, org/opensaml/**, org/springframework/spring/**,
org/jboss/ws/native/**
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-01-15 06:23:18 UTC (rev 18238)
+++ stack/cxf/trunk/pom.xml 2014-01-15 10:00:35 UTC (rev 18239)
@@ -79,7 +79,9 @@
<picketbox.version>4.0.17.Final</picketbox.version>
<picketlink.version>2.1.7.Final</picketlink.version>
<jaxws-jboss-httpserver-httpspi.version>1.0.1.GA</jaxws-jboss-httpserver-httpspi.version>
+
<jaxws-undertow-httpspi.version>1.0.0-SNAPSHOT</jaxws-undertow-httpspi.version>
<httpserver.version>1.0.0.Final</httpserver.version>
+ <io.undertow.version>1.0.0.Beta30</io.undertow.version>
<jaxb.api.version>1.0.4.Final</jaxb.api.version>
<jaxb.impl.version>2.2.5</jaxb.impl.version>
<jaxrpc.api.version>1.0.1.Final</jaxrpc.api.version>
@@ -152,6 +154,11 @@
<artifactId>jaxws-jboss-httpserver-httpspi</artifactId>
<version>${jaxws-jboss-httpserver-httpspi.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.ws.projects</groupId>
+ <artifactId>jaxws-undertow-httpspi</artifactId>
+ <version>${jaxws-undertow-httpspi.version}</version>
+ </dependency>
<!-- CXF dependencies -->
<dependency>
@@ -946,6 +953,17 @@
<version>${httpserver.version}</version>
</dependency>
<dependency>
+ <groupId>io.undertow</groupId>
+ <artifactId>undertow-core</artifactId>
+ <version>${io.undertow.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>io.undertow</groupId>
+ <artifactId>undertow-build-config</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>${opensaml.version}</version>