cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [2/2] git commit: CXF-5543 Some more refactoring in the jms systests
Date Wed, 05 Mar 2014 10:44:54 GMT
CXF-5543 Some more refactoring in the jms systests


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

Branch: refs/heads/master
Commit: 95caaa8788f08cdaf2458493b6fdec258acc6591
Parents: b83e3fc
Author: Christian Schneider <chris@die-schneider.net>
Authored: Wed Mar 5 11:44:40 2014 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Wed Mar 5 11:44:40 2014 +0100

----------------------------------------------------------------------
 .../testcases/JavaFirstNoWsdlTest.java          |  29 +-
 .../testcases/SOAPJMSTestSuiteTest.java         |   1 +
 .../testsuite/testcases/SoapJmsSpecTest.java    |  59 +---
 .../cxf/systest/jms/AbstractVmJMSTest.java      | 104 ++++++
 ...GreeterImplTwoWayJMSAppCorrelationIDEng.java |  32 --
 ...erImplTwoWayJMSAppCorrelationIDNoPrefix.java |  32 --
 ...eeterImplTwoWayJMSAppCorrelationIDSales.java |  32 --
 ...woWayJMSAppCorrelationIDStaticPrefixEng.java |  32 --
 ...WayJMSAppCorrelationIDStaticPrefixSales.java |  32 --
 ...WayJMSRuntimeCorrelationIDDynamicPrefix.java |  32 --
 ...yJMSRuntimeCorrelationIDStaticPrefixEng.java |  32 --
 ...MSRuntimeCorrelationIDStaticPrefixSales.java |  32 --
 .../systest/jms/JMSClientServerSoap12Test.java  |  40 +--
 .../cxf/systest/jms/JMSSharedQueueTest.java     | 313 -------------------
 .../apache/cxf/systest/jms/JaxWsAPITest.java    |  40 +--
 .../java/org/apache/cxf/systest/jms/Server.java |  14 +-
 ...HelloWorldContinuationsClientServerTest.java |  35 +--
 .../HelloWorldContinuationsThrottleTest.java    |  34 +-
 .../JMSContinuationsClientServerTest.java       |  40 +--
 .../ProviderJMSContinuationTest.java            |  28 +-
 .../cxf/systest/jms/continuations/jms_test.wsdl |   4 +-
 ...GreeterImplTwoWayJMSAppCorrelationIDEng.java |  34 ++
 ...erImplTwoWayJMSAppCorrelationIDNoPrefix.java |  34 ++
 ...eeterImplTwoWayJMSAppCorrelationIDSales.java |  34 ++
 ...woWayJMSAppCorrelationIDStaticPrefixEng.java |  34 ++
 ...WayJMSAppCorrelationIDStaticPrefixSales.java |  34 ++
 ...WayJMSRuntimeCorrelationIDDynamicPrefix.java |  34 ++
 ...yJMSRuntimeCorrelationIDStaticPrefixEng.java |  34 ++
 ...MSRuntimeCorrelationIDStaticPrefixSales.java |  34 ++
 .../systest/jms/shared/JMSSharedQueueTest.java  | 280 +++++++++++++++++
 .../resources/wsdl/hello_world_doc_lit.wsdl     |   2 +-
 testutils/src/main/resources/wsdl/jms_test.wsdl |  16 +-
 32 files changed, 712 insertions(+), 855 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/JavaFirstNoWsdlTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/JavaFirstNoWsdlTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/JavaFirstNoWsdlTest.java
index e7bbe01..8e4dede 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/JavaFirstNoWsdlTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/JavaFirstNoWsdlTest.java
@@ -18,35 +18,22 @@
  */
 package org.apache.cxf.jms.testsuite.testcases;
 
-import java.io.Closeable;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.apache.cxf.systest.jms.Hello;
 import org.apache.cxf.systest.jms.HelloImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
 import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
-import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class JavaFirstNoWsdlTest {
+public class JavaFirstNoWsdlTest extends AbstractVmJMSTest {
     private static final String SERVICE_ADDRESS = "jms:queue:test.cxf.jmstransport.queue3?receivetTimeOut=5000";
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
 
     @BeforeClass
     public static void startServer() {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-
+        startBusAndJMS(JavaFirstNoWsdlTest.class);
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
         svrFactory.setBus(bus);
         svrFactory.getFeatures().add(cff);
@@ -57,11 +44,6 @@ public class JavaFirstNoWsdlTest {
         svrFactory.create();
     }
 
-    @AfterClass
-    public static void stopServers() {
-        bus.shutdown(false);
-    }
-
     @Test
     public void testSpecNoWsdlService() throws Exception {
         specNoWsdlService(null);
@@ -81,11 +63,10 @@ public class JavaFirstNoWsdlTest {
         factory.getFeatures().add(cff);
         factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
         factory.setServiceClass(Hello.class);
-        factory.setAddress(address);
-        Hello client = (Hello)factory.create();
+        factory.setAddress(address); 
+        Hello client = (Hello)markForClose(factory.create());
         String reply = client.sayHi(" HI");
         Assert.assertEquals("get HI", reply);
-        ((Closeable)client).close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
index b6edb01..502c268 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
@@ -91,6 +91,7 @@ public class SOAPJMSTestSuiteTest extends AbstractBusClientServerTestBase {
         assertTrue("server did not launch correctly", launchServer(TestSuiteServer.class, true));
         createStaticBus();
     }
+
     @After
     public void close() throws Exception {
         if (closeable != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SoapJmsSpecTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SoapJmsSpecTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SoapJmsSpecTest.java
index d45fc31..b8aad09 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SoapJmsSpecTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SoapJmsSpecTest.java
@@ -18,21 +18,15 @@
  */
 package org.apache.cxf.jms.testsuite.testcases;
 
-import java.io.Closeable;
 import java.net.URL;
 import java.util.Map;
 
-import javax.jms.ConnectionFactory;
 import javax.jms.DeliveryMode;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.soap.SOAPFaultException;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jms.testsuite.services.GreeterSpecImpl;
@@ -40,36 +34,21 @@ import org.apache.cxf.jms.testsuite.services.GreeterSpecWithPortError;
 import org.apache.cxf.jms_greeter.JMSGreeterPortType;
 import org.apache.cxf.jms_greeter.JMSGreeterService;
 import org.apache.cxf.jms_greeter.JMSGreeterService2;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.apache.cxf.transport.common.gzip.GZIPFeature;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
 import org.apache.cxf.transport.jms.JMSConstants;
 import org.apache.cxf.transport.jms.JMSMessageHeadersType;
-import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class SoapJmsSpecTest {
+public class SoapJmsSpecTest extends AbstractVmJMSTest {
     private static final String SERVICE_NS = "http://cxf.apache.org/jms_greeter";
     private static final String WSDL = "/wsdl/jms_spec_test.wsdl";
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
-    private static ConnectionFactory cf;
-
-    public URL getWSDLURL(String s) throws Exception {
-        URL u = getClass().getResource(s);
-        if (u == null) {
-            throw new IllegalArgumentException("WSDL classpath resource not found " + s);
-        }
-        return u;
-    }
 
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf1 = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        cf = new PooledConnectionFactory(cf1);
-        cff = new ConnectionFactoryFeature(cf);
+        startBusAndJMS(SoapJmsSpecTest.class);
 
         publish("jms:queue:test.cxf.jmstransport.queue2", new GreeterSpecImpl());
         publish("jms:queue:test.cxf.jmstransport.queue5", new GreeterSpecWithPortError());
@@ -81,18 +60,6 @@ public class SoapJmsSpecTest {
         ep.publish("jms:queue:test.cxf.jmstransport.queue6");
     }
     
-    private static void publish(String address, Object impl) {
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(impl);
-        ep.setBus(bus);
-        ep.getFeatures().add(cff);
-        ep.publish(address);
-    }
-
-    @AfterClass
-    public static void stopServers() {
-        bus.shutdown(false);
-    }
-
     @Test
     public void testSpecJMS() throws Exception {
         QName serviceName = new QName(SERVICE_NS, "JMSGreeterService");
@@ -100,19 +67,17 @@ public class SoapJmsSpecTest {
         URL wsdl = getWSDLURL(WSDL);
         JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
 
-        String response1 = new String("Hello Milestone-");
-        JMSGreeterPortType greeter = service.getPort(portName, JMSGreeterPortType.class, cff);
+        JMSGreeterPortType greeter = markForClose(service.getPort(portName, JMSGreeterPortType.class, cff));
         for (int idx = 0; idx < 5; idx++) {
 
             greeter.greetMeOneWay("test String");
 
             String greeting = greeter.greetMe("Milestone-" + idx);
-            Assert.assertEquals(response1 + idx, greeting);
+            Assert.assertEquals("Hello Milestone-" + idx, greeting);
 
             String reply = greeter.sayHi();
             Assert.assertEquals(new String("Bonjour"), reply);
         }
-        ((Closeable)greeter).close();
     }
 
     @Test
@@ -121,7 +86,7 @@ public class SoapJmsSpecTest {
         QName portName = new QName(SERVICE_NS, "GreeterPort");
         URL wsdl = getWSDLURL(WSDL);
         JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
-        JMSGreeterPortType greeter = service.getPort(portName, JMSGreeterPortType.class, cff);
+        JMSGreeterPortType greeter = markForClose(service.getPort(portName, JMSGreeterPortType.class, cff));
         Map<String, Object> requestContext = ((BindingProvider)greeter).getRequestContext();
         JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
         requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader);
@@ -144,7 +109,6 @@ public class SoapJmsSpecTest {
         Assert.assertEquals(null, responseHeader.getSOAPJMSSOAPAction());
         Assert.assertEquals(DeliveryMode.PERSISTENT, responseHeader.getJMSDeliveryMode());
         Assert.assertEquals(7, responseHeader.getJMSPriority());
-        ((Closeable)greeter).close();
     }
 
     @Test
@@ -153,10 +117,9 @@ public class SoapJmsSpecTest {
         QName portName = new QName(SERVICE_NS, "GreeterPort2");
         URL wsdl = getWSDLURL(WSDL);
         JMSGreeterService2 service = new JMSGreeterService2(wsdl, serviceName);
-        JMSGreeterPortType greeter = service.getPort(portName, JMSGreeterPortType.class, cff);
+        JMSGreeterPortType greeter = markForClose(service.getPort(portName, JMSGreeterPortType.class, cff));
 
         String reply = greeter.sayHi();
-        ((Closeable)greeter).close();
         Assert.assertEquals("Bonjour", reply);
     }
 
@@ -167,7 +130,7 @@ public class SoapJmsSpecTest {
         URL wsdl = getWSDLURL(WSDL);
         JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
 
-        JMSGreeterPortType greeter = service.getPort(portName, JMSGreeterPortType.class, cff);
+        JMSGreeterPortType greeter = markForClose(service.getPort(portName, JMSGreeterPortType.class, cff));
         BindingProvider bp = (BindingProvider)greeter;
 
         Map<String, Object> requestContext = bp.getRequestContext();
@@ -187,10 +150,7 @@ public class SoapJmsSpecTest {
                 Assert.fail("response Header should not be null");
             }
             Assert.assertTrue(responseHdr.isSOAPJMSIsFault());
-        } finally {
-            ((Closeable)greeter).close();
         }
-
     }
     
     @Test
@@ -203,7 +163,7 @@ public class SoapJmsSpecTest {
         factory.getFeatures().add(cff);
         factory.getFeatures().add(new GZIPFeature());
         factory.setAddress("jms:queue:test.cxf.jmstransport.queue6");
-        JMSGreeterPortType greeter = (JMSGreeterPortType)factory.create(); 
+        JMSGreeterPortType greeter = (JMSGreeterPortType)markForClose(factory.create()); 
         
         for (int idx = 0; idx < 5; idx++) {
 
@@ -215,7 +175,6 @@ public class SoapJmsSpecTest {
             String reply = greeter.sayHi();
             Assert.assertEquals("Bonjour", reply);
         }
-        ((Closeable)greeter).close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/AbstractVmJMSTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/AbstractVmJMSTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/AbstractVmJMSTest.java
new file mode 100644
index 0000000..c51c515
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/AbstractVmJMSTest.java
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jms.ConnectionFactory;
+import javax.xml.ws.Endpoint;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.pool.PooledConnectionFactory;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
+import org.junit.After;
+import org.junit.AfterClass;
+
+/**
+ * Base class for JMS tests that use the an in VM ConnectionFactory.
+ * 
+ *  The idea is to start the bus and services in the @BeforeClass of the test.
+ *  In each test method clients are created and marked for removal.
+ *  The base class then makes sure that all clients are closed after each test method
+ *  and that the bus is shut down after the whole test class.
+ */
+public abstract class AbstractVmJMSTest {
+    protected static Bus bus;
+    protected static ConnectionFactoryFeature cff;
+    protected static ConnectionFactory cf;
+    private List<Object> closeableResources = new ArrayList<Object>();
+
+    public static void startBusAndJMS(Class<?> testClass) {
+        bus = BusFactory.getDefaultBus();
+        String brokerURI = "vm://" + testClass.getName() +"?broker.persistent=false";
+        ActiveMQConnectionFactory cf1 = new ActiveMQConnectionFactory(brokerURI);
+        cf = new PooledConnectionFactory(cf1);
+        cff = new ConnectionFactoryFeature(cf);
+    }
+    
+    public <T> T markForClose(T resource) {
+        closeableResources.add(resource);
+        return resource;
+    }
+    
+    @After
+    public void stopClosables() {
+        for (Object proxy : closeableResources) {
+            if (proxy instanceof Closeable) {
+                try {
+                    ((Closeable)proxy).close();
+                } catch (IOException e) {
+                    // Ignore
+                }
+            }
+        }
+        closeableResources.clear();
+    }
+    
+    @AfterClass
+    public static void stopBus() {
+        bus.shutdown(false);
+    }
+    
+    public URL getWSDLURL(String s) throws Exception {
+        URL u = getClass().getResource(s);
+        if (u == null) {
+            throw new IllegalArgumentException("WSDL classpath resource not found " + s);
+        }
+        return u;
+    }
+    
+    public static void publish(String address, Object impl) {
+        EndpointImpl ep = (EndpointImpl)Endpoint.create(impl);
+        ep.setBus(bus);
+        ep.getFeatures().add(cff);
+        ep.publish(address);
+    }
+    
+    public static void publish(Object impl) {
+        publish(null, impl);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java
deleted file mode 100644
index b165838..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceAppCorrelationID", 
-            portName = "HelloWorldPortAppCorrelationIDEng",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSAppCorrelationIDEng extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
deleted file mode 100644
index dde5fbb..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceAppCorrelationIDNoPrefix", 
-            portName = "HelloWorldPortAppCorrelationIDNoPrefix",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSAppCorrelationIDNoPrefix extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java
deleted file mode 100644
index f30da40..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceAppCorrelationID", 
-            portName = "HelloWorldPortAppCorrelationIDSales",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSAppCorrelationIDSales extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
deleted file mode 100644
index c26ca99..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceAppCorrelationIDStaticPrefix", 
-            portName = "HelloWorldPortAppCorrelationIDStaticPrefixEng",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
deleted file mode 100644
index 6a8d6e7..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceAppCorrelationIDStaticPrefix", 
-            portName = "HelloWorldPortAppCorrelationIDStaticPrefixSales",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
deleted file mode 100644
index fe0bf6d..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceRuntimeCorrelationIDDynamicPrefix", 
-            portName = "HelloWorldPortRuntimeCorrelationIDDynamicPrefix",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
deleted file mode 100644
index c9708f0..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceRuntimeCorrelationIDStaticPrefix", 
-            portName = "HelloWorldPortRuntimeCorrelationIDStaticPrefixEng",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales.java
deleted file mode 100644
index 4b1dcba..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import javax.jws.WebService;
-
-
-
-@WebService(serviceName = "HelloWorldServiceRuntimeCorrelationIDStaticPrefix", 
-            portName = "HelloWorldPortRuntimeCorrelationIDStaticPrefixSales",
-            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
-            targetNamespace = "http://cxf.apache.org/hello_world_jms",
-            wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales extends TwoWayJMSImplBase {    
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
index 36ab54a..4661c20 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
@@ -18,51 +18,23 @@
  */
 package org.apache.cxf.systest.jms;
 
-import java.io.Closeable;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
 import org.apache.hello_world_doc_lit.Greeter;
 import org.apache.hello_world_doc_lit.PingMeFault;
 import org.apache.hello_world_doc_lit.SOAPService2;
-import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class JMSClientServerSoap12Test {
-    private static final String BROKER_URI = "vm://JMSClientServerSoap12Test?broker.persistent=false";
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
+public class JMSClientServerSoap12Test extends AbstractVmJMSTest {
     
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(BROKER_URI);
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(new GreeterImplSoap12());
-        ep.setBus(bus);
-        ep.getFeatures().add(cff);
-        ep.publish("jms:queue:routertest.SOAPService2Q.text");
-    }
-    
-    @AfterClass
-    public static void stopServers() throws Exception {
-        bus.shutdown(false);
-    }
-    
-    public URL getWSDLURL(String s) throws Exception {
-        return getClass().getResource(s);
+        startBusAndJMS(JMSClientServerSoap12Test.class);
+        publish("jms:queue:routertest.SOAPService2Q.text", new GreeterImplSoap12());
     }
     
     @Test
@@ -72,15 +44,14 @@ public class JMSClientServerSoap12Test {
         QName portName = new QName("http://apache.org/hello_world_doc_lit", "SoapPort8");
         URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
         SOAPService2 service = new SOAPService2(wsdl, serviceName);
-        String response1 = new String("Hello Milestone-");
-        Greeter greeter = service.getPort(portName, Greeter.class, cff);
+        Greeter greeter = markForClose(service.getPort(portName, Greeter.class, cff));
 
         for (int idx = 0; idx < 5; idx++) {
 
             greeter.greetMeOneWay("test String");
 
             String greeting = greeter.greetMe("Milestone-" + idx);
-            Assert.assertEquals(response1 + idx, greeting);
+            Assert.assertEquals(new String("Hello Milestone-") + idx, greeting);
 
             String reply = greeter.sayHi();
             Assert.assertEquals("Bonjour", reply);
@@ -93,6 +64,5 @@ public class JMSClientServerSoap12Test {
             }
 
         }
-        ((Closeable)greeter).close();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSSharedQueueTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSSharedQueueTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSSharedQueueTest.java
deleted file mode 100644
index b50ccd8..0000000
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSSharedQueueTest.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.jms;
-
-import java.io.Closeable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-
-import org.apache.cxf.hello_world_jms.HelloWorldPortType;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationID;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDNoPrefix;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDStaticPrefix;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceRuntimeCorrelationIDDynamicPrefix;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceRuntimeCorrelationIDStaticPrefix;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-import org.apache.cxf.transport.jms.JMSConstants;
-import org.apache.cxf.transport.jms.JMSMessageHeadersType;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class JMSSharedQueueTest extends AbstractBusClientServerTestBase {
-    public static final String PORT = allocatePort(JMSSharedQueueTest.class); 
-    private static final String SERVICE_NS = "http://cxf.apache.org/hello_world_jms";
-    private static EmbeddedJMSBrokerLauncher broker;
-    private String wsdlString;
-    
-    @BeforeClass
-    public static void startServers() throws Exception {
-        broker = new EmbeddedJMSBrokerLauncher("tcp://localhost:" + PORT);
-        launchServer(broker);
-        launchServer(new Server(broker));
-        createStaticBus();
-    }
-    
-    public URL getWSDLURL(String s) throws Exception {
-        URL u = getClass().getResource(s);
-        if (u == null) {
-            throw new IllegalArgumentException("WSDL classpath resource not found " + s);
-        }
-        wsdlString = u.toString().intern();
-        broker.updateWsdl(getBus(), wsdlString);
-        return u;
-    }
-
-    private interface CorrelationIDFactory {
-        String createCorrealtionID();
-    }
-    
-    private static class ClientRunnable implements Runnable {
-        private HelloWorldPortType port;
-        private CorrelationIDFactory corrFactory;
-        private String prefix;
-        private Throwable ex;
-
-        public ClientRunnable(HelloWorldPortType port) {
-            this.port = port;
-        }
-
-        public ClientRunnable(HelloWorldPortType port, String prefix) {
-            this.port = port;
-            this.prefix = prefix;
-        }
-
-        public ClientRunnable(HelloWorldPortType port, CorrelationIDFactory factory) {
-            this.port = port;
-            this.corrFactory = factory;
-        }
-        
-        public Throwable getException() {
-            return ex;
-        }
-        
-        public void run() {
-            try {
-                for (int idx = 0; idx < 5; idx++) {
-                    callGreetMe();
-                }
-            } catch (Throwable e) {
-                ex = e;
-            }
-        }
-
-        private void callGreetMe() {
-            BindingProvider  bp = (BindingProvider)port;
-            Map<String, Object> requestContext = bp.getRequestContext();
-            JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
-            requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader);
-            String request = "World" + ((prefix != null) ? ":" + prefix : "");
-            String correlationID = null;
-            if (corrFactory != null) {
-                correlationID = corrFactory.createCorrealtionID();
-                requestHeader.setJMSCorrelationID(correlationID);
-                request +=  ":" + correlationID;
-            }
-            String expected = "Hello " + request;
-            String response = port.greetMe(request);
-            assertEquals("Response didn't match expected request", expected, response);
-            if (corrFactory != null) {
-                Map<String, Object> responseContext = bp.getResponseContext();
-                JMSMessageHeadersType responseHeader = 
-                    (JMSMessageHeadersType)responseContext.get(
-                            JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
-                assertEquals("Request and Response CorrelationID didn't match", 
-                              correlationID, responseHeader.getJMSCorrelationID());
-            }
-        }
-    }
-    
-    private void executeAsync(ClientRunnable... clients) throws Throwable {
-        executeAsync(Arrays.asList(clients));
-    }
-    
-    private void executeAsync(Collection<ClientRunnable> clients) throws Throwable {
-        ExecutorService executor = Executors.newCachedThreadPool();
-        for (ClientRunnable client : clients) {
-            executor.execute(client);
-        }
-        executor.shutdown();
-        for (ClientRunnable client : clients) {
-            if (client.getException() != null) {
-                throw client.getException();
-            }
-        }
-    }
-    
-    @Test
-    public void testTwoWayQueueAppCorrelationID() throws Throwable {
-        QName serviceName = new QName(SERVICE_NS, "HelloWorldServiceAppCorrelationID");
-        QName portNameEng = new QName(SERVICE_NS, "HelloWorldPortAppCorrelationIDEng");
-        QName portNameSales = new QName(SERVICE_NS, "HelloWorldPortAppCorrelationIDSales");
-
-        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
-        HelloWorldServiceAppCorrelationID service = new HelloWorldServiceAppCorrelationID(wsdl, serviceName);
-
-        HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class);
-        ClientRunnable engClient = 
-            new ClientRunnable(portEng,
-                new CorrelationIDFactory() {
-                    private int counter;
-                    public String createCorrealtionID() {
-                        return "com.mycompany.eng:" + counter++;
-                    }
-                });
-        
-        HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class);
-        ClientRunnable salesClient = 
-             new ClientRunnable(portSales,
-                new CorrelationIDFactory() {
-                    private int counter;
-                    public String createCorrealtionID() {
-                        return "com.mycompany.sales:" + counter++;
-                    }
-                });
-     
-        executeAsync(engClient, salesClient);
-        ((Closeable)portEng).close();
-        ((Closeable)portSales).close();
-    }
-    
-    @Test
-    public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Throwable {
-        QName serviceName = new QName(SERVICE_NS, 
-            "HelloWorldServiceAppCorrelationIDStaticPrefix");
-        QName portNameEng = new QName(SERVICE_NS, 
-            "HelloWorldPortAppCorrelationIDStaticPrefixEng");
-        QName portNameSales = new QName(SERVICE_NS, 
-            "HelloWorldPortAppCorrelationIDStaticPrefixSales");
-
-        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
-        HelloWorldServiceAppCorrelationIDStaticPrefix service = 
-            new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl, serviceName);
-
-        HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class);
-        ClientRunnable engClient = new ClientRunnable(portEng);
-        
-        HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class);
-        ClientRunnable salesClient = new ClientRunnable(portSales);
-
-        executeAsync(engClient, salesClient);
-        ((Closeable)portEng).close();
-        ((Closeable)portSales).close();
-    }
-
-    /* TO DO:
-     * This tests shows a missing QoS. When CXF clients share a named (persistent) reply queue
-     *  with an application provided correlationID there will be a guaranteed response
-     * message loss. 
-     * 
-     * A large number of threads is used to ensure message loss and avoid a false 
-     * positive assertion
-     */
-    @Test
-    public void testTwoWayQueueAppCorrelationIDNoPrefix() throws Throwable {
-        QName serviceName = new QName(SERVICE_NS, 
-            "HelloWorldServiceAppCorrelationIDNoPrefix");
-        QName portName = new QName(SERVICE_NS, 
-            "HelloWorldPortAppCorrelationIDNoPrefix");
-        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
-        HelloWorldServiceAppCorrelationIDNoPrefix service = 
-            new HelloWorldServiceAppCorrelationIDNoPrefix(wsdl, serviceName);
-        
-        HelloWorldPortType port = service.getPort(portName, HelloWorldPortType.class);
-
-        Collection<ClientRunnable> clients = new ArrayList<ClientRunnable>();
-        for (int i = 0; i < 1; ++i) {
-            clients.add(new ClientRunnable(port));            
-        }
-        executeAsync(clients);
-        ((Closeable)port).close();
-    }
-
-    /*
-     * This tests a use case where there is a shared request and reply queues between
-     * two servers (Eng and Sales). However each server has a design time provided selector
-     * which allows them to share the same queue and do not consume the other's
-     * messages. 
-     * 
-     * The clients to these two servers use the same request and reply queues.
-     * An Eng client uses a design time selector prefix to form request message 
-     * correlationID and to form a reply consumer that filters only reply
-     * messages originated from the Eng server. To differentiate between
-     * one Eng client instance from another this suffix is supplemented by
-     * a runtime value of ConduitId which has 1-1 relation to a client instance
-     * This guarantees that an Eng client instance will only consume its own reply 
-     * messages. 
-     * 
-     * In case of a single client instance being shared among multiple threads
-     * the third portion of the request message correlationID, 
-     * an atomic rolling message counter, ensures that each message gets a unique ID
-     *  
-     * So the model is:
-     * 
-     * Many concurrent Sales clients to a single request and reply queues (Q1, Q2) 
-     * to a single Sales server
-     * Many concurrent Eng clients to a single request and reply queues (Q1, Q2) 
-     * to a single Eng server
-     */
-    @Test
-    public void testTwoWayQueueRuntimeCorrelationIDStaticPrefix() throws Throwable {
-        QName serviceName = new QName(SERVICE_NS, 
-            "HelloWorldServiceRuntimeCorrelationIDStaticPrefix");
-        
-        QName portNameEng = new QName(SERVICE_NS, 
-            "HelloWorldPortRuntimeCorrelationIDStaticPrefixEng");
-        QName portNameSales = new QName(SERVICE_NS, 
-            "HelloWorldPortRuntimeCorrelationIDStaticPrefixSales");
-
-        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
-        HelloWorldServiceRuntimeCorrelationIDStaticPrefix service = 
-            new HelloWorldServiceRuntimeCorrelationIDStaticPrefix(wsdl, serviceName);
-        
-        HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class);
-        HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class);
-
-        Collection<ClientRunnable> clients = new ArrayList<ClientRunnable>();
-        for (int i = 0; i < 10; ++i) {
-            clients.add(new ClientRunnable(portEng, "com.mycompany.eng:"));
-            clients.add(new ClientRunnable(portSales, "com.mycompany.sales:"));
-        }
-        executeAsync(clients);
-        ((Closeable)portEng).close();
-        ((Closeable)portSales).close();
-    }
-
-
-
-    @Test
-    public void testTwoWayQueueRuntimeCorrelationDynamicPrefix() throws Throwable {
-        QName serviceName = new QName(SERVICE_NS, 
-            "HelloWorldServiceRuntimeCorrelationIDDynamicPrefix");
-        
-        QName portName = new QName(SERVICE_NS, 
-            "HelloWorldPortRuntimeCorrelationIDDynamicPrefix");
-        
-        URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
-        HelloWorldServiceRuntimeCorrelationIDDynamicPrefix service = 
-            new HelloWorldServiceRuntimeCorrelationIDDynamicPrefix(wsdl, serviceName);
-        HelloWorldPortType port = service.getPort(portName, HelloWorldPortType.class);
-
-        Collection<ClientRunnable> clients = new ArrayList<ClientRunnable>();        
-        for (int i = 0; i < 10; ++i) {
-            clients.add(new ClientRunnable(port));
-        }
-        executeAsync(clients);
-        ((Closeable)port).close();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JaxWsAPITest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JaxWsAPITest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JaxWsAPITest.java
index 5c364ab..24a4fc6 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JaxWsAPITest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JaxWsAPITest.java
@@ -18,24 +18,15 @@
  */
 package org.apache.cxf.systest.jms;
 
-import java.io.Closeable;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.soap.interceptor.TibcoSoapActionInterceptor;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
 import org.apache.hello_world_doc_lit.Greeter;
 import org.apache.hello_world_doc_lit.SOAPService2;
-import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -43,36 +34,21 @@ import org.junit.Test;
 /**
  * Simple test to check we can publish and call JMS services using the JAXWS API
  */
-public class JaxWsAPITest {
-
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
+public class JaxWsAPITest extends AbstractVmJMSTest {
 
     @BeforeClass
     public static void startServer() {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://JaxWsAPITest?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(new GreeterImplDoc());
-        ep.getFeatures().add(cff);
-        ep.setBus(bus);
-        ep.publish();
+        startBusAndJMS(JaxWsAPITest.class);
+        publish(new GreeterImplDoc());
     }
     
-    @AfterClass
-    public static void stopServers() {
-        bus.shutdown(false);
-    }
-
     @Test
     public void testGreeterUsingJaxWSAPI() throws Exception {
         QName serviceName = new QName("http://apache.org/hello_world_doc_lit", "SOAPService2");
         QName portName = new QName("http://apache.org/hello_world_doc_lit", "SoapPort2");
         URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
         SOAPService2 service = new SOAPService2(wsdl, serviceName);
-        Greeter greeter = service.getPort(portName, Greeter.class, cff);
+        Greeter greeter = markForClose(service.getPort(portName, Greeter.class, cff));
 
         Client client = ClientProxy.getClient(greeter);
         client.getEndpoint().getOutInterceptors().add(new TibcoSoapActionInterceptor());
@@ -80,14 +56,6 @@ public class JaxWsAPITest {
 
         String greeting = greeter.greetMe("Chris");
         Assert.assertEquals("Hello Chris", greeting);
-        ((Closeable)greeter).close();
     }
 
-    public URL getWSDLURL(String s) throws Exception {
-        URL u = getClass().getResource(s);
-        if (u == null) {
-            throw new IllegalArgumentException("WSDL classpath resource not found " + s);
-        }
-        return u;
-    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
index b4b3420..1ae9a35 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
@@ -42,25 +42,13 @@ public class Server extends AbstractBusTestServerBase {
         broker.updateWsdl(bus, "testutils/jms_test_mtom.wsdl");
         
         Endpoint.publish(null, new GreeterImplDoc());
-
-        String address = null;
-        Endpoint.publish(address, new GreeterImplTwoWayJMS());
+        Endpoint.publish(null, new GreeterImplTwoWayJMS());
         Endpoint.publish(null, new GreeterImplQueueOneWay());
         Endpoint.publish(null, new GreeterImplTopicOneWay());
         Endpoint.publish(null, new GreeterByteMessageImpl());
         Endpoint.publish(null, new SoapService6SoapPort6Impl());
         Endpoint.publish(null, new JmsDestPubSubImpl());
-
         Endpoint.publish(null, new SoapService7SoapPort7Impl());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSAppCorrelationIDNoPrefix());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSAppCorrelationIDEng());
-        Endpoint.publish(null, new GreeterImplTwoWayJMSAppCorrelationIDSales());
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
index 515f6c9..3e8fee1 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
@@ -25,52 +25,28 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
-import org.junit.AfterClass;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class HelloWorldContinuationsClientServerTest {
+public class HelloWorldContinuationsClientServerTest extends AbstractVmJMSTest {
     private static final String WSDL_PATH = "org/apache/cxf/systest/jms/continuations/test.wsdl";
 
-    private static ConnectionFactoryFeature cff;
-
-    private static Bus bus;
-
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-        Object implementor = new HelloWorldWithContinuationsJMS();        
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(null, implementor);
-        ep.setBus(bus);
-        ep.getFeatures().add(cff);
-        ep.publish();
+        publish(new HelloWorldWithContinuationsJMS());        
     }
     
-    @AfterClass
-    public static void stopServers() {
-        bus.shutdown(false);
-    }
-
     @Test
-    public void testHttpWrappedContinuations() throws Exception {
+    public void testHelloWorldContinuations() throws Exception {
         QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
         
         URL wsdlURL = getClass().getClassLoader().getResource(WSDL_PATH);
         
         HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
-        final HelloContinuation helloPort = service.getPort(HelloContinuation.class, cff);
+        final HelloContinuation helloPort = markForClose(service.getPort(HelloContinuation.class, cff));
         ExecutorService executor = Executors.newCachedThreadPool();
         CountDownLatch startSignal = new CountDownLatch(1);
         CountDownLatch helloDoneSignal = new CountDownLatch(5);
@@ -84,7 +60,6 @@ public class HelloWorldContinuationsClientServerTest {
         startSignal.countDown();
         helloDoneSignal.await(60, TimeUnit.SECONDS);
         executor.shutdownNow();
-        ((java.io.Closeable)helloPort).close();
         Assert.assertEquals("Some invocations are still running", 0, helloDoneSignal.getCount());
 
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
index 329d823..0edaebd 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
@@ -25,50 +25,29 @@ import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
-import org.junit.AfterClass;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class HelloWorldContinuationsThrottleTest {
+public class HelloWorldContinuationsThrottleTest extends AbstractVmJMSTest {
     private static final String WSDL_PATH = "org/apache/cxf/systest/jms/continuations/test.wsdl";
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
 
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-        Object implementor = new HelloWorldWithContinuationsJMS2();        
-        String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply";
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(address, implementor);
-        ep.getFeatures().add(cff);
-        ep.setBus(bus);
-        ep.publish();
+        startBusAndJMS(HelloWorldContinuationsThrottleTest.class);
+        publish("jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply",
+                new HelloWorldWithContinuationsJMS2());        
     }
 
-    @AfterClass
-    public static void clearProperty() {
-        bus.shutdown(false);
-    }
-    
     @Test
     public void testThrottleContinuations() throws Exception {
         QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
         
         URL wsdlURL = getClass().getClassLoader().getResource(WSDL_PATH);
         HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
-        final HelloContinuation helloPort = service.getPort(HelloContinuation.class, cff);
+        final HelloContinuation helloPort = markForClose(service.getPort(HelloContinuation.class, cff));
         
         ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
                                                              new ArrayBlockingQueue<Runnable>(10));
@@ -86,7 +65,6 @@ public class HelloWorldContinuationsThrottleTest {
         executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
                 
         helloDoneSignal.await(60, TimeUnit.SECONDS);
-        ((java.io.Closeable)helloPort).close();
         executor.shutdownNow();
         
         Assert.assertEquals("Some invocations are still running", 0, helloDoneSignal.getCount());

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
index c7c7666..2e20641 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
@@ -21,50 +21,23 @@ package org.apache.cxf.systest.jms.continuations;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
 import org.apache.cxf.hello_world_jms.HelloWorldPortType;
 import org.apache.cxf.hello_world_jms.HelloWorldService;
-import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
-import org.junit.AfterClass;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class JMSContinuationsClientServerTest {
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
+public class JMSContinuationsClientServerTest extends AbstractVmJMSTest {
     
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
-        Object implementor = new GreeterImplWithContinuationsJMS();        
-        String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply";
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(implementor);
-        ep.setBus(bus);
-        ep.getFeatures().add(cff);
-        ep.publish(address);
+        startBusAndJMS(JMSContinuationsClientServerTest.class);
+        publish("jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply",
+                new GreeterImplWithContinuationsJMS());        
     }
 
-    @AfterClass
-    public static void clearProperty() {
-        bus.shutdown(false);
-    }
-
-    public URL getWSDLURL(String s) throws Exception {
-        URL wsdl = getClass().getResource(s);
-        Assert.assertNotNull(wsdl);
-        return wsdl;
-    }
-        
     @Test
     public void testContinuationWithTimeout() throws Exception {
         QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldService");
@@ -72,9 +45,8 @@ public class JMSContinuationsClientServerTest {
         URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
         HelloWorldService service = new HelloWorldService(wsdl, serviceName);
 
-        HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class, cff);
+        HelloWorldPortType greeter = markForClose(service.getPort(portName, HelloWorldPortType.class, cff));
         Assert.assertEquals("Hi Fred Ruby", greeter.greetMe("Fred"));
-        ((java.io.Closeable)greeter).close();
     }
         
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
index eb49ff7..1596bbb 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
@@ -23,29 +23,18 @@ import java.net.URL;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.pool.PooledConnectionFactory;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
 import org.apache.cxf.hello_world_jms.HelloWorldPortType;
 import org.apache.cxf.hello_world_jms.HelloWorldService;
 import org.apache.cxf.jaxws.EndpointImpl;
-import org.apache.cxf.transport.jms.ConnectionFactoryFeature;
-import org.junit.AfterClass;
+import org.apache.cxf.systest.jms.AbstractVmJMSTest;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class ProviderJMSContinuationTest {
-    
-    private static Bus bus;
-    private static ConnectionFactoryFeature cff;
+public class ProviderJMSContinuationTest extends AbstractVmJMSTest {
 
     @BeforeClass
     public static void startServers() throws Exception {
-        bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
-        PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
-        cff = new ConnectionFactoryFeature(cfp);
+        startBusAndJMS(ProviderJMSContinuationTest.class);
         Object implementor = new HWSoapMessageDocProvider();        
         String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply";
         EndpointImpl ep = (EndpointImpl)Endpoint.create(address, implementor);
@@ -54,23 +43,14 @@ public class ProviderJMSContinuationTest {
         ep.getFeatures().add(cff);
         ep.publish();
     }
-    @AfterClass
-    public static void clearProperty() {
-        bus.shutdown(false);
-    }
-
-    public URL getWSDLURL(String s) throws Exception {
-        return getClass().getResource(s);
-    }
         
     @Test
     public void testProviderContinuation() throws Exception {
         QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldService");
         URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
         HelloWorldService service = new HelloWorldService(wsdl, serviceName);
-        HelloWorldPortType greeter = service.getPort(HelloWorldPortType.class, cff);
+        HelloWorldPortType greeter = markForClose(service.getPort(HelloWorldPortType.class, cff));
         greeter.greetMe("ffang");
-        ((java.io.Closeable)greeter).close();
     }
         
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl
index e2a023b..4a33902 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl
@@ -145,9 +145,7 @@
     </binding>
     <service name="HelloWorldService">
         <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">
-        	<jms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</jms:jndiInitialContextFactory>
-            <jms:jndiURL>tcp://localhost:61500</jms:jndiURL>
-            <soap:address location="jms:jndi:dynamicQueues/test.jmstransport.text?receiveTimeout=500000&amp;messageTimeToLive=500000"/>
+            <soap:address location="jms:queue:test.jmstransport.text?receiveTimeout=500000&amp;messageTimeToLive=500000"/>
         </port>
     </service>
 </definitions>

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDEng.java
new file mode 100644
index 0000000..3556ab4
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDEng.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceAppCorrelationID", 
+            portName = "HelloWorldPortAppCorrelationIDEng",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSAppCorrelationIDEng extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
new file mode 100644
index 0000000..5a17a91
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDNoPrefix.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceAppCorrelationIDNoPrefix", 
+            portName = "HelloWorldPortAppCorrelationIDNoPrefix",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSAppCorrelationIDNoPrefix extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDSales.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDSales.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDSales.java
new file mode 100644
index 0000000..26595d8
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDSales.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceAppCorrelationID", 
+            portName = "HelloWorldPortAppCorrelationIDSales",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSAppCorrelationIDSales extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
new file mode 100644
index 0000000..7fb9cb9
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceAppCorrelationIDStaticPrefix", 
+            portName = "HelloWorldPortAppCorrelationIDStaticPrefixEng",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
new file mode 100644
index 0000000..2e2eb1b
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceAppCorrelationIDStaticPrefix", 
+            portName = "HelloWorldPortAppCorrelationIDStaticPrefixSales",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
new file mode 100644
index 0000000..93f7d0c
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceRuntimeCorrelationIDDynamicPrefix", 
+            portName = "HelloWorldPortRuntimeCorrelationIDDynamicPrefix",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix extends TwoWayJMSImplBase {    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/95caaa87/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
new file mode 100644
index 0000000..6949d98
--- /dev/null
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/shared/GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jms.shared;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.systest.jms.TwoWayJMSImplBase;
+
+
+
+@WebService(serviceName = "HelloWorldServiceRuntimeCorrelationIDStaticPrefix", 
+            portName = "HelloWorldPortRuntimeCorrelationIDStaticPrefixEng",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng extends TwoWayJMSImplBase {    
+    
+}


Mime
View raw message