cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6481] Reverting the direct parsing of engine simple elements
Date Thu, 09 Jul 2015 10:29:44 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5a1dd7723 -> 4c4ef0dd2


[CXF-6481] Reverting the direct parsing of engine simple elements


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4c4ef0dd
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4c4ef0dd
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4c4ef0dd

Branch: refs/heads/master
Commit: 4c4ef0dd26fb038ab4c2be504639575af4922531
Parents: 5a1dd77
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Jul 9 11:29:17 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Jul 9 11:29:17 2015 +0100

----------------------------------------------------------------------
 distribution/src/main/release/samples/pom.xml   |  1 +
 .../JettyHTTPServerEngineFactoryHolder.java     | 30 ++++----------------
 .../JettyServerEngineFactoryParser.java         | 23 +--------------
 3 files changed, 8 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4c4ef0dd/distribution/src/main/release/samples/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index 8b5b413..d626f07 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -53,6 +53,7 @@
         <module>jax_rs/websocket</module>
         <module>jax_rs/search</module>
         <module>jax_rs/description_swagger</module>
+        <module>jax_rs/description_swagger2</module>
         <module>jax_rs/big_query</module>
         <module>callback</module>
         <module>wsdl_first_pure_xml</module>

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c4ef0dd/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
index 4b49d83..fdf40d3 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
@@ -63,9 +63,6 @@ public class JettyHTTPServerEngineFactoryHolder {
     
     private Map<String, List<Handler>> handlersMap;
     
-    private Map<String, Boolean> sessionSupportMap;
-    private Map<String, Boolean> reuseAddressMap;
-
     private JAXBContext jaxbContext;
     private Set<Class<?>> jaxbClasses;
 
@@ -137,18 +134,6 @@ public class JettyHTTPServerEngineFactoryHolder {
                             + engine.getPort().toString());
                     }
                 }
-                if (sessionSupportMap != null) {
-                    Boolean sessionSupport = sessionSupportMap.get(engine.getPort().toString());
-                    if (sessionSupport != null) {
-                        eng.setSessionSupport(sessionSupport);
-                    }    
-                }
-                if (reuseAddressMap != null) {
-                    Boolean reuseAddress = reuseAddressMap.get(engine.getPort().toString());
-                    if (reuseAddress != null) {
-                        eng.setReuseAddress(reuseAddress);
-                    }    
-                }
                 
                 if (engine.isContinuationsEnabled() != null) {
                     eng.setContinuationsEnabled(engine.isContinuationsEnabled());
@@ -163,7 +148,12 @@ public class JettyHTTPServerEngineFactoryHolder {
                 if (engine.getPort() != null) {
                     eng.setPort(engine.getPort());
                 }
-                
+                if (engine.isReuseAddress() != null) {
+                    eng.setReuseAddress(engine.isReuseAddress());
+                }
+                if (engine.isSessionSupport() != null) {
+                    eng.setSessionSupport(engine.isSessionSupport());
+                }
                 if (engine.getThreadingParameters() != null) {
                     ThreadingParametersType threads = engine.getThreadingParameters();
                     ThreadingParameters rThreads = new ThreadingParameters();
@@ -216,14 +206,6 @@ public class JettyHTTPServerEngineFactoryHolder {
         this.connectorMap = connectorMap;
     }
     
-    public void setSessionSupportMap(Map<String, Boolean> sessionMap) {
-        this.sessionSupportMap = sessionMap;
-    }
-    
-    public void setReuseAddressMap(Map<String, Boolean> reuseMap) {
-        this.reuseAddressMap = reuseMap;
-    }
-    
     public void setHandlersMap(Map<String, List<Handler>> handlersMap) {
         this.handlersMap = handlersMap;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c4ef0dd/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
index 5af9f77..fe4eac6 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
@@ -85,8 +85,6 @@ public class JettyServerEngineFactoryParser extends AbstractBPBeanDefinitionPars
                 .getChildrenWithName(element, HTTPJettyTransportNamespaceHandler.JETTY_TRANSPORT,
"engine");
             ef.addProperty("connectorMap", parseEngineConnector(engines, ef, context));
             ef.addProperty("handlersMap", parseEngineHandlers(engines, ef, context));
-            ef.addProperty("sessionSupportMap", parseEngineBooleanProperty(engines, ef, context,
"sessionSupport"));
-            ef.addProperty("reuseAddressMap", parseEngineBooleanProperty(engines, ef, context,
"reuseAddress"));
             return ef;
         } catch (Exception e) {
             throw new RuntimeException("Could not process configuration.", e);
@@ -129,24 +127,5 @@ public class JettyServerEngineFactoryParser extends AbstractBPBeanDefinitionPars
         return new MapMetadataImpl("java.lang.String", "java.util.List", entries);
     }
     
-    protected Metadata parseEngineBooleanProperty(List<Element> engines, 
-                                                  ComponentMetadata enclosingComponent,
-                                                  ParserContext context,
-                                                  String propertyName) {
-        List<MapEntry> entries = new ArrayList<MapEntry>();
-        for (Element engine : engines) {
-            String port = engine.getAttribute("port");
-            ValueMetadata keyValue = createValue(context, port);
-            Element simpleElement = DOMUtils
-                .getFirstChildWithName(engine, HTTPJettyTransportNamespaceHandler.JETTY_TRANSPORT,
-                                       propertyName);
-            if (simpleElement != null) {
-                String text = DOMUtils.getContent(simpleElement);
-                ValueMetadata valValue = createValue(context, text);
-                entries.add(new MapEntryImpl(keyValue, valValue));
-            }
-        }
-
-        return new MapMetadataImpl("java.lang.String", "java.lang.Boolean", entries);
-    }
+    
 }


Mime
View raw message