cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [1/2] Making jms tests more robust
Date Tue, 04 Mar 2014 12:34:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 30d6e812d -> 979297158


http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/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
index ac88a2f..b50ccd8 100644
--- 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
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.systest.jms;
 
+import java.io.Closeable;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -43,15 +44,14 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JMSSharedQueueTest extends AbstractBusClientServerTestBase {
-//    private static final String BROKER_URI = "vm://SharedQueueTest" 
-//        + "?jms.watchTopicAdvisories=false&broker.persistent=false";
- 
+    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();
+        broker = new EmbeddedJMSBrokerLauncher("tcp://localhost:" + PORT);
         launchServer(broker);
         launchServer(new Server(broker));
         createStaticBus();
@@ -150,18 +150,16 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
     
     @Test
     public void testTwoWayQueueAppCorrelationID() throws Throwable {
-        QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldServiceAppCorrelationID");
-        QName portNameEng = new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPortAppCorrelationIDEng");
-        QName portNameSales = 
-            new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPortAppCorrelationIDSales");
+        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);
-        assertNotNull(service);
+        HelloWorldServiceAppCorrelationID service = new HelloWorldServiceAppCorrelationID(wsdl,
serviceName);
 
+        HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class);
         ClientRunnable engClient = 
-            new ClientRunnable(service.getPort(portNameEng, HelloWorldPortType.class),
+            new ClientRunnable(portEng,
                 new CorrelationIDFactory() {
                     private int counter;
                     public String createCorrealtionID() {
@@ -169,8 +167,9 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
                     }
                 });
         
+        HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class);
         ClientRunnable salesClient = 
-             new ClientRunnable(service.getPort(portNameSales, HelloWorldPortType.class),
+             new ClientRunnable(portSales,
                 new CorrelationIDFactory() {
                     private int counter;
                     public String createCorrealtionID() {
@@ -179,28 +178,32 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
                 });
      
         executeAsync(engClient, salesClient);
+        ((Closeable)portEng).close();
+        ((Closeable)portSales).close();
     }
     
     @Test
     public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Throwable {
-        QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName serviceName = new QName(SERVICE_NS, 
             "HelloWorldServiceAppCorrelationIDStaticPrefix");
-        QName portNameEng = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portNameEng = new QName(SERVICE_NS, 
             "HelloWorldPortAppCorrelationIDStaticPrefixEng");
-        QName portNameSales = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portNameSales = new QName(SERVICE_NS, 
             "HelloWorldPortAppCorrelationIDStaticPrefixSales");
 
         URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         HelloWorldServiceAppCorrelationIDStaticPrefix service = 
             new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl, serviceName);
 
-        ClientRunnable engClient = 
-            new ClientRunnable(service.getPort(portNameEng, HelloWorldPortType.class));
+        HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class);
+        ClientRunnable engClient = new ClientRunnable(portEng);
         
-        ClientRunnable salesClient = 
-             new ClientRunnable(service.getPort(portNameSales, HelloWorldPortType.class));
+        HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class);
+        ClientRunnable salesClient = new ClientRunnable(portSales);
 
         executeAsync(engClient, salesClient);
+        ((Closeable)portEng).close();
+        ((Closeable)portSales).close();
     }
 
     /* TO DO:
@@ -213,9 +216,9 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
      */
     @Test
     public void testTwoWayQueueAppCorrelationIDNoPrefix() throws Throwable {
-        QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName serviceName = new QName(SERVICE_NS, 
             "HelloWorldServiceAppCorrelationIDNoPrefix");
-        QName portName = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portName = new QName(SERVICE_NS, 
             "HelloWorldPortAppCorrelationIDNoPrefix");
         URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
         HelloWorldServiceAppCorrelationIDNoPrefix service = 
@@ -228,6 +231,7 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
             clients.add(new ClientRunnable(port));            
         }
         executeAsync(clients);
+        ((Closeable)port).close();
     }
 
     /*
@@ -258,12 +262,12 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
      */
     @Test
     public void testTwoWayQueueRuntimeCorrelationIDStaticPrefix() throws Throwable {
-        QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName serviceName = new QName(SERVICE_NS, 
             "HelloWorldServiceRuntimeCorrelationIDStaticPrefix");
         
-        QName portNameEng = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portNameEng = new QName(SERVICE_NS, 
             "HelloWorldPortRuntimeCorrelationIDStaticPrefixEng");
-        QName portNameSales = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portNameSales = new QName(SERVICE_NS, 
             "HelloWorldPortRuntimeCorrelationIDStaticPrefixSales");
 
         URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
@@ -279,16 +283,18 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
             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("http://cxf.apache.org/hello_world_jms", 
+        QName serviceName = new QName(SERVICE_NS, 
             "HelloWorldServiceRuntimeCorrelationIDDynamicPrefix");
         
-        QName portName = new QName("http://cxf.apache.org/hello_world_jms", 
+        QName portName = new QName(SERVICE_NS, 
             "HelloWorldPortRuntimeCorrelationIDDynamicPrefix");
         
         URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
@@ -301,6 +307,7 @@ public class JMSSharedQueueTest extends AbstractBusClientServerTestBase
{
             clients.add(new ClientRunnable(port));
         }
         executeAsync(clients);
+        ((Closeable)port).close();
     }
     
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSTestMtom.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSTestMtom.java
b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSTestMtom.java
index e95de26..a87e20a 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSTestMtom.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSTestMtom.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.systest.jms;
 
+import java.io.Closeable;
 import java.net.URL;
 
 import javax.activation.DataHandler;
@@ -86,6 +87,7 @@ public class JMSTestMtom {
         
         byte bytes[] = IOUtils.readBytesFromStream(handler1.value.getInputStream());
         Assert.assertEquals("The response file is not same with the sent file.", size, bytes.length);
+        ((Closeable)mtom).close();
     }
     
     
@@ -105,6 +107,7 @@ public class JMSTestMtom {
         
         byte bytes[] = IOUtils.readBytesFromStream(ret.getInputStream());
         Assert.assertEquals("The response file is not same with the original file.", size,
bytes.length);
+        ((Closeable)mtom).close();
     }
     
     public static URL getWSDLURL(String s) throws Exception {

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/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 61762cd..5c364ab 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,6 +18,7 @@
  */
 package org.apache.cxf.systest.jms;
 
+import java.io.Closeable;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
@@ -50,13 +51,13 @@ public class JaxWsAPITest {
     @BeforeClass
     public static void startServer() {
         bus = BusFactory.getDefaultBus();
-        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
+        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://JaxWsAPITest?broker.persistent=false");
         PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
         cff = new ConnectionFactoryFeature(cfp);
 
-        Object impleDoc = new GreeterImplDoc();
-        EndpointImpl ep = (EndpointImpl)Endpoint.create(impleDoc);
+        EndpointImpl ep = (EndpointImpl)Endpoint.create(new GreeterImplDoc());
         ep.getFeatures().add(cff);
+        ep.setBus(bus);
         ep.publish();
     }
     
@@ -79,6 +80,7 @@ public class JaxWsAPITest {
 
         String greeting = greeter.greetMe("Chris");
         Assert.assertEquals("Hello Chris", greeting);
+        ((Closeable)greeter).close();
     }
 
     public URL getWSDLURL(String s) throws Exception {

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/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 4e22e83..b4b3420 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
@@ -22,10 +22,8 @@ import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
-import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
 
 public class Server extends AbstractBusTestServerBase {
     public static final String PORT = allocatePort(Server.class);
@@ -36,23 +34,6 @@ public class Server extends AbstractBusTestServerBase {
     }
     
     protected void run()  {
-        Object implementor = new GreeterImplTwoWayJMS();
-        Object impl2 =  new GreeterImplQueueOneWay();
-        Object impl3  = new GreeterImplTopicOneWay();
-        Object impleDoc = new GreeterImplDoc();
-        Object impl4 = new GreeterByteMessageImpl();
-        Object impl5 =  new SoapService6SoapPort6Impl();
-        Object impl6 = new JmsDestPubSubImpl();
-        Object impl7 =  new SoapService7SoapPort7Impl();
-        Object i1 = new GreeterImplTwoWayJMSAppCorrelationIDNoPrefix();
-        Object i2 = new GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixEng();
-        Object i3 = new GreeterImplTwoWayJMSAppCorrelationIDStaticPrefixSales();
-        Object i4 = new GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix();
-        Object i5 = new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng();
-        Object i6 = new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales();
-        Object i7 = new GreeterImplTwoWayJMSAppCorrelationIDEng();
-        Object i8 = new GreeterImplTwoWayJMSAppCorrelationIDSales();
-        
         Bus bus = BusFactory.getDefaultBus();
         setBus(bus);
         
@@ -60,63 +41,26 @@ public class Server extends AbstractBusTestServerBase {
         broker.updateWsdl(bus, "testutils/jms_test.wsdl");
         broker.updateWsdl(bus, "testutils/jms_test_mtom.wsdl");
         
-        Endpoint.publish(null, impleDoc);
+        Endpoint.publish(null, new GreeterImplDoc());
 
         String address = null;
-        Endpoint.publish(address, implementor);
-        Endpoint.publish(null, impl2);
-        Endpoint.publish(null, impl3);
-        Endpoint.publish(null, impl4);
-        Endpoint.publish(null, impl5);
-        Endpoint.publish(null, impl6);
+        Endpoint.publish(address, 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, impl7);
-        Endpoint.publish(null, i1);
-        Endpoint.publish(null, i2);
-        Endpoint.publish(null, i3);
-        Endpoint.publish(null, i4);
-        Endpoint.publish(null, i5);
-        Endpoint.publish(null, i6);
-        Endpoint.publish(null, i7);
-        Endpoint.publish(null, i8);
+        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());
 
-        Object spec1 = new GreeterSpecImpl();
-        String address1 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue2"
-                         + "?jndiInitialContextFactory"
-                         + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-                         + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
-                         + broker.getEncodedBrokerURL();
-        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="
-            + broker.getEncodedBrokerURL();
-        Endpoint.publish(address2, spec2);
-        
-        initNoWsdlServer();
     }
 
-
-    /**
-     * 
-     */
-    private void initNoWsdlServer() {
-        String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
-            + "?jndiInitialContextFactory"
-            + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
-            + "&jndiConnectionFactoryName=ConnectionFactory&jndiURL="
-            +  broker.getEncodedBrokerURL();
-        Hello implementor = new HelloImpl();
-        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
-        svrFactory.setServiceClass(Hello.class);
-        svrFactory.setAddress(address);
-        svrFactory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
-        svrFactory.setServiceBean(implementor);
-        svrFactory.create();
-    }
-
-
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/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 bcc47d6..515f6c9 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
@@ -53,6 +53,7 @@ public class HelloWorldContinuationsClientServerTest {
         cff = new ConnectionFactoryFeature(cfp);
         Object implementor = new HelloWorldWithContinuationsJMS();        
         EndpointImpl ep = (EndpointImpl)Endpoint.create(null, implementor);
+        ep.setBus(bus);
         ep.getFeatures().add(cff);
         ep.publish();
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/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 c1af7ce..329d823 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
@@ -53,6 +53,7 @@ public class HelloWorldContinuationsThrottleTest {
         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();
     }
 
@@ -83,10 +84,11 @@ public class HelloWorldContinuationsThrottleTest {
         executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
         executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
         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/97929715/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 3bec3df..c7c7666 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
@@ -49,6 +49,7 @@ public class JMSContinuationsClientServerTest {
         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);
     }
@@ -73,6 +74,7 @@ public class JMSContinuationsClientServerTest {
 
         HelloWorldPortType greeter = 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/97929715/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 95be743..eb49ff7 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
@@ -50,6 +50,7 @@ public class ProviderJMSContinuationTest {
         String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply";
         EndpointImpl ep = (EndpointImpl)Endpoint.create(address, implementor);
         ep.getInInterceptors().add(new IncomingMessageCounterInterceptor());
+        ep.setBus(bus);
         ep.getFeatures().add(cff);
         ep.publish();
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/multitransport/MultiTransportClientServerTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/multitransport/MultiTransportClientServerTest.java
b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/multitransport/MultiTransportClientServerTest.java
index d43228d..2c7bb37 100644
--- a/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/multitransport/MultiTransportClientServerTest.java
+++ b/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/multitransport/MultiTransportClientServerTest.java
@@ -61,6 +61,7 @@ public class MultiTransportClientServerTest {
         String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort";
         Endpoint.publish(address, new HTTPGreeterImpl());
         EndpointImpl ep1 = (EndpointImpl)Endpoint.create(new JMSGreeterImpl());
+        ep1.setBus(bus);
         ep1.getFeatures().add(cff);
         ep1.publish();
     }
@@ -101,7 +102,7 @@ public class MultiTransportClientServerTest {
             }
 
         }
-
+        ((java.io.Closeable)greeter).close();
         greeter = null;
 
         greeter = service.getPort(portName2, Greeter.class, cff);
@@ -123,6 +124,7 @@ public class MultiTransportClientServerTest {
             }
 
         }
+        ((java.io.Closeable)greeter).close();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl b/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
index 74fc7d3..6604c32 100644
--- a/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
+++ b/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
@@ -273,10 +273,8 @@
         </wsdl:port>
     </wsdl:service>
     <wsdl:service name="SOAPService8">
-	    <jms:jndiURL>tcp://localhost:61500</jms:jndiURL>
-        <jms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</jms:jndiInitialContextFactory>
         <wsdl:port name="SoapPort8" binding="tns:Greeter_SOAPBinding_soap12">
-        	<soap:address location="jms:jndi:dynamicQueues/routertest.SOAPService2Q.text"
/>
+        	<soap:address location="jms:queue:routertest.SOAPService2Q.text" />
         </wsdl:port>
     </wsdl:service>
     <!-- XML Binding based Services-->

http://git-wip-us.apache.org/repos/asf/cxf/blob/97929715/testutils/src/main/resources/wsdl/jms_spec_test.wsdl
----------------------------------------------------------------------
diff --git a/testutils/src/main/resources/wsdl/jms_spec_test.wsdl b/testutils/src/main/resources/wsdl/jms_spec_test.wsdl
index 1b81264..4322b29 100644
--- a/testutils/src/main/resources/wsdl/jms_spec_test.wsdl
+++ b/testutils/src/main/resources/wsdl/jms_spec_test.wsdl
@@ -95,13 +95,6 @@
     <wsdl:binding name="JMSGreeterPortBinding" type="tns:JMSGreeterPortType">
         <soap:binding style="document" transport="http://www.w3.org/2010/soapjms/"/>
         <soapjms:jndiContextParameter name="name" value="value"/>
-        <soapjms:jndiConnectionFactoryName>ConnectionFactory
-        </soapjms:jndiConnectionFactoryName>
-        <soapjms:jndiInitialContextFactory>
-                        org.apache.activemq.jndi.ActiveMQInitialContextFactory
-        </soapjms:jndiInitialContextFactory>
-        <soapjms:jndiURL>tcp://localhost:61500
-        </soapjms:jndiURL>
         <soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
         <soapjms:priority>5</soapjms:priority>
         <soapjms:timeToLive>1000</soapjms:timeToLive>
@@ -133,21 +126,14 @@
     </wsdl:binding>
     <wsdl:service name="JMSGreeterService">
         <soapjms:jndiContextParameter name="name2" value="value2"/>
-        <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
-        <soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
-        <soapjms:jndiURL>tcp://localhost:61500
-        </soapjms:jndiURL>
         <soapjms:deliveryMode>NON_PERSISTENT
         </soapjms:deliveryMode>
         <soapjms:priority>6</soapjms:priority>
         <soapjms:timeToLive>2000</soapjms:timeToLive>
         <!--<soapjms:replyToName>replytoname2</soapjms:replyToName>-->
         <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
-            <soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue2?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;jndiConnectionFactoryName=ConnectionFactory&amp;jndiURL=tcp://localhost:61500"/>
+            <soap:address location="jms:queue:test.cxf.jmstransport.queue2"/>
             <soapjms:jndiContextParameter name="name3" value="value3"/>
-            <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
-            <soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
-            <soapjms:jndiURL>tcp://localhost:61500</soapjms:jndiURL>
             <soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
             <soapjms:priority>7</soapjms:priority>
             <soapjms:timeToLive>3000</soapjms:timeToLive>
@@ -158,10 +144,6 @@
     </wsdl:service>
     <wsdl:service name="JMSGreeterService2">
         <soapjms:jndiContextParameter name="name2" value="value2"/>
-        <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
-        <soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
-        <soapjms:jndiURL>tcp://localhost:61500
-        </soapjms:jndiURL>
         <soapjms:deliveryMode>NON_PERSISTENT
         </soapjms:deliveryMode>
         <soapjms:priority>6</soapjms:priority>
@@ -169,10 +151,8 @@
         <!--<soapjms:replyToName>replytoname2</soapjms:replyToName>-->
         <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort2">
             <soapjms:jndiConnectionFactoryName>ConnectionFactory</soapjms:jndiConnectionFactoryName>
-            <soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue5?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;jndiConnectionFactoryName=ConnectionFactory&amp;jndiURL=tcp://localhost:61500"/>
+            <soap:address location="jms:queue:test.cxf.jmstransport.queue5"/>
             <soapjms:jndiContextParameter name="name3" value="value3"/>
-            <soapjms:jndiInitialContextFactory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</soapjms:jndiInitialContextFactory>
-            <soapjms:jndiURL>tcp://localhost:61500</soapjms:jndiURL>
             <soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
             <soapjms:priority>7</soapjms:priority>
             <soapjms:timeToLive>3000</soapjms:timeToLive>


Mime
View raw message