cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1244322 - in /cxf/branches/2.4.x-fixes: ./ rt/bindings/object/src/test/java/org/apache/cxf/binding/object/ rt/databinding/aegis/ rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/ rt/databinding/xmlbeans/src/test/java/org/apach...
Date Wed, 15 Feb 2012 03:09:38 GMT
Author: dkulp
Date: Wed Feb 15 03:09:37 2012
New Revision: 1244322

URL: http://svn.apache.org/viewvc?rev=1244322&view=rev
Log:
Merged revisions 1244152 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1244152 | dkulp | 2012-02-14 13:36:17 -0500 (Tue, 14 Feb 2012) | 9 lines
  
  Merged revisions 1242999 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1242999 | dkulp | 2012-02-10 22:10:09 -0500 (Fri, 10 Feb 2012) | 1 line
    
    Update more of the test suite to use dynamic ports
  ........
  
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
    cxf/branches/2.4.x-fixes/rt/databinding/aegis/pom.xml
    cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
    cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
    cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
    cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
    cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
    cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
    cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
    cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
    cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/resources/jms_test_jndi.xml

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/bindings/object/src/test/java/org/apache/cxf/binding/object/LocalServerRegistrationTest.java
Wed Feb 15 03:09:37 2012
@@ -35,6 +35,7 @@ import org.apache.cxf.service.model.Bind
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.ConduitInitiatorManager;
@@ -45,6 +46,8 @@ import org.junit.Test;
 public class LocalServerRegistrationTest extends AbstractCXFTest {
     private Message response;
 
+    
+    
     @Test
     public void testServer() throws Exception {
         // Enable the auto registration of a default local endpoint when we use other transports
@@ -56,7 +59,10 @@ public class LocalServerRegistrationTest
         // Create an HTTP endpoint
         ServerFactoryBean sfb = new ServerFactoryBean();
         sfb.setServiceClass(EchoImpl.class);
-        sfb.setAddress("http://localhost:9001/echo");
+        
+        sfb.setAddress("http://localhost:" 
+            + TestUtil.getPortNumber(LocalServerRegistrationTest.class) 
+            + "/echo");
         Server server = sfb.create();
 
         List<Object> content = new ArrayList<Object>();

Modified: cxf/branches/2.4.x-fixes/rt/databinding/aegis/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/aegis/pom.xml?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/aegis/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/aegis/pom.xml Wed Feb 15 03:09:37 2012
@@ -79,6 +79,12 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-testutils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>jdom</groupId>
             <artifactId>jdom</artifactId>
             <version>${cxf.jdom.version}</version>

Modified: cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
Wed Feb 15 03:09:37 2012
@@ -30,6 +30,7 @@ import org.apache.cxf.frontend.ServerFac
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -38,11 +39,13 @@ import org.junit.Test;
  * 
  */
 public class AegisJaxwsGetTest extends AbstractCXFTest {
+    public static final String PORT = TestUtil.getPortNumber(AegisJaxwsGetTest.class); 
+    
     
     @Before
     public void before() throws Exception {
         JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
-        sf.setAddress("http://localhost:9167/Echo");
+        sf.setAddress("http://localhost:" + PORT + "/Echo");
         sf.setDataBinding(new AegisDatabinding());
         sf.setServiceBean(new Echo());
         Server server = sf.create();
@@ -51,7 +54,7 @@ public class AegisJaxwsGetTest extends A
             .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
         
         ServerFactoryBean sf2 = new ServerFactoryBean();
-        sf2.setAddress("http://localhost:9167/SimpleEcho");
+        sf2.setAddress("http://localhost:" + PORT + "/SimpleEcho");
         sf2.setDataBinding(new AegisDatabinding());
         sf2.setServiceBean(new Echo());
         server = sf2.create();
@@ -70,7 +73,7 @@ public class AegisJaxwsGetTest extends A
     @Test
     public void testGetEcho() throws Exception {
         HttpClient httpClient = createClient();
-        String url = "http://localhost:9167/Echo/echo/echo/hello";
+        String url = "http://localhost:" + PORT + "/Echo/echo/echo/hello";
         HttpMethod method = null;
         method = new GetMethod(url);
         int status = httpClient.executeMethod(method);
@@ -82,7 +85,7 @@ public class AegisJaxwsGetTest extends A
     @Test
     public void testGetEchoSimple() throws Exception {
         HttpClient httpClient = createClient();
-        String url = "http://localhost:9167/SimpleEcho/simpleEcho/string/hello";
+        String url = "http://localhost:" + PORT + "/SimpleEcho/simpleEcho/string/hello";
         HttpMethod method = null;
         method = new GetMethod(url);
         int status = httpClient.executeMethod(method);

Modified: cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/XmlBeansTest.java
Wed Feb 15 03:09:37 2012
@@ -22,10 +22,12 @@ package org.apache.cxf.xmlbeans;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.cxf.xmlbeans.wsdltest.GreeterMine;
 import org.apache.cxf.xmlbeans.wsdltest.SOAPMineService;
 import org.apache.cxf.xmlbeans.wsdltest.SayHi2MessageDocument;
@@ -35,7 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class XmlBeansTest extends AbstractCXFTest {
-
+    private static final String PORT = TestUtil.getPortNumber(XmlBeansTest.class);
     private static final String CONFIG1 = "org/apache/cxf/xmlbeans/cxf.xml";
     private static final String CONFIG2 = "org/apache/cxf/xmlbeans/cxf2.xml";
 
@@ -75,6 +77,10 @@ public class XmlBeansTest extends Abstra
             new SOAPMineService(wsdlURL,
                                 new QName("http://cxf.apache.org/xmlbeans/wsdltest", "SOAPMineService"));
         GreeterMine port = ss.getSoapPort();
+        ((BindingProvider)port).getRequestContext()
+            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                 "http://localhost:" + PORT + "/SoapContext/SoapPort");
+       
         
         SayHi2MessageDocument document = SayHi2MessageDocument.Factory.newInstance();
         StringListType stringListType = document.addNewSayHi2Message();

Modified: cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf.xml
Wed Feb 15 03:09:37 2012
@@ -43,7 +43,7 @@
     </bean>
 
     <jaxws:endpoint id="greeterMineEndpoint"
-                    address="http://localhost:9000/SoapContext/SoapPort"
+                    address="local://SoapContext/SoapPort"
                     implementor="org.apache.cxf.xmlbeans.GreeterMineImpl"
                     serviceName="ns:SOAPMineService"
                     xmlns:ns="http://cxf.apache.org/xmlbeans">

Modified: cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/cxf2.xml
Wed Feb 15 03:09:37 2012
@@ -23,6 +23,7 @@
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
 
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
     
     <bean id="GreeterImpl"
           class="org.apache.cxf.xmlbeans.GreeterMineImpl"
@@ -44,7 +45,7 @@
     </bean>
 
     <jaxws:endpoint id="greeterMineEndpoint"
-                    address="http://localhost:9000/SoapContext/SoapPort"
+                    address="http://localhost:${testutil.ports.XmlBeansTest}/SoapContext/SoapPort"
                     implementor="org.apache.cxf.xmlbeans.GreeterMineImpl">
         <jaxws:serviceFactory>
             <ref bean="testServiceFactory"/>

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
Wed Feb 15 03:09:37 2012
@@ -26,7 +26,7 @@ http://cxf.apache.org/bindings/soap http
 http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
 
   <import resource="classpath:META-INF/cxf/cxf.xml"/>
-
+	
   <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
       <property name="transportIds">
           <list>
@@ -34,6 +34,12 @@ http://cxf.apache.org/jaxrs http://cxf.a
               <value>http://cxf.apache.org/transports/http</value>
           </list>
       </property>
+      <property name="uriPrefixes">
+          <list>
+              <value>http</value>
+              <value>local</value>
+          </list>
+      </property>
   </bean>
   
   <jaxrs:server xmlns:s="http://books.com" serviceName="s:BookService" 

Modified: cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/AbstractJMSTester.java
Wed Feb 15 03:09:37 2012
@@ -31,6 +31,7 @@ import org.apache.cxf.message.ExchangeIm
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
@@ -42,8 +43,10 @@ import org.junit.Assert;
 import org.junit.Before;
 
 public abstract class AbstractJMSTester extends Assert {
+    public static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    
     protected static final String MESSAGE_CONTENT = "HelloWorld";
-
+    
     private static JMSBrokerSetup broker;
 
     protected Bus bus;
@@ -82,6 +85,7 @@ public abstract class AbstractJMSTester 
     protected void setupServiceInfo(String ns, String wsdl, String serviceName, String portName)
{
         URL wsdlUrl = getClass().getResource(wsdl);
         assertNotNull(wsdlUrl);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, wsdlUrl.toString());
         WSDLServiceFactory factory = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
 
         Service service = factory.create();
@@ -108,6 +112,22 @@ public abstract class AbstractJMSTester 
         os.close();
     }
 
+    protected void adjustEndpointInfoURL() {
+        if (endpointInfo != null) {
+            AddressType at = endpointInfo.getExtensor(AddressType.class);
+            if (at != null) {
+                for (JMSNamingPropertyType jnt : at.getJMSNamingProperty()) {
+                    if (jnt.getName().equals("java.naming.provider.url")) {
+                        String v = jnt.getValue();
+                        v = v.replace("61500", JMS_PORT);
+                        v = v.replace("61616", JMS_PORT);
+                        jnt.setValue(v);
+                    }
+                }
+            }
+        }
+    }
+    
     protected JMSConduit setupJMSConduit(boolean send, boolean decoupled) throws IOException
{
         if (decoupled) {
             // setup the reference type
@@ -115,6 +135,8 @@ public abstract class AbstractJMSTester 
             target = EasyMock.createMock(EndpointReferenceType.class);
         }
         
+        adjustEndpointInfoURL();
+
         JMSConfiguration jmsConfig = new JMSOldConfigHolder()
             .createJMSConfigurationFromEndpointInfo(bus, endpointInfo, null, true);
         JMSConduit jmsConduit = new JMSConduit(endpointInfo, target, jmsConfig, bus);

Modified: cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Wed Feb 15 03:09:37 2012
@@ -48,7 +48,7 @@ public class JMSConduitTest extends Abst
 
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     @Test
@@ -154,7 +154,6 @@ public class JMSConduitTest extends Abst
     public void testJMSMessageMarshal() throws Exception {
         setupServiceInfo("http://cxf.apache.org/hello_world_jms", "/wsdl/jms_test.wsdl",
                          "HelloWorldServiceLoop", "HelloWorldPortLoop");
-
         String testMsg = "Test Message";
         JMSConduit conduit = setupJMSConduit(true, false);
         Message msg = new MessageImpl();

Modified: cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
Wed Feb 15 03:09:37 2012
@@ -53,7 +53,7 @@ public class JMSDestinationTest extends 
     
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     private void waitForReceiveInMessage() {
@@ -85,8 +85,11 @@ public class JMSDestinationTest extends 
     }
 
     public JMSDestination setupJMSDestination(boolean send) throws IOException {
+
+        adjustEndpointInfoURL();
         JMSConfiguration jmsConfig = new JMSOldConfigHolder()
             .createJMSConfigurationFromEndpointInfo(bus, endpointInfo, null, false);
+        
         JMSDestination jmsDestination = new JMSDestination(bus, endpointInfo, jmsConfig);
 
         if (send) {

Modified: cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/OldConfigTest.java
Wed Feb 15 03:09:37 2012
@@ -29,7 +29,7 @@ public class OldConfigTest extends Abstr
 
     @BeforeClass
     public static void createAndStartBroker() throws Exception {
-        startBroker(new JMSBrokerSetup("tcp://localhost:61500"));
+        startBroker(new JMSBrokerSetup("tcp://localhost:" + JMS_PORT));
     }
 
     @Test

Modified: cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/resources/jms_test_jndi.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/resources/jms_test_jndi.xml?rev=1244322&r1=1244321&r2=1244322&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/resources/jms_test_jndi.xml (original)
+++ cxf/branches/2.4.x-fixes/rt/transports/jms/src/test/resources/jms_test_jndi.xml Wed Feb
15 03:09:37 2012
@@ -30,6 +30,10 @@ http://cxf.apache.org/transports/jms htt
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
     
+    
+    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
+        p:brokerURL="vm://localhost"/>
+    
     <bean id="jndi" class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" factory-method="makeInitialContext"
singleton="true">
         <property name="entries" ref="jndiEntries" />
     </bean>
@@ -37,13 +41,7 @@ http://www.springframework.org/schema/be
     <util:map id="jndiEntries">
         <entry key="ConnectionFactory">
             <bean class="org.springframework.jms.connection.SingleConnectionFactory">
-                <property name="targetConnectionFactory">
-                    <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                        <property name="brokerURL">
-                            <value>tcp://localhost:61500</value>
-                        </property>
-                    </bean>
-                </property>
+                <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
             </bean>
         </entry>
     </util:map>



Mime
View raw message