cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1347011 [1/2] - in /cxf/branches/2.5.x-fixes/systests/transport-jms: ./ src/test/java/org/apache/cxf/jms/testsuite/services/ src/test/java/org/apache/cxf/jms/testsuite/testcases/ src/test/java/org/apache/cxf/jms/testsuite/util/ src/test/ja...
Date Wed, 06 Jun 2012 17:57:39 GMT
Author: dkulp
Date: Wed Jun  6 17:57:38 2012
New Revision: 1347011

URL: http://svn.apache.org/viewvc?rev=1347011&view=rev
Log:
Merged revisions 1346928 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1346928 | dkulp | 2012-06-06 10:58:42 -0400 (Wed, 06 Jun 2012) | 3 lines

  Bunch of jms systest cleanups to use in-vm brokers and servers
  Also allows for forkmode once

........

Removed:
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/AbstractSOAPJMSTestSuite.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GzipServer.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Soap12Server.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/Server.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/Server.java
Modified:
    cxf/branches/2.5.x-fixes/systests/transport-jms/pom.xml
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/services/Server.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplQueueOneWay.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTopicOneWay.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSMTOMImpl.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/swa/ClientServerSwaTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/GreeterImplWithTransaction.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/JMSTransactionClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/pom.xml?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/pom.xml Wed Jun  6 17:57:38 2012
@@ -32,10 +32,6 @@
     <version>2.5.5-SNAPSHOT</version>
     <url>http://cxf.apache.org</url>
 
-    <properties>
-        <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
-    </properties>
-
     <build>
         <plugins>
             <plugin>

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/services/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/services/Server.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/services/Server.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/services/Server.java Wed Jun  6 17:57:38 2012
@@ -18,96 +18,106 @@
  */
 package org.apache.cxf.jms.testsuite.services;
 
+import java.util.LinkedList;
+import java.util.List;
+
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.jms.testsuite.util.JMSTestUtil;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
-
+    List<Endpoint> endpoints = new LinkedList<Endpoint>();
     protected void run() {
+        setBus(BusFactory.getDefaultBus());
         Test0001Impl t0001 = new Test0001Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0001").getAddress().trim(), t0001);
-        
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0001").getAddress().trim(), t0001));        
         Test0101Impl t0101 = new Test0101Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0101").getAddress().trim(), t0101);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0101").getAddress().trim(), t0101));
 
         Test0003Impl t0003 = new Test0003Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0003").getAddress().trim(), t0003);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0003").getAddress().trim(), t0003));
         
         Test0005Impl t0005 = new Test0005Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0005").getAddress().trim(), t0005);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0005").getAddress().trim(), t0005));
         
         Test0006Impl t0006 = new Test0006Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0006").getAddress().trim(), t0006);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0006").getAddress().trim(), t0006));
         
         Test0008Impl t0008 = new Test0008Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0008").getAddress().trim(), t0008);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0008").getAddress().trim(), t0008));
         
         Test0009Impl t0009 = new Test0009Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0009").getAddress().trim(), t0009);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0009").getAddress().trim(), t0009));
         
         Test0010Impl t0010 = new Test0010Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0010").getAddress().trim(), t0010);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0010").getAddress().trim(), t0010));
         
         Test0011Impl t0011 = new Test0011Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0011").getAddress().trim(), t0011);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0011").getAddress().trim(), t0011));
         
         Test0012Impl t0012 = new Test0012Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0012").getAddress().trim(), t0012);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0012").getAddress().trim(), t0012));
         
         Test0013Impl t0013 = new Test0013Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0013").getAddress().trim(), t0013);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0013").getAddress().trim(), t0013));
         
         Test0014Impl t0014 = new Test0014Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test0014").getAddress().trim(), t0014);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test0014").getAddress().trim(), t0014));
         
         Test1001Impl t1001 = new Test1001Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1001").getAddress().trim(), t1001);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1001").getAddress().trim(), t1001));
         
         Test1002Impl t1002 = new Test1002Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1002").getAddress().trim(), t1002);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1002").getAddress().trim(), t1002));
         
         Test1003Impl t1003 = new Test1003Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1003").getAddress().trim(), t1003);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1003").getAddress().trim(), t1003));
         
         Test1004Impl t1004 = new Test1004Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1004").getAddress().trim(), t1004);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1004").getAddress().trim(), t1004));
         
         Test1006Impl t1006 = new Test1006Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1006").getAddress().trim(), t1006);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1006").getAddress().trim(), t1006));
         
         Test1007Impl t1007 = new Test1007Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1007").getAddress().trim(), t1007);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1007").getAddress().trim(), t1007));
         
         Test1008Impl t1008 = new Test1008Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1008").getAddress().trim(), t1008);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1008").getAddress().trim(), t1008));
         
         Test1101Impl t1101 = new Test1101Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1101").getAddress().trim(), t1101);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1101").getAddress().trim(), t1101));
         
         Test1102Impl t1102 = new Test1102Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1102").getAddress().trim(), t1102);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1102").getAddress().trim(), t1102));
         
         Test1103Impl t1103 = new Test1103Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1103").getAddress().trim(), t1103);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1103").getAddress().trim(), t1103));
         
         Test1104Impl t1104 = new Test1104Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1104").getAddress().trim(), t1104);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1104").getAddress().trim(), t1104));
         
         Test1105Impl t1105 = new Test1105Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1105").getAddress().trim(), t1105);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1105").getAddress().trim(), t1105));
         
         Test1106Impl t1106 = new Test1106Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1106").getAddress().trim(), t1106);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1106").getAddress().trim(), t1106));
         
         Test1107Impl t1107 = new Test1107Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1107").getAddress().trim(), t1107);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1107").getAddress().trim(), t1107));
         
         Test1108Impl t1108 = new Test1108Impl();
-        Endpoint.publish(JMSTestUtil.getTestCase("test1108").getAddress().trim(), t1108);
+        endpoints.add(Endpoint.publish(JMSTestUtil.getTestCase("test1108").getAddress().trim(), t1108));
     }
 
+    public void tearDown() {
+        for (Endpoint ep : endpoints) {
+            ep.stop();
+        }
+        endpoints.clear();
+    }
     public static void main(String[] args) {
         try {
             Server s = new Server();

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java Wed Jun  6 17:57:38 2012
@@ -19,15 +19,23 @@
 
 package org.apache.cxf.jms.testsuite.testcases;
 
+import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
-import java.util.HashMap;
+import java.net.URL;
 import java.util.Map;
 
 import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceException;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.jms.testsuite.services.Server;
 import org.apache.cxf.jms.testsuite.util.JMSTestUtil;
 import org.apache.cxf.jms_simple.JMSSimplePortType;
@@ -48,36 +56,49 @@ import org.apache.cxf.jms_simple.JMSSimp
 import org.apache.cxf.jms_simple.JMSSimpleService1101;
 import org.apache.cxf.jms_simple.JMSSimpleService1105;
 import org.apache.cxf.jms_simple.JMSSimpleService1109;
+import org.apache.cxf.testsuite.testcase.MessagePropertiesType;
 import org.apache.cxf.testsuite.testcase.TestCaseType;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+import org.apache.cxf.transport.jms.JMSConfiguration;
 import org.apache.cxf.transport.jms.JMSConstants;
+import org.apache.cxf.transport.jms.JMSFactory;
 import org.apache.cxf.transport.jms.JMSMessageHeadersType;
+import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
 
+import org.junit.After;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jms.core.MessageCreator;
+
+
 /**
  * 
  */
-public class SOAPJMSTestSuiteTest extends AbstractSOAPJMSTestSuite {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+public class SOAPJMSTestSuiteTest extends AbstractBusClientServerTestBase {
+    static EmbeddedJMSBrokerLauncher broker;
+    
+    java.io.Closeable closeable;
     
     @BeforeClass
     public static void startServers() throws Exception {
-        Map<String, String> props = new HashMap<String, String>();
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix", 
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
-        }
-        props.put("java.util.logging.config.file", System
-            .getProperty("java.util.logging.config.file"));
-        assertTrue("server did not launch correctly", launchServer(EmbeddedJMSBrokerLauncher.class,
-                                                                   props, null));
-        assertTrue("server did not launch correctly", launchServer(Server.class, false));
+        broker = new EmbeddedJMSBrokerLauncher("vm://SOAPJMSTestSuiteTest");
+        launchServer(broker);
+        assertTrue("server did not launch correctly", launchServer(Server.class, true));
         createStaticBus();
     }
+    @After
+    public void close() throws Exception {
+        if (closeable != null) {
+            closeable.close();
+            closeable = null;
+        }
+    }
     
     private void oneWayTest(TestCaseType testcase, JMSSimplePortType port) throws Exception {
+        closeable = (java.io.Closeable)port;
         InvocationHandler handler = Proxy.getInvocationHandler(port);
         BindingProvider bp = (BindingProvider)handler;
 
@@ -106,6 +127,7 @@ public class SOAPJMSTestSuiteTest extend
     private void twoWayTestWithRequestHeader(TestCaseType testcase, final JMSSimplePortType port,
                                              JMSMessageHeadersType requestHeader)
         throws Exception {
+        closeable = (java.io.Closeable)port;
         InvocationHandler handler = Proxy.getInvocationHandler(port);
         BindingProvider bp = (BindingProvider)handler;
 
@@ -453,4 +475,205 @@ public class SOAPJMSTestSuiteTest extend
         }
     }
 
+    
+    
+    
+    
+    public <T1, T2> T2 getPort(String serviceName, String portName, Class<T1> serviceClass,
+                               Class<T2> portTypeClass) throws Exception {
+        String namespace = "http://cxf.apache.org/jms_simple";
+        QName qServiceName = new QName(namespace, serviceName);
+        QName qPortName = new QName(namespace, portName);
+        URL wsdl = getClass().getResource("/wsdl/jms_spec_testsuite.wsdl");
+        String wsdlString = wsdl.toString();
+        broker.updateWsdl(getBus(), wsdlString);
+        BusFactory.setThreadDefaultBus(getBus());
+        BusFactory.setDefaultBus(getBus());
+        Class<? extends Service> svcls = serviceClass.asSubclass(Service.class);
+
+        Constructor<? extends Service> serviceConstructor = svcls.getConstructor(URL.class,
+                                                                                 QName.class);
+        Service service = serviceConstructor.newInstance(new Object[] {
+            wsdl, qServiceName
+        });
+        broker.updateWsdl(getBus(), wsdlString);
+        return service.getPort(qPortName, portTypeClass);
+    }
+
+    public void checkJMSProperties(Message message, MessagePropertiesType messageProperties)
+        throws JMSException {
+        // todo messagetype
+        // todo messageid
+        if (messageProperties.isSetDeliveryMode()) {
+            assertEquals(message.getJMSDeliveryMode(), messageProperties.getDeliveryMode()
+                .intValue());
+        }
+        if (messageProperties.isSetPriority()) {
+            assertEquals(message.getJMSPriority(), messageProperties.getPriority().intValue());
+        }
+        if (messageProperties.isSetExpiration()) {
+            assertEquals(message.getJMSExpiration(), messageProperties.getExpiration().intValue());
+        }
+        if (messageProperties.isSetReplyTo() && !messageProperties.getReplyTo().trim().equals("")) {
+            assertEquals(message.getJMSReplyTo().toString(), messageProperties.getReplyTo());
+        }
+        if (messageProperties.isSetCorrelationID()
+            && !messageProperties.getCorrelationID().trim().equals("")) {
+            assertEquals(message.getJMSCorrelationID(), messageProperties.getCorrelationID());
+        }
+        if (messageProperties.isSetDestination()
+            && !messageProperties.getDestination().trim().equals("")) {
+            assertEquals(message.getJMSDestination().toString(), messageProperties.getDestination());
+        }
+        if (messageProperties.isSetRedelivered()) {
+            assertEquals(message.getJMSRedelivered(), messageProperties.isRedelivered());
+        }
+        if (messageProperties.isSetBindingVersion()
+            && !messageProperties.getBindingVersion().trim().equals("")) {
+            assertEquals(message.getStringProperty(JMSSpecConstants.BINDINGVERSION_FIELD),
+                         messageProperties.getBindingVersion());
+        }
+        if (messageProperties.isSetTargetService()
+            && !messageProperties.getTargetService().trim().equals("")) {
+            assertEquals(message.getStringProperty(JMSSpecConstants.TARGETSERVICE_FIELD),
+                         messageProperties.getTargetService());
+        }
+        if (messageProperties.isSetContentType()
+            && !messageProperties.getContentType().trim().equals("")) {
+            assertEquals(message.getStringProperty(JMSSpecConstants.CONTENTTYPE_FIELD),
+                         messageProperties.getContentType());
+        }
+        if (messageProperties.isSetSoapAction()
+            && !messageProperties.getSoapAction().trim().equals("")) {
+            assertEquals(message.getStringProperty(JMSSpecConstants.SOAPACTION_FIELD),
+                         messageProperties.getSoapAction());
+        }
+        if (messageProperties.isSetRequestURI()
+            && !messageProperties.getRequestURI().trim().equals("")) {
+            assertEquals(message.getStringProperty(JMSSpecConstants.REQUESTURI_FIELD),
+                         messageProperties.getRequestURI().trim());
+        }
+        if (messageProperties.isSetIsFault()) {
+            assertEquals(message.getBooleanProperty(JMSSpecConstants.ISFAULT_FIELD),
+                         messageProperties.isIsFault());
+        }
+        // todo messagebody
+    }
+
+    public void checkJMSProperties(TestCaseType testcase, JMSMessageHeadersType requestHeader)
+        throws JMSException {
+        if (testcase.getRequestMessage() != null) {
+            checkJMSProperties(testcase.getRequestMessage(), requestHeader);
+        }
+    }
+
+    public void checkJMSProperties(TestCaseType testcase, JMSMessageHeadersType requestHeader,
+                                   JMSMessageHeadersType responseHeader) throws JMSException {
+        if (testcase.getRequestMessage() != null) {
+            checkJMSProperties(testcase.getRequestMessage(), requestHeader);
+        }
+        if (testcase.getResponseMessage() != null) {
+            checkJMSProperties(testcase.getResponseMessage(), responseHeader);
+        }
+        if (requestHeader.getJMSCorrelationID() != null) {
+            assertEquals(requestHeader.getJMSCorrelationID(), responseHeader.getJMSCorrelationID());
+        } else {
+            assertEquals(requestHeader.getJMSMessageID(), responseHeader.getJMSCorrelationID());
+        }
+    }
+
+    private void checkJMSProperties(MessagePropertiesType messageProperties,
+                                    JMSMessageHeadersType header) {
+        // todo messagetype
+        // todo messageid
+        if (messageProperties.isSetDeliveryMode()) {
+            int dm = 0;
+            if (header.isSetJMSDeliveryMode()) {
+                dm = header.getJMSDeliveryMode();
+            }
+            assertEquals(dm, 
+                         messageProperties.getDeliveryMode().intValue());
+        }
+        if (messageProperties.isSetPriority()) {
+            assertEquals(header.getJMSPriority(), messageProperties.getPriority().intValue());
+        }
+        /*
+         * if (messageProperties.isSetExpiration()) { assertEquals(header.getJMSExpiration(),
+         * messageProperties.getExpiration().intValue()); }
+         */
+        /*
+         * if (messageProperties.isSetReplyTo() && !messageProperties.getReplyTo().trim().equals("")) {
+         * assertEquals(header.getJMSReplyTo().toString(), messageProperties.getReplyTo()); }
+         */
+        // correlationid
+        /*
+         * if (messageProperties.isSetDestination() && !messageProperties.getDestination().trim().equals(""))
+         * { assertEquals(header.get.toString(), messageProperties.getDestination()); }
+         */
+        if (messageProperties.isSetBindingVersion()
+            && !messageProperties.getBindingVersion().trim().equals("")) {
+            assertEquals(header.getSOAPJMSBindingVersion(), messageProperties.getBindingVersion());
+        }
+        if (messageProperties.isSetTargetService()
+            && !messageProperties.getTargetService().trim().equals("")) {
+            assertEquals(header.getSOAPJMSTargetService(), messageProperties.getTargetService());
+        }
+        if (messageProperties.isSetContentType()
+            && !messageProperties.getContentType().trim().equals("")) {
+            assertEquals(header.getSOAPJMSContentType(), messageProperties.getContentType());
+        }
+        if (messageProperties.isSetSoapAction()
+            && !messageProperties.getSoapAction().trim().equals("")) {
+            assertEquals(header.getSOAPJMSSOAPAction(), messageProperties.getSoapAction());
+        }
+        if (messageProperties.isSetRequestURI()
+            && !messageProperties.getRequestURI().trim().equals("")) {
+            assertEquals(header.getSOAPJMSRequestURI(), messageProperties.getRequestURI().trim());
+        }
+        if (messageProperties.isSetIsFault()) {
+            assertEquals(header.isSOAPJMSIsFault(), messageProperties.isIsFault());
+        }
+        // todo messagebody
+    }
+    
+    public void twoWayTestWithCreateMessage(final TestCaseType testcase) throws Exception {
+        String address = testcase.getAddress();
+        JMSConfiguration jmsConfig = JMSTestUtil.getInitJMSConfiguration(address);
+        final JmsTemplate jmsTemplate = JMSFactory.createJmsTemplate(jmsConfig, null);
+        
+        final Destination replyToDestination = JMSFactory.resolveOrCreateDestination(jmsTemplate,
+                                                                                     null, false);
+        class JMSConduitMessageCreator implements MessageCreator {
+            private javax.jms.Message jmsMessage;
+
+            public javax.jms.Message createMessage(Session session) throws JMSException {
+                jmsMessage = JMSTestUtil.buildJMSMessageFromTestCase(testcase, session, replyToDestination);
+                return jmsMessage;
+            }
+
+            public String getMessageID() {
+                if (jmsMessage != null) {
+                    try {
+                        return jmsMessage.getJMSMessageID();
+                    } catch (JMSException e) {
+                        return null;
+                    }
+                }
+                return null;
+            }
+        }
+        JMSConduitMessageCreator messageCreator = new JMSConduitMessageCreator();    
+
+        jmsTemplate.send(jmsConfig.getTargetDestination(), messageCreator);
+        String messageId = messageCreator.getMessageID();
+
+        String messageSelector = "JMSCorrelationID = '" + messageId + "'";
+        javax.jms.Message replyMessage = jmsTemplate.receiveSelected(replyToDestination,
+                                                                     messageSelector);
+        checkReplyMessage(replyMessage, testcase);
+    }
+
+    private void checkReplyMessage(Message replyMessage, TestCaseType testcase) throws JMSException {
+        checkJMSProperties(replyMessage, testcase.getResponseMessage());
+    }    
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java Wed Jun  6 17:57:38 2012
@@ -37,7 +37,6 @@ import javax.xml.bind.Unmarshaller;
 import org.apache.cxf.testsuite.testcase.MessagePropertiesType;
 import org.apache.cxf.testsuite.testcase.TestCaseType;
 import org.apache.cxf.testsuite.testcase.TestCasesType;
-import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.JMSConfiguration;
 import org.apache.cxf.transport.jms.JMSFactory;
 import org.apache.cxf.transport.jms.JMSOldConfigHolder;
@@ -99,7 +98,7 @@ public final class JMSTestUtil {
                 if (idx != -1) {
                     int idx2 = add.indexOf("&", idx);
                     add = add.substring(0, idx)
-                        + "jndiURL=tcp://localhost:" + EmbeddedJMSBrokerLauncher.PORT
+                        + "jndiURL=vm://SOAPJMSTestSuiteTest"
                         + (idx2 == -1 ? "" : add.substring(idx2));
                     tct.setAddress(add);
                 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java Wed Jun  6 17:57:38 2012
@@ -25,17 +25,17 @@ import org.apache.hello_world_doc_lit.ty
 public class GreeterImplDocBase implements Greeter {
 
     public String sayHi() {
-        System.out.println("Call sayHi here ");
+        //System.out.println("Call sayHi here ");
         return "Bonjour";
     }
 
     public String greetMe(String requestType) {
-        System.out.println("Reached here :" + requestType);
+        //System.out.println("Reached here :" + requestType);
         return "Hello " + requestType;
     }
 
     public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);        
+        //System.out.println("*********  greetMeOneWay: " + requestType);        
     }
 
     public void pingMe() throws PingMeFault {

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplQueueOneWay.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplQueueOneWay.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplQueueOneWay.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplQueueOneWay.java Wed Jun  6 17:57:38 2012
@@ -32,7 +32,7 @@ import org.apache.cxf.hello_world_jms.He
 public class GreeterImplQueueOneWay implements HelloWorldOneWayPort {
 
     public void greetMeOneWay(String stringParam0) {
-        System.out.println("*********  greetMeOneWay: " + stringParam0);
+        //System.out.println("*********  greetMeOneWay: " + stringParam0);
 
     }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTopicOneWay.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTopicOneWay.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTopicOneWay.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterImplTopicOneWay.java Wed Jun  6 17:57:38 2012
@@ -30,6 +30,6 @@ import org.apache.cxf.hello_world_jms.He
 public class GreeterImplTopicOneWay implements HelloWorldPubSubPort {
 
     public void greetMeOneWay(String stringParam0) {
-        System.out.println("*********  greetMeOneWay: " + stringParam0);
+        //System.out.println("*********  greetMeOneWay: " + stringParam0);
     }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java Wed Jun  6 17:57:38 2012
@@ -27,18 +27,18 @@ import org.apache.cxf.jms_greeter.JMSGre
 public class GreeterSpecImpl implements JMSGreeterPortType {
 
     public String greetMe(String me) {
-        System.out.println("Executing operation greetMe");
-        System.out.println("Message received: " + me + "\n");
+        //System.out.println("Executing operation greetMe");
+        //System.out.println("Message received: " + me + "\n");
         return "Hello " + me;
     }
 
     public String sayHi() {
-        System.out.println("Executing operation sayHi" + "\n");
+        //System.out.println("Executing operation sayHi" + "\n");
         return "Bonjour";
     }
     
     public void greetMeOneWay(String me) {
-        System.out.println("Executing operation greetMeOneWay\n");
-        System.out.println("Hello there " + me);
+        //System.out.println("Executing operation greetMeOneWay\n");
+        //System.out.println("Hello there " + me);
     }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java Wed Jun  6 17:57:38 2012
@@ -28,18 +28,18 @@ import org.apache.cxf.jms_greeter.JMSGre
 public class GreeterSpecWithPortError implements JMSGreeterPortType {
 
     public String greetMe(String me) {
-        System.out.println("Executing operation greetMe");
-        System.out.println("Message received: " + me + "\n");
+        //System.out.println("Executing operation greetMe");
+        //System.out.println("Message received: " + me + "\n");
         return "Hello " + me;
     }
 
     public String sayHi() {
-        System.out.println("Executing operation sayHi" + "\n");
+        //System.out.println("Executing operation sayHi" + "\n");
         return "Bonjour";
     }
     
     public void greetMeOneWay(String me) {
-        System.out.println("Executing operation greetMeOneWay\n");
-        System.out.println("Hello there " + me);
+        //System.out.println("Executing operation greetMeOneWay\n");
+        //System.out.println("Hello there " + me);
     }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerGzipTest.java Wed Jun  6 17:57:38 2012
@@ -20,11 +20,10 @@ package org.apache.cxf.systest.jms;
 
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -33,6 +32,7 @@ import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.AddressType;
 import org.apache.cxf.transport.jms.JMSNamingPropertyType;
@@ -44,33 +44,40 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JMSClientServerGzipTest extends AbstractBusClientServerTestBase {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
-    static final String PORT = GzipServer.PORT;
+    public static final String PORT = allocatePort(GzipServer.class);
     
+    static EmbeddedJMSBrokerLauncher broker;
     private String wsdlString;
     
+    
+    public static class GzipServer extends AbstractBusTestServerBase {
+        Endpoint ep;
+        protected void run()  {
+            Object impleDoc = new GreeterImplDoc();
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus("org/apache/cxf/systest/jms/gzipBus.xml");
+            BusFactory.setDefaultBus(bus);
+            setBus(bus);
+            broker.updateWsdl(bus, "testutils/hello_world_doc_lit.wsdl");
+            ep = Endpoint.publish(null, impleDoc);
+        }
+        public void tearDown() {
+            ep.stop();
+        }
+    }
     @BeforeClass
     public static void startServers() throws Exception {
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix",
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
-        }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
+        broker = new EmbeddedJMSBrokerLauncher("vm://" + JMSClientServerGzipTest.class.getSimpleName());
+        launchServer(broker);
         assertTrue("server did not launch correctly", 
-                   launchServer(GzipServer.class));
+                   launchServer(GzipServer.class, true));
         
     }
     
     public URL getWSDLURL(String s) throws Exception {
         URL u = getClass().getResource(s);
         wsdlString = u.toString().intern();
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+        broker.updateWsdl(getBus(), wsdlString);
         System.gc();
         System.gc();
         return u;
@@ -131,8 +138,8 @@ public class JMSClientServerGzipTest ext
                 } catch (PingMeFault ex) {
                     assertNotNull(ex.getFaultInfo());
                 }
-
             }
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerSoap12Test.java Wed Jun  6 17:57:38 2012
@@ -20,11 +20,10 @@ package org.apache.cxf.systest.jms;
 
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -33,6 +32,7 @@ import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.jms.AddressType;
 import org.apache.cxf.transport.jms.JMSNamingPropertyType;
@@ -44,32 +44,39 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JMSClientServerSoap12Test extends AbstractBusClientServerTestBase {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
     static final String PORT = Soap12Server.PORT;
     
+    static EmbeddedJMSBrokerLauncher broker;
+
     private String wsdlString;
     
-    @BeforeClass
-    public static void startServers() throws Exception {
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix",
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+    public static class Soap12Server extends AbstractBusTestServerBase {
+        public static final String PORT = allocatePort(Soap12Server.class);
+       
+        protected void run()  {
+            Object impleDoc = new GreeterImplSoap12();
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus("org/apache/cxf/systest/jms/soap12Bus.xml");
+            BusFactory.setDefaultBus(bus);
+            setBus(bus);
+            broker.updateWsdl(bus, "testutils/hello_world_doc_lit.wsdl");
+            Endpoint.publish(null, impleDoc);
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+    }
 
+    
+    
+    @BeforeClass
+    public static void startServers() throws Exception {
+        broker = new EmbeddedJMSBrokerLauncher("vm://JMSClientServerSoap12Test");
         assertTrue("server did not launch correctly", 
-                   launchServer(Soap12Server.class));
+                   launchServer(Soap12Server.class, true));
     }
     
     public URL getWSDLURL(String s) throws Exception {
         URL u = getClass().getResource(s);
         wsdlString = u.toString().intern();
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+        broker.updateWsdl(getBus(), wsdlString);
         System.gc();
         System.gc();
         return u;

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Wed Jun  6 17:57:38 2012
@@ -23,7 +23,6 @@ import java.lang.reflect.UndeclaredThrow
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
@@ -102,36 +101,23 @@ import org.springframework.jms.support.d
 import org.springframework.jndi.JndiTemplate;
 
 public class JMSClientServerTest extends AbstractBusClientServerTestBase {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
     static final String PORT = Server.PORT;
     
+    static EmbeddedJMSBrokerLauncher broker;
     private String wsdlString;
     
     @BeforeClass
     public static void startServers() throws Exception {
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix",
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
-        }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
-        assertTrue("server did not launch correctly", 
-                   launchServer(Server.class, false));
+        broker = new EmbeddedJMSBrokerLauncher("vm://JMSClientServerTest");
+        launchServer(broker);
+        launchServer(new Server(broker));
         createStaticBus();
-        
     }
     
     public URL getWSDLURL(String s) throws Exception {
         URL u = getClass().getResource(s);
         wsdlString = u.toString().intern();
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
-        System.gc();
-        System.gc();
+        broker.updateWsdl(getBus(), wsdlString);
         return u;
     }
     public QName getServiceName(QName q) {
@@ -191,6 +177,8 @@ public class JMSClientServerTest extends
                     assertNotNull(ex.getFaultInfo());
                 }
             }
+            
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -234,6 +222,7 @@ public class JMSClientServerTest extends
                 }                
               
             }
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -342,12 +331,11 @@ public class JMSClientServerTest extends
         assertEquals(count, countDone);
         */
         
+        ((java.io.Closeable)greeter).close();
         greeter = null;
         service = null;
         
         System.gc();
-        System.gc();
-        System.gc();
     }
     
     @Test
@@ -391,6 +379,7 @@ public class JMSClientServerTest extends
                 } 
                 
             }
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -420,6 +409,7 @@ public class JMSClientServerTest extends
                 assertNotNull("no response received from service", reply);
                 assertEquals(response2, reply);
             }
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -444,6 +434,7 @@ public class JMSClientServerTest extends
             }
             //Give some time to complete one-way calls.
             Thread.sleep(50L);
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -468,6 +459,7 @@ public class JMSClientServerTest extends
             }
             //Give some time to complete one-way calls.
             Thread.sleep(50L);
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -482,8 +474,7 @@ public class JMSClientServerTest extends
             new ClassPathXmlApplicationContext(
                 new String[] {"/org/apache/cxf/systest/jms/JMSClients.xml"});
         String wsdlString2 = "classpath:wsdl/jms_test.wsdl";
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors((Bus)ctx.getBean("cxf"),
-                                                          wsdlString2);
+        broker.updateWsdl((Bus)ctx.getBean("cxf"), wsdlString2);
         HelloWorldPortType greeter = (HelloWorldPortType)ctx.getBean("jmsRPCClient");
         assertNotNull(greeter);
         
@@ -551,6 +542,7 @@ public class JMSClientServerTest extends
             }
             //Give some time to complete one-way calls.
             Thread.sleep(100L);
+            ((java.io.Closeable)greeter).close();
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();
         }
@@ -566,8 +558,8 @@ public class JMSClientServerTest extends
         assertNotNull(wsdl);
         String wsdlString2 = wsdl.toString();
         String wsdlString3 = "testutils/jms_test.wsdl";
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString2);
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString3);
+        broker.updateWsdl(getBus(), wsdlString2);
+        broker.updateWsdl(getBus(), wsdlString3);
         
 
         HelloWorldQueueDecoupledOneWaysService service = 
@@ -617,6 +609,7 @@ public class JMSClientServerTest extends
                 }
             }
             assertEquals(expectedReply, reply);
+            ((java.io.Closeable)greeter).close();
         } catch (Exception ex) {
             throw ex;
         } finally {
@@ -638,7 +631,7 @@ public class JMSClientServerTest extends
         URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         assertNotNull(wsdl);
         String wsdlString2 = "testutils/jms_test.wsdl";
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString2);
+        broker.updateWsdl(getBus(), wsdlString2);
 
         HelloWorldQueueDecoupledOneWaysService service = 
             new HelloWorldQueueDecoupledOneWaysService(wsdl, serviceName);
@@ -676,6 +669,7 @@ public class JMSClientServerTest extends
                     fail("The decoupled one-way reply was sent");
                 }
             }
+            ((java.io.Closeable)greeter).close();
         } catch (Exception ex) {
             throw ex;
         } finally {
@@ -1204,8 +1198,8 @@ public class JMSClientServerTest extends
         String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
-            + JMS_PORT;
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=" 
+            + broker.getBrokerURL();
         if (messageType != null) {
             address = address + "&messageType=" + messageType;
         }
@@ -1258,7 +1252,7 @@ public class JMSClientServerTest extends
     public void testReplyToConfig() throws Exception {
         JMSEndpoint endpoint = new JMSEndpoint();
         endpoint.setJndiInitialContextFactory("org.apache.activemq.jndi.ActiveMQInitialContextFactory");
-        endpoint.setJndiURL("tcp://localhost:" + JMS_PORT);
+        endpoint.setJndiURL(broker.getBrokerURL());
         endpoint.setJndiConnectionFactoryName("ConnectionFactory");
 
         final JMSConfiguration jmsConfig = new JMSConfiguration();        

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSMTOMImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSMTOMImpl.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSMTOMImpl.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSMTOMImpl.java Wed Jun  6 17:57:38 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.cxf.systest.jms;
 
-import java.io.IOException;
-
 import javax.activation.DataHandler;
 import javax.jws.WebService;
 import javax.xml.ws.Holder;
@@ -34,6 +32,7 @@ import org.apache.cxf.jms_mtom.JMSMTOMPo
 public class JMSMTOMImpl implements JMSMTOMPortType {
 
     public void testDataHandler(Holder<String> name, Holder<DataHandler> attachinfo) {
+        /*
         System.out.println(name.value);
         try {
             System.out.println(attachinfo.value.getInputStream().available());
@@ -41,5 +40,6 @@ public class JMSMTOMImpl implements JMSM
             e.printStackTrace();
         }
         System.out.println("TestDataHandler End");
+        */
     }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java Wed Jun  6 17:57:38 2012
@@ -32,9 +32,7 @@ import org.apache.cxf.hello_world_jms.He
 public class JmsDestPubSubImpl implements HelloWorldPubSubPort {
 
     public void greetMeOneWay(String stringParam0) {
-        // TODO Auto-generated method stub
-        System.out.println("*********  greetMeOneWay: " + stringParam0);
-
+        //System.out.println("*********  greetMeOneWay: " + stringParam0);
     }
 
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/Server.java Wed Jun  6 17:57:38 2012
@@ -33,6 +33,11 @@ import org.apache.cxf.transport.jms.spec
 public class Server extends AbstractBusTestServerBase {
     public static final String PORT = allocatePort(Server.class);
     
+    EmbeddedJMSBrokerLauncher broker;
+    public Server(EmbeddedJMSBrokerLauncher b) {
+        broker = b;
+    }
+    
     protected void run()  {
         Object implementor = new GreeterImplTwoWayJMS();
         Object impl2 =  new GreeterImplQueueOneWay();
@@ -53,10 +58,11 @@ public class Server extends AbstractBusT
         Object mtom = new JMSMTOMImpl();
         
         Bus bus = BusFactory.getDefaultBus();
+        setBus(bus);
         
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/hello_world_doc_lit.wsdl");
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/jms_test.wsdl");
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, "testutils/jms_test_mtom.wsdl");
+        broker.updateWsdl(bus, "testutils/hello_world_doc_lit.wsdl");
+        broker.updateWsdl(bus, "testutils/jms_test.wsdl");
+        broker.updateWsdl(bus, "testutils/jms_test_mtom.wsdl");
         
         Endpoint.publish(null, impleDoc);
         String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
@@ -83,16 +89,16 @@ public class Server extends AbstractBusT
         String address1 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue2"
                          + "?jndiInitialContextFactory"
                          + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-                         + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
-                         + EmbeddedJMSBrokerLauncher.PORT;
+                         + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
+                         + broker.getBrokerURL();
         Endpoint.publish(address1, spec1);
         
         Object spec2 = new GreeterSpecWithPortError();
         String address2 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue5"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
-            + EmbeddedJMSBrokerLauncher.PORT;
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
+            + broker.getBrokerURL();
         Endpoint.publish(address2, spec2);
         
         initNoWsdlServer();
@@ -106,8 +112,8 @@ public class Server extends AbstractBusT
         String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
             + "?jndiInitialContextFactory"
             + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:"
-            + EmbeddedJMSBrokerLauncher.PORT;
+            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
+            +  broker.getBrokerURL();
         Hello implementor = new HelloImpl();
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
         svrFactory.setServiceClass(Hello.class);
@@ -118,15 +124,4 @@ public class Server extends AbstractBusT
     }
 
 
-    public static void main(String[] args) {
-        try {
-            Server s = new Server();
-            s.start();
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            System.exit(-1);
-        } finally {
-            System.out.println("done!");
-        }
-    }
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java Wed Jun  6 17:57:38 2012
@@ -52,18 +52,18 @@ public class TwoWayJMSImplBase implement
         }
         
         MessageContext mc = wsContext.getMessageContext();
-        JMSMessageHeadersType headers =
-            (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_REQUEST_HEADERS);
-        System.out.println("get the message headers JMSCorrelationID: " + headers.getJMSCorrelationID());
-        System.out.println("Reached here :" + me);
+        //JMSMessageHeadersType headers =
+        //    (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_REQUEST_HEADERS);
+        //System.out.println("get the message headers JMSCorrelationID: " + headers.getJMSCorrelationID());
+        //System.out.println("Reached here :" + me);
         
         // set reply header custom property
         JMSPropertyType testProperty = new JMSPropertyType();
         testProperty.setName("Test_Prop");
         testProperty.setValue("some return value "  + me);
         
-        System.out.println("found property in request headers at index: " 
-                           + headers.getProperty().indexOf(testProperty));
+        //System.out.println("found property in request headers at index: " 
+        //                   + headers.getProperty().indexOf(testProperty));
         
         JMSMessageHeadersType responseHeaders =
             (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS);
@@ -77,7 +77,7 @@ public class TwoWayJMSImplBase implement
     }
     
     public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);
+        //System.out.println("*********  greetMeOneWay: " + requestType);
     }
     
     public TestRpcLitFaultResponse testRpcLitFault(String faultType) 

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java Wed Jun  6 17:57:38 2012
@@ -79,7 +79,7 @@ public class GreeterImplWithContinuation
                 if (userObject != null) {
                     sb.append(' ').append(userObject.toString());
                 }
-                System.out.println("Saying hi to " + sb.toString());
+                //System.out.println("Saying hi to " + sb.toString());
                 return "Hi " + sb.toString();
             }
         }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java Wed Jun  6 17:57:38 2012
@@ -19,55 +19,68 @@
 package org.apache.cxf.systest.jms.continuations;
 
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class HelloWorldContinuationsClientServerTest extends AbstractBusClientServerTestBase {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
-    static final String PORT = Server2.PORT;
+    static EmbeddedJMSBrokerLauncher broker;
     
-    private static boolean serversStarted;
     private static final String CONFIG_FILE =
         "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
 
-    @Before
-    public void startServers() throws Exception {
-        if (serversStarted) {
-            return;
-        }
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix", 
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+    
+    public static class Server extends AbstractBusTestServerBase {
+        EmbeddedJMSBrokerLauncher broker;
+        Endpoint ep;
+        public Server(EmbeddedJMSBrokerLauncher b) {
+            broker = b;
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
         
-        assertTrue("server did not launch correctly", 
-                   launchServer(org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher.class, props, null));
+        protected void run()  {
+            setBus(BusFactory.getDefaultBus());
+            broker.updateWsdl(getBus(),
+                              "org/apache/cxf/systest/jms/continuations/test.wsdl");
+            Object implementor = new HelloWorldWithContinuationsJMS();        
+            String address = "jms://";
+            ep = Endpoint.publish(address, implementor);
+        }
+        public void tearDown() {
+            ep.stop();
+            ep = null;
+        }
 
-        assertTrue("server did not launch correctly", 
-                   launchServer(Server2.class, true));
-        serversStarted = true;
     }
-    
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        broker = new EmbeddedJMSBrokerLauncher("vm://HelloWorldContinuationsClientServerTest");
+        System.setProperty("EmbeddedBrokerURL", broker.getBrokerURL());
+        launchServer(broker);
+        launchServer(new Server(broker));
+    }
+    @AfterClass
+    public static void clearProperty() {
+        System.clearProperty("EmbeddedBrokerURL");
+    }
+
     @Test
-    public void testHttpWrappedContinuatuions() throws Exception {
+    public void testHttpWrappedContinuations() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();
         Bus bus = bf.createBus(CONFIG_FILE);
         BusFactory.setDefaultBus(bus);
@@ -94,6 +107,7 @@ public class HelloWorldContinuationsClie
         startSignal.countDown();
         helloDoneSignal.await(60, TimeUnit.SECONDS);
         executor.shutdownNow();
+        ((java.io.Closeable)helloPort).close();
         assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
         bus.shutdown(true);
     }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java Wed Jun  6 17:57:38 2012
@@ -19,50 +19,54 @@
 package org.apache.cxf.systest.jms.continuations;
 
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class HelloWorldContinuationsThrottleTest extends AbstractBusClientServerTestBase {
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static EmbeddedJMSBrokerLauncher broker;
 
-    private static boolean serversStarted;
     private static final String CONFIG_FILE =
         "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+    
+    public static class Server extends AbstractBusTestServerBase {
+        public static final String PORT = allocatePort(Server.class);
 
-    @Before
-    public void startServers() throws Exception {
-        if (serversStarted) {
-            return;
-        }
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix", 
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        protected void run()  {
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus(CONFIG_FILE);
+            BusFactory.setDefaultBus(bus);
+            broker.updateWsdl(bus, "org/apache/cxf/systest/jms/continuations/test2.wsdl");
+            Object implementor = new HelloWorldWithContinuationsJMS2();        
+            String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+            Endpoint.publish(address, implementor);
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
-        assertTrue("server did not launch correctly", 
-                   launchServer(Server3.class));
-        serversStarted = true;
+    }
+    @BeforeClass
+    public static void startServers() throws Exception {
+        broker = new EmbeddedJMSBrokerLauncher("vm://HelloWorldContinuationsThrottleTest");
+        System.setProperty("EmbeddedBrokerURL", broker.getBrokerURL());
+        launchServer(broker);
+        launchServer(new Server());
+    }
+    @AfterClass
+    public static void clearProperty() {
+        System.clearProperty("EmbeddedBrokerURL");
     }
     
     @Test
@@ -75,7 +79,7 @@ public class HelloWorldContinuationsThro
         
         URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test2.wsdl");
         String wsdlString = wsdlURL.toString().intern();
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+        broker.updateWsdl(getBus(), wsdlString);
         HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
         assertNotNull(service);
         final HelloContinuation helloPort = service.getHelloContinuationPort();
@@ -98,8 +102,9 @@ public class HelloWorldContinuationsThro
                 
         helloDoneSignal.await(60, TimeUnit.SECONDS);
         executor.shutdownNow();
-        System.out.println("Completed : " + (5 - helloDoneSignal.getCount()));
         assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+        ((java.io.Closeable)helloPort).close();
+
         bus.shutdown(true);
     }
         

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java Wed Jun  6 17:57:38 2012
@@ -19,47 +19,53 @@
 package org.apache.cxf.systest.jms.continuations;
 
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
+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.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JMSContinuationsClientServerTest extends AbstractBusClientServerTestBase {
-    protected static boolean serversStarted;
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
     static final String PORT = Server.PORT;
+    static EmbeddedJMSBrokerLauncher broker;
 
+    
+    
+    public static class Server extends AbstractBusTestServerBase {
+        public static final String PORT = allocatePort(Server.class);
 
-    @Before
-    public void startServers() throws Exception {
-        if (serversStarted) {
-            return;
-        }
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix",
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        protected void run()  {
+            setBus(BusFactory.getDefaultBus());
+            broker.updateWsdl(getBus(),
+                "testutils/jms_test.wsdl");
+            Object implementor = new GreeterImplWithContinuationsJMS();        
+            String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+            Endpoint.publish(address, implementor);
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
-        assertTrue("server did not launch correctly", 
-                   launchServer(Server.class, false));
-        serversStarted = true;
-        createStaticBus();
     }
     
+    @BeforeClass
+    public static void startServers() throws Exception {
+        broker = new EmbeddedJMSBrokerLauncher("vm://JMSContinuationsClientServerTest");
+        System.setProperty("EmbeddedBrokerURL", broker.getBrokerURL());
+        launchServer(broker);
+        launchServer(new Server());
+        createStaticBus();
+    }
+    @AfterClass
+    public static void clearProperty() {
+        System.clearProperty("EmbeddedBrokerURL");
+    }
+
     public URL getWSDLURL(String s) throws Exception {
         return getClass().getResource(s);
     }
@@ -79,13 +85,15 @@ public class JMSContinuationsClientServe
         URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
         assertNotNull(wsdl);
         String wsdlString = wsdl.toString();
-        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+        broker.updateWsdl(getStaticBus(), wsdlString);
 
         HelloWorldService service = new HelloWorldService(wsdl, serviceName);
         assertNotNull(service);
 
         HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
         assertEquals("Hi Fred Ruby", greeter.greetMe("Fred"));
+        
+        ((java.io.Closeable)greeter).close();
     }
         
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java Wed Jun  6 17:57:38 2012
@@ -19,47 +19,55 @@
 package org.apache.cxf.systest.jms.continuations;
 
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
 
+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.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class ProviderJMSContinuationTest extends AbstractBusClientServerTestBase {
-    protected static boolean serversStarted;
-    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
-    static final String PORT = ProviderServer.PORT;
+    static final String PORT = Server.PORT;
 
+    static EmbeddedJMSBrokerLauncher broker;
+    
+    public static class Server extends AbstractBusTestServerBase {
+        public static final String PORT = allocatePort(Server.class);
 
-    @Before
-    public void startServers() throws Exception {
-        if (serversStarted) {
-            return;
-        }
-        Map<String, String> props = new HashMap<String, String>();                
-        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
-            props.put("org.apache.activemq.default.directory.prefix",
-                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        protected void run()  {
+            setBus(BusFactory.getDefaultBus());
+            broker.updateWsdl(getBus(),
+                "/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+
+            Object implementor = new HWSoapMessageDocProvider();        
+            String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+            Endpoint endpoint = Endpoint.publish(address, implementor);
+            ((EndpointImpl)endpoint).getInInterceptors().add(new IncomingMessageCounterInterceptor());
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
-        
-        assertTrue("server did not launch correctly", 
-                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
-
-        assertTrue("server did not launch correctly", 
-                   launchServer(ProviderServer.class, false));
-        serversStarted = true;
-        createStaticBus();
     }
     
+    @BeforeClass
+    public static void startServers() throws Exception {
+        broker = new EmbeddedJMSBrokerLauncher("vm://ProviderJMSContinuationTest");
+        System.setProperty("EmbeddedBrokerURL", broker.getBrokerURL());
+        launchServer(broker);
+        launchServer(new Server());
+        createStaticBus();
+    }
+    @AfterClass
+    public static void clearProperty() {
+        System.clearProperty("EmbeddedBrokerURL");
+    }
+
     public URL getWSDLURL(String s) throws Exception {
         return getClass().getResource(s);
     }
@@ -73,24 +81,20 @@ public class ProviderJMSContinuationTest
         
     @Test
     public void testProviderContinuation() throws Exception {
-        try {
-            QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
-                                 "HelloWorldService"));
-            QName portName = getPortName(
-                    new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
-            URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
-            assertNotNull(wsdl);
-            String wsdlString = wsdl.toString();
-            EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
-
-            HelloWorldService service = new HelloWorldService(wsdl, serviceName);
-            assertNotNull(service);
-            HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
-            greeter.greetMe("ffang");
-        } catch (Exception ex) {
-            fail("shouldn't get exception here, which is caused by " 
-                    + ex.getMessage());
-        }     
+        QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
+                             "HelloWorldService"));
+        QName portName = getPortName(
+                new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
+        URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+        assertNotNull(wsdl);
+        String wsdlString = wsdl.toString();
+        broker.updateWsdl(getStaticBus(), wsdlString);
+
+        HelloWorldService service = new HelloWorldService(wsdl, serviceName);
+        assertNotNull(service);
+        HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
+        greeter.greetMe("ffang");
+        ((java.io.Closeable)greeter).close();
     }
         
 }

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml Wed Jun  6 17:57:38 2012
@@ -31,17 +31,17 @@ http://www.springframework.org/schema/be
     <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
     
     <jms:conduit name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.jms-conduit">
-      <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
+      <jms:clientConfig clientReceiveTimeout="10000" messageTimeToLive="10000"/>
       <jms:address jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">
                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="${EmbeddedBrokerURL}"/>
                </jms:address>
       <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
     </jms:conduit>
     
    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
-  	p:brokerURL="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+  	p:brokerURL="${EmbeddedBrokerURL}"/>
   
   <bean id="singleConnectionFactory"
     class="org.springframework.jms.connection.SingleConnectionFactory" destroy-method="destroy">
@@ -57,14 +57,14 @@ http://www.springframework.org/schema/be
       <jms:address jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">
                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="${EmbeddedBrokerURL}"/>
                </jms:address>
       <jms:jmsConfig-ref>jmsConf2</jms:jmsConfig-ref>  
   </jms:destination>
 
   <bean id="jmsConf2" class="org.apache.cxf.transport.jms.JMSConfiguration"
   	p:connectionFactory-ref="jmsConnectionFactory"
-  	p:timeToLive="500000"
+  	p:timeToLive="10000"
   	p:concurrentConsumers="1"
   	p:maxConcurrentConsumers="1"
   	p:maxSuspendedContinuations="1"

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl Wed Jun  6 17:57:38 2012
@@ -91,7 +91,7 @@
   <service name="HelloContinuationService">
     <port binding="tns:HelloContinuationServiceSoapBinding" name="HelloContinuationPort">
       <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
-      <jms:serverConfig messageTimeToLive="500000"/>
+      <jms:serverConfig serverReceiveTimeout="500" messageTimeToLive="500000"/>
                <jms:address
                    jndiConnectionFactoryName="ConnectionFactory" 
                    jndiDestinationName="dynamicQueues/test.jmstransport.text">

Modified: cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml?rev=1347011&r1=1347010&r2=1347011&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml Wed Jun  6 17:57:38 2012
@@ -49,7 +49,7 @@ http://www.springframework.org/schema/be
     <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
 	<property name="targetConnectionFactory">
 		<bean class="org.apache.activemq.ActiveMQConnectionFactory">
-			<property name="brokerURL" value="tcp://localhost:61500" />
+			<property name="brokerURL" value="vm://JMSClientServerSoap12Test" />
 		</bean>
 	</property>
     </bean>



Mime
View raw message