cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/4] git commit: Squashed commit of the following: This closes #17
Date Tue, 12 Aug 2014 17:01:33 GMT
Squashed commit of the following:
This closes #17

commit d45ac9a6f2853dc6e125be524c1527b3b02924e8
Merge: 4b2ae04 bb1edc5
Author: Alexander Zobkov <alexander.zobkov@gmail.com>
Date:   Sun Aug 10 09:58:40 2014 +0400

    Syncing with upstream repository and resolving conflicts around threadname prefix feature

commit 4b2ae049adee7c068fe22f63ebd2dd44eeaae92d
Author: Alexander Zobkov <alexander.zobkov@gmail.com>
Date:   Wed Jul 30 20:22:23 2014 +0400

    Allow to configure the thread name prefix for threads that are used by the Jetty instance
for processing requests

Conflicts:
	rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
	rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml


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

Branch: refs/heads/2.7.x-fixes
Commit: 6aa40ba2ed50f60b5406710408defeb5ca09ab1c
Parents: 8fda71d
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Aug 12 12:16:51 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Aug 12 12:46:31 2014 -0400

----------------------------------------------------------------------
 .../http_jetty/JettyHTTPServerEngine.java       | 33 +++-----
 .../JettyHTTPServerEngineFactory.java           |  3 +-
 .../http_jetty/ThreadingParameters.java         | 16 ++++
 .../JettyHTTPServerEngineFactoryHolder.java     |  1 +
 .../osgi/HTTPJettyTransportActivator.java       |  2 +
 ...ttyHTTPServerEngineBeanDefinitionParser.java |  3 +
 .../spring/JettySpringTypesFactory.java         |  1 +
 .../schemas/configuration/http-jetty.xsd        |  5 ++
 .../http_jetty/JettyHTTPServerEngineTest.java   | 61 ++++++++++++++-
 .../spring/ApplicationContextTest.java          |  6 +-
 .../transport/http_jetty/spring/bean.properties |  1 +
 .../transport/http_jetty/spring/beans-props.xml | 80 +++++++++-----------
 .../cxf/transport/http_jetty/spring/beans.xml   | 79 +++++++++----------
 13 files changed, 179 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
index 3f824ec..fbc450e 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
@@ -491,28 +491,17 @@ public class JettyHTTPServerEngine
                                             getThreadingParameters().getMaxThreads(),
                                             acc));
             }
-            if (pool instanceof QueuedThreadPool) {
-                QueuedThreadPool pl = (QueuedThreadPool)pool;
-                if (getThreadingParameters().isSetMinThreads()) {
-                    pl.setMinThreads(getThreadingParameters().getMinThreads());
-                }
-                if (getThreadingParameters().isSetMaxThreads()) {
-                    pl.setMaxThreads(getThreadingParameters().getMaxThreads());
-                }
-            } else {
-                try {
-                    if (getThreadingParameters().isSetMinThreads()) {
-                        pool.getClass().getMethod("setMinThreads", Integer.TYPE)
-                            .invoke(pool, getThreadingParameters().getMinThreads());
-                    }
-                    if (getThreadingParameters().isSetMaxThreads()) {
-                        pool.getClass().getMethod("setMaxThreads", Integer.TYPE)
-                            .invoke(pool, getThreadingParameters().getMaxThreads());
-                    }
-                } catch (Throwable t) {
-                    //ignore - this won't happen for Jetty 7.1 - 7.2 and 7.3 and newer 
-                    //will be instanceof QueuedThreadPool above
-                }
+            if (!(pool instanceof QueuedThreadPool)) {
+                throw new Fault(new Message("NOT_A_QUEUED_THREAD_POOL", LOG, pool.getClass()));
+            }
+            if (getThreadingParameters().isThreadNamePrefixSet()) {
+                ((QueuedThreadPool) pool).setName(getThreadingParameters().getThreadNamePrefix());
+            }
+            if (getThreadingParameters().isSetMinThreads()) {
+                ((QueuedThreadPool) pool).setMinThreads(getThreadingParameters().getMinThreads());
+            }
+            if (getThreadingParameters().isSetMaxThreads()) {
+                ((QueuedThreadPool) pool).setMaxThreads(getThreadingParameters().getMaxThreads());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
index 85b128e..23bfafb 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
@@ -278,9 +278,10 @@ public class JettyHTTPServerEngineFactory {
             if (LOG.isLoggable(Level.INFO)) {
                 final int min = fallbackThreadingParameters.getMinThreads();
                 final int max = fallbackThreadingParameters.getMaxThreads();
+                final String threadNamePrefix = fallbackThreadingParameters.getThreadNamePrefix();
                 LOG.log(Level.INFO,
                         "FALLBACK_THREADING_PARAMETERS_MSG",
-                        new Object[] {port, min, max});
+                        new Object[] {port, min, max, threadNamePrefix});
             }
             ref.setThreadingParameters(fallbackThreadingParameters);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java
index 511874b..7c3ca51 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ThreadingParameters.java
@@ -26,8 +26,10 @@ public class ThreadingParameters {
 
     private int minThreads;
     private int maxThreads;
+    private String threadNamePrefix;
     private boolean minThreadsSet;
     private boolean maxThreadsSet;
+    private boolean threadNamePrefixSet;
     
     public void setMinThreads(int number) {
         minThreadsSet = true;
@@ -38,6 +40,15 @@ public class ThreadingParameters {
         maxThreadsSet = true;
         maxThreads = number;
     }
+
+    public String getThreadNamePrefix() {
+        return threadNamePrefix;
+    }
+
+    public void setThreadNamePrefix(String threadNamePrefix) {
+        threadNamePrefixSet = true;
+        this.threadNamePrefix = threadNamePrefix;
+    }
     
     public int getMinThreads() {
         return minThreads;
@@ -54,4 +65,9 @@ public class ThreadingParameters {
     public boolean isSetMinThreads() {
         return minThreadsSet;
     }
+
+    public boolean isThreadNamePrefixSet() {
+        return threadNamePrefixSet;
+    }
+    
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/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 a4dd160..ace5b41 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
@@ -93,6 +93,7 @@ public class JettyHTTPServerEngineFactoryHolder {
                     String id = threads.getId();
                     rThreads.setMaxThreads(threads.getThreadingParameters().getMaxThreads());
                     rThreads.setMinThreads(threads.getThreadingParameters().getMinThreads());
+                    rThreads.setThreadNamePrefix(threads.getThreadingParameters().getThreadNamePrefix());
                     threadingParametersMap.put(id, rThreads);
                 }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
index 80af419..5da1d2a 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/osgi/HTTPJettyTransportActivator.java
@@ -161,6 +161,8 @@ public class HTTPJettyTransportActivator
                     p.setMinThreads(Integer.parseInt(v));
                 } else if ("maxThreads".equals(k)) {
                     p.setMaxThreads(Integer.parseInt(v));
+                } else if ("threadNamePrefix".equals(k)) {
+                    p.setThreadNamePrefix(k);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
index 97f66e3..a17e5bb 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
@@ -226,6 +226,9 @@ public class JettyHTTPServerEngineBeanDefinitionParser extends AbstractBeanDefin
         if (paramtype.getMinThreads() != null) {
             params.setMinThreads(paramtype.getMinThreads());
         }
+        if (paramtype.getThreadNamePrefix() != null) {
+            params.setThreadNamePrefix(paramtype.getThreadNamePrefix());
+        }
         return params;
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
index 9cb1478..2a1fda6 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
@@ -62,6 +62,7 @@ public final class JettySpringTypesFactory {
         ThreadingParameters params = new ThreadingParameters();
         params.setMaxThreads(paramtype.getMaxThreads());
         params.setMinThreads(paramtype.getMinThreads());
+        params.setThreadNamePrefix(paramtype.getThreadNamePrefix());
         return params;
     }
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
b/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
index ce1e5c5..f444bdc 100644
--- a/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
+++ b/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
@@ -52,6 +52,11 @@
              <xs:documentation>Specifies the maximum number of threads available to
the Jetty instance for processing requests.</xs:documentation>
           </xs:annotation>
        </xs:attribute>
+       <xs:attribute name="threadNamePrefix" type="xs:string">
+       <xs:annotation>
+             <xs:documentation>Specifies the thread name prefix for threads that are
used by the Jetty instance for processing requests.</xs:documentation>
+          </xs:annotation>
+       </xs:attribute>
     </xs:complexType>
     
     <xs:complexType name="ThreadingParametersIdentifiedType">

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
index bcf6735..5dda188 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
@@ -29,6 +29,7 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import javax.management.ObjectName;
@@ -49,7 +50,8 @@ import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.handler.ContextHandler;
 import org.eclipse.jetty.server.nio.SelectChannelConnector;
 import org.eclipse.jetty.server.ssl.SslSocketConnector;
-
+import org.eclipse.jetty.util.thread.QueuedThreadPool;
+import org.eclipse.jetty.util.thread.ThreadPool;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -89,7 +91,64 @@ public class JettyHTTPServerEngineTest extends Assert {
         factory.setBus(bus);
 
     }
+    
+    /**
+     * Check that names of threads serving requests for instances of JettyHTTPServerEngine

+     * can be set with user specified name.
+     */
+    @Test
+    public void testSettingThreadNames() throws Exception {
+        // User specific thread name prefix 1
+        String threadNamePrefix1 = "TestPrefix";
+        JettyHTTPServerEngine engine = factory.createJettyHTTPServerEngine(PORT1, "http");
+        ThreadingParameters parameters = new ThreadingParameters();
+        parameters.setThreadNamePrefix(threadNamePrefix1);
+        engine.setThreadingParameters(parameters);
+        engine.finalizeConfig();
+        JettyHTTPTestHandler handler = new JettyHTTPTestHandler("string1", true);
+        engine.addServant(new URL("https://localhost:" + PORT1 + "/test"), handler);
+        assertTrue("No threads whose name is started with " + threadNamePrefix1, 
+                checkForExistenceOfThreads(threadNamePrefix1));
+        
+        // Default thread name prefix
+        engine = factory.createJettyHTTPServerEngine(PORT3, "http");
+        engine.finalizeConfig();
+        handler = new JettyHTTPTestHandler("string3", true);
+        engine.addServant(new URL("https://localhost:" + PORT3 + "/test"), handler);
+        ThreadPool threadPool = engine.getServer().getThreadPool();
+        QueuedThreadPool qtp = (QueuedThreadPool)threadPool;
+        String prefixDefault = qtp.getName();
+        assertTrue("No threads whose name is started with " + prefixDefault, 
+                checkForExistenceOfThreads(prefixDefault));
+        
+        // User specific thread name prefix 2
+        String threadNamePrefix2 = "AnotherPrefix";
+        engine = factory.createJettyHTTPServerEngine(PORT2, "http");
+        parameters = new ThreadingParameters();
+        parameters.setThreadNamePrefix(threadNamePrefix2);
+        engine.setThreadingParameters(parameters);
+        engine.finalizeConfig();
+        handler = new JettyHTTPTestHandler("string2", true);
+        engine.addServant(new URL("https://localhost:" + PORT2 + "/test"), handler);
+        assertTrue("No threads whose name is started with " + threadNamePrefix2, 
+                checkForExistenceOfThreads(threadNamePrefix2));
+        
+        JettyHTTPServerEngineFactory.destroyForPort(PORT1);
+        JettyHTTPServerEngineFactory.destroyForPort(PORT2);
+        JettyHTTPServerEngineFactory.destroyForPort(PORT3);
+    }
 
+    private boolean checkForExistenceOfThreads(String prefixName) {
+        Map<Thread, StackTraceElement[]> threads = Thread.getAllStackTraces();
+        Set<Thread> threadSet = threads.keySet();
+        for (Thread thread : threadSet) {
+            if (thread.getName().startsWith(prefixName)) {
+                return true;
+            } 
+        }
+        return false;
+    }
+    
     @Test
     public void testEngineRetrieval() throws Exception {
         JettyHTTPServerEngine engine =

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
index e3280a8..b7634bc 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
@@ -116,6 +116,7 @@ public class ApplicationContextTest extends Assert {
         JettyHTTPServerEngine engine = (JettyHTTPServerEngine)jd.getEngine();
         assertEquals(111, engine.getThreadingParameters().getMinThreads());
         assertEquals(120, engine.getThreadingParameters().getMaxThreads());
+        assertEquals("TestPrefix", engine.getThreadingParameters().getThreadNamePrefix());
         
         ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
         ConduitInitiator ci = cim.getConduitInitiator("http://cxf.apache.org/transports/http");
@@ -135,6 +136,8 @@ public class ApplicationContextTest extends Assert {
         assertFalse(engine.getSendServerVersion());
         assertEquals(99, engine.getThreadingParameters().getMinThreads());
         assertEquals(777, engine.getThreadingParameters().getMaxThreads());
+        assertEquals("AnotherPrefix", engine.getThreadingParameters().getThreadNamePrefix());
+        
         assertTrue("The engine should support session manager", engine.isSessionSupport());
         assertNotNull("The handlers should not be null", engine.getHandlers());
         assertEquals(1, engine.getHandlers().size());
@@ -148,6 +151,7 @@ public class ApplicationContextTest extends Assert {
         engine = (JettyHTTPServerEngine)jd3.getEngine();
         assertEquals(111, engine.getThreadingParameters().getMinThreads());
         assertEquals(120, engine.getThreadingParameters().getMaxThreads());
+        assertEquals("TestPrefix", engine.getThreadingParameters().getThreadNamePrefix());
         assertEquals(engine.getTlsServerParameters().getClientAuthentication().isWant(),
true);
         assertEquals(engine.getTlsServerParameters().getClientAuthentication().isRequired(),
true);
         
@@ -180,6 +184,6 @@ public class ApplicationContextTest extends Assert {
         info2.setAddress(address);
         return info2;
     }
-    
+
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
index e96685d..54f2000 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
@@ -26,5 +26,6 @@ engine.port.zero.minThreads=21
 engine.port.zero.maxThreads=389
 engine.port.nine.one.minThreads=99
 engine.port.nine.one.maxThreads=777
+engine.port.nine.one.threadNamePrefix=AnotherPrefix
 engine.port.nine.one.maxIdle=40000
 engine.port.nine.one.sendServerVersion=false

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
index dd474cd..f20339c 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
@@ -62,48 +62,40 @@
     </h:conduit>
 
     <hj:engine-factory bus="cxf">
-       <hj:identifiedTLSServerParameters id="sample1">
-         <hj:tlsServerParameters jsseProvider="SUN" secureSocketProtocol="TLS">
-            <sec:clientAuthentication want="false" required="false"/>
-        </hj:tlsServerParameters>
-       </hj:identifiedTLSServerParameters>
-       
-	   <hj:identifiedThreadingParameters id="sampleThreading1">
-	      <hj:threadingParameters minThreads="111" maxThreads="120"/>
-	   </hj:identifiedThreadingParameters>
-       
-	   <hj:engine port="${engine.port.nine.zero}">
-	      <hj:threadingParametersRef id="sampleThreading1"/>	      
-	   </hj:engine>
-	   
-	   <hj:engine port="#[engine.port.zero]">
-	      <hj:threadingParameters minThreads="${engine.port.zero.minThreads}" maxThreads="${engine.port.zero.maxThreads}"/>
-	   </hj:engine>
-	   
-	   <hj:engine port="$(engine.port.nine.one)" maxIdleTime="$(engine.port.nine.one.maxIdle)"
sendServerVersion="$(engine.port.nine.one.sendServerVersion)">
-	       <hj:threadingParameters minThreads="${engine.port.nine.one.minThreads}"
-	        maxThreads="${engine.port.nine.one.maxThreads}"/>	      
-	     <hj:connector>
-           <beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">
-              <beans:property name = "port" value="${engine.port.nine.one}" />
-           </beans:bean>
-         </hj:connector>
-         <hj:handlers>
-           <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>  
      
-         </hj:handlers>
-         <hj:sessionSupport>true</hj:sessionSupport>
-	  </hj:engine> 
-	  
-	  <hj:engine port="${engine.port.nine.two}">
-        <hj:tlsServerParameters>
-           <sec:clientAuthentication want="true" required="true"/>
-        </hj:tlsServerParameters>
-           <hj:threadingParametersRef id="sampleThreading1"/>
-      </hj:engine>
-      
-      <hj:engine port="${engine.port.nine.three}">
-         <hj:tlsServerParametersRef id="sample1"/>
-      </hj:engine>
-      
-	</hj:engine-factory>
+        <hj:identifiedTLSServerParameters id="sample1">
+            <hj:tlsServerParameters jsseProvider="SUN" secureSocketProtocol="TLS">
+                <sec:clientAuthentication want="false" required="false"/>
+            </hj:tlsServerParameters>
+        </hj:identifiedTLSServerParameters>
+        <hj:identifiedThreadingParameters id="sampleThreading1">
+            <hj:threadingParameters minThreads="111" maxThreads="120" threadNamePrefix="TestPrefix"/>
+        </hj:identifiedThreadingParameters>
+        <hj:engine port="${engine.port.nine.zero}">
+            <hj:threadingParametersRef id="sampleThreading1"/>
+        </hj:engine>
+        <hj:engine port="#[engine.port.zero]">
+            <hj:threadingParameters minThreads="${engine.port.zero.minThreads}" maxThreads="${engine.port.zero.maxThreads}"/>
+        </hj:engine>
+        <hj:engine port="$(engine.port.nine.one)" maxIdleTime="$(engine.port.nine.one.maxIdle)"
sendServerVersion="$(engine.port.nine.one.sendServerVersion)">
+            <hj:threadingParameters minThreads="${engine.port.nine.one.minThreads}" maxThreads="${engine.port.nine.one.maxThreads}"
threadNamePrefix="${engine.port.nine.one.threadNamePrefix}"/>
+            <hj:connector>
+                <beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">
+                    <beans:property name="port" value="${engine.port.nine.one}"/>
+                </beans:bean>
+            </hj:connector>
+            <hj:handlers>
+                <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+            </hj:handlers>
+            <hj:sessionSupport>true</hj:sessionSupport>
+        </hj:engine>
+        <hj:engine port="${engine.port.nine.two}">
+            <hj:tlsServerParameters>
+                <sec:clientAuthentication want="true" required="true"/>
+            </hj:tlsServerParameters>
+            <hj:threadingParametersRef id="sampleThreading1"/>
+        </hj:engine>
+        <hj:engine port="${engine.port.nine.three}">
+            <hj:tlsServerParametersRef id="sample1"/>
+        </hj:engine>
+    </hj:engine-factory>
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/6aa40ba2/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
index 4583630..d09add8 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans.xml
@@ -47,47 +47,40 @@
     </h:conduit>
 
     <hj:engine-factory bus="cxf">
-       <hj:identifiedTLSServerParameters id="sample1">
-         <hj:tlsServerParameters jsseProvider="SUN" secureSocketProtocol="TLS">
-            <sec:clientAuthentication want="false" required="false"/>
-        </hj:tlsServerParameters>
-       </hj:identifiedTLSServerParameters>
-       
-	   <hj:identifiedThreadingParameters id="sampleThreading1">
-	      <hj:threadingParameters minThreads="111" maxThreads="120"/>
-	   </hj:identifiedThreadingParameters>
-       
-	   <hj:engine port="9000" maxIdleTime="30000">
-	      <hj:threadingParametersRef id="sampleThreading1"/>	      
-	   </hj:engine>
-	   
-	   <hj:engine port="0">
-	      <hj:threadingParameters minThreads="21" maxThreads="389"/>
-	   </hj:engine>
-	   
-	   <hj:engine port="9001" maxIdleTime="40000" sendServerVersion="false">
-	       <hj:threadingParameters minThreads="99" maxThreads="777"/>	      
-	     <hj:connector>
-           <beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">
-              <beans:property name = "port" value="9001" />
-           </beans:bean>
-         </hj:connector>
-         <hj:handlers>
-           <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>  
      
-         </hj:handlers>
-         <hj:sessionSupport>true</hj:sessionSupport>
-	  </hj:engine> 
-	  
-	  <hj:engine port="9002">
-        <hj:tlsServerParameters>
-           <sec:clientAuthentication want="true" required="true"/>
-        </hj:tlsServerParameters>
-           <hj:threadingParametersRef id="sampleThreading1"/>
-      </hj:engine>
-      
-      <hj:engine port="9003">
-         <hj:tlsServerParametersRef id="sample1"/>
-      </hj:engine>
-      
-	</hj:engine-factory>
+        <hj:identifiedTLSServerParameters id="sample1">
+            <hj:tlsServerParameters jsseProvider="SUN" secureSocketProtocol="TLS">
+                <sec:clientAuthentication want="false" required="false"/>
+            </hj:tlsServerParameters>
+        </hj:identifiedTLSServerParameters>
+        <hj:identifiedThreadingParameters id="sampleThreading1">
+            <hj:threadingParameters minThreads="111" maxThreads="120" threadNamePrefix="TestPrefix"/>
+        </hj:identifiedThreadingParameters>
+        <hj:engine port="9000" maxIdleTime="30000">
+            <hj:threadingParametersRef id="sampleThreading1"/>
+        </hj:engine>
+        <hj:engine port="0">
+            <hj:threadingParameters minThreads="21" maxThreads="389"/>
+        </hj:engine>
+        <hj:engine port="9001" maxIdleTime="40000" sendServerVersion="false">
+            <hj:threadingParameters minThreads="99" maxThreads="777" threadNamePrefix="AnotherPrefix"/>
+            <hj:connector>
+                <beans:bean class="org.eclipse.jetty.server.bio.SocketConnector">
+                    <beans:property name="port" value="9001"/>
+                </beans:bean>
+            </hj:connector>
+            <hj:handlers>
+                <beans:bean class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+            </hj:handlers>
+            <hj:sessionSupport>true</hj:sessionSupport>
+        </hj:engine>
+        <hj:engine port="9002">
+            <hj:tlsServerParameters>
+                <sec:clientAuthentication want="true" required="true"/>
+            </hj:tlsServerParameters>
+            <hj:threadingParametersRef id="sampleThreading1"/>
+        </hj:engine>
+        <hj:engine port="9003">
+            <hj:tlsServerParametersRef id="sample1"/>
+        </hj:engine>
+    </hj:engine-factory>
 </beans>


Mime
View raw message