cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1567565 - in /cxf/trunk: rt/transports/jms/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ systests/transport-jms/ systests/transport-jms/src/test/java/org/a...
Date Wed, 12 Feb 2014 08:48:15 GMT
Author: cschneider
Date: Wed Feb 12 08:48:14 2014
New Revision: 1567565

URL: http://svn.apache.org/r1567565
Log:
CXF-5543 Replacing JndiTemplate. Removing spring-context dependency

Added:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java
  (with props)
Modified:
    cxf/trunk/rt/transports/jms/pom.xml
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JNDIConfiguration.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JMSDestinationResolver.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ResourceCloser.java
    cxf/trunk/systests/transport-jms/pom.xml
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
    cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml

Modified: cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/pom.xml?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/pom.xml (original)
+++ cxf/trunk/rt/transports/jms/pom.xml Wed Feb 12 08:48:14 2014
@@ -107,10 +107,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-        <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>
         </dependency>

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Wed Feb 12 08:48:14 2014
@@ -29,11 +29,10 @@ import javax.jms.Session;
 import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.transport.jms.util.DestinationResolver;
 import org.apache.cxf.transport.jms.util.JMSDestinationResolver;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.jndi.JndiTemplate;
+import org.apache.cxf.transport.jms.util.JndiHelper;
 
 @NoJSR250Annotations
-public class JMSConfiguration implements InitializingBean {
+public class JMSConfiguration {
     /**
      * The use of -1 is to make easier to determine
      * if the setCacheLevel has been called.
@@ -42,7 +41,7 @@ public class JMSConfiguration implements
 
     private boolean usingEndpointInfo = true;
 
-    private JndiTemplate jndiTemplate;
+    private JndiHelper jndiTemplate;
     private ConnectionFactory connectionFactory;
     private DestinationResolver destinationResolver = new JMSDestinationResolver();
     private Executor taskExecutor;
@@ -384,11 +383,11 @@ public class JMSConfiguration implements
         return useConduitIdSelector != null;
     }
 
-    public void setJndiTemplate(JndiTemplate jndiTemplate) {
+    public void setJndiTemplate(JndiHelper jndiTemplate) {
         this.jndiTemplate = jndiTemplate;
     }
 
-    public JndiTemplate getJndiTemplate() {
+    public JndiHelper getJndiTemplate() {
         return jndiTemplate;
     }
 

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Wed Feb 12 08:48:14 2014
@@ -66,8 +66,8 @@ public final class JMSFactory {
         String userName = jndiConfig.getConnectionUserName();
         String password = jndiConfig.getConnectionPassword();
         try {
-            ConnectionFactory cf = (ConnectionFactory)jmsConfig.getJndiTemplate().
-                lookup(connectionFactoryName);
+            ConnectionFactory cf = jmsConfig.getJndiTemplate().
+                lookup(connectionFactoryName, ConnectionFactory.class);
             if (userName != null) {
                 UserCredentialsConnectionFactoryAdapter uccf = new UserCredentialsConnectionFactoryAdapter();
                 uccf.setUsername(userName);

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
Wed Feb 12 08:48:14 2014
@@ -40,6 +40,7 @@ import org.apache.cxf.transport.jms.uri.
 import org.apache.cxf.transport.jms.uri.JMSEndpointParser;
 import org.apache.cxf.transport.jms.uri.JMSURIConstants;
 import org.apache.cxf.transport.jms.util.JMSDestinationResolver;
+import org.apache.cxf.transport.jms.util.JndiHelper;
 import org.apache.cxf.transport.jms.wsdl.DeliveryModeType;
 import org.apache.cxf.transport.jms.wsdl.JndiConnectionFactoryNameType;
 import org.apache.cxf.transport.jms.wsdl.JndiContextParameterType;
@@ -50,7 +51,6 @@ import org.apache.cxf.transport.jms.wsdl
 import org.apache.cxf.transport.jms.wsdl.TimeToLiveType;
 import org.apache.cxf.transport.jms.wsdl.TopicReplyToNameType;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.springframework.jndi.JndiTemplate;
 
 public class JMSOldConfigHolder {
     private static final Logger LOG = LogUtils.getL7dLogger(JMSOldConfigHolder.class);
@@ -208,8 +208,7 @@ public class JMSOldConfigHolder {
         }
 
         if (jmsConfig.isUsingEndpointInfo()) {
-            JndiTemplate jt = new JndiTemplate();
-            jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
+            JndiHelper jt = new JndiHelper(JMSOldConfigHolder.getInitialContextEnv(endpoint));
             boolean pubSubDomain = endpoint.getJmsVariant().contains(JMSURIConstants.TOPIC);
             JNDIConfiguration jndiConfig = new JNDIConfiguration();
             jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JNDIConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JNDIConfiguration.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JNDIConfiguration.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JNDIConfiguration.java
Wed Feb 12 08:48:14 2014
@@ -20,8 +20,7 @@ package org.apache.cxf.transport.jms;
 
 import java.util.Properties;
 
-import org.springframework.jndi.JndiTemplate;
-
+import org.apache.cxf.transport.jms.util.JndiHelper;
 
 public class JNDIConfiguration {
     private Properties environment;
@@ -29,10 +28,8 @@ public class JNDIConfiguration {
     private String connectionUserName;
     private String connectionPassword;
     
-    public JndiTemplate createJndiTemple() {
-        JndiTemplate jt = new JndiTemplate();
-        jt.setEnvironment(environment);
-        return jt;
+    public JndiHelper createJndiTemple() {
+        return new JndiHelper(environment);
     }
 
     public String getJndiConnectionFactoryName() {

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JMSDestinationResolver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JMSDestinationResolver.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JMSDestinationResolver.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JMSDestinationResolver.java
Wed Feb 12 08:48:14 2014
@@ -23,10 +23,8 @@ import javax.jms.JMSException;
 import javax.jms.Session;
 import javax.naming.NamingException;
 
-import org.springframework.jndi.JndiTemplate;
-
 public class JMSDestinationResolver implements DestinationResolver {
-    JndiTemplate jndiTemplate;
+    JndiHelper jndiTemplate;
 
     public Destination resolveDestinationName(Session session, String destinationName, boolean
pubSubDomain)
         throws JMSException {
@@ -44,7 +42,7 @@ public class JMSDestinationResolver impl
         }
     }
 
-    public void setJndiTemplate(JndiTemplate jt) {
+    public void setJndiTemplate(JndiHelper jt) {
         this.jndiTemplate = jt;
     }
 

Added: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java?rev=1567565&view=auto
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java
(added)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java
Wed Feb 12 08:48:14 2014
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.transport.jms.util;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+public class JndiHelper {
+
+    private Properties environment;
+
+    /**
+     * Create a new JndiTemplate instance, using the given environment.
+     */
+    public JndiHelper(Properties environment) {
+        this.environment = environment;
+    }
+
+    @SuppressWarnings("rawtypes")
+    protected Context createInitialContext() throws NamingException {
+        //CHECKSTYLE:OFF
+        Hashtable<Object, Object> icEnv = new Hashtable<Object, Object>(environment.size());
+        //CHECKSTYLE:ON
+        for (Enumeration en = environment.propertyNames(); en.hasMoreElements();) {
+            String key = (String)en.nextElement();
+            Object value = environment.getProperty(key);
+            if (value == null) {
+                value = environment.get(key);
+            }
+            icEnv.put(key, value);
+        }
+        return new InitialContext(icEnv);
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T lookup(final String name, Class<T> requiredType) throws NamingException
{
+        Context ctx = createInitialContext();
+        try {
+            Object located = ctx.lookup(name);
+            if (located == null) {
+                throw new NameNotFoundException("JNDI object with [" + name + "] not found");
+            }
+            return (T)located;
+        } finally {
+            ResourceCloser.close(ctx);
+        }
+    }
+
+}

Propchange: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/JndiHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ResourceCloser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ResourceCloser.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ResourceCloser.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/util/ResourceCloser.java
Wed Feb 12 08:48:14 2014
@@ -27,6 +27,8 @@ import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import javax.naming.Context;
+import javax.naming.NamingException;
 
 public class ResourceCloser implements Closeable {
     private AbstractSequentialList<Object> resources;
@@ -66,11 +68,15 @@ public class ResourceCloser implements C
                 ((Session)resource).close();
             } else if (resource instanceof Connection) {
                 ((Connection)resource).close();
+            } else if (resource instanceof Context) {
+                ((Context)resource).close();
             } else {
                 throw new IllegalArgumentException("Can not handle resource " + resource.getClass());
             }
         } catch (JMSException e) {
             // Ignore
+        } catch (NamingException e) {
+            // Ignore
         }
     }
 

Modified: cxf/trunk/systests/transport-jms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/pom.xml?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/pom.xml (original)
+++ cxf/trunk/systests/transport-jms/pom.xml Wed Feb 12 08:48:14 2014
@@ -197,12 +197,6 @@
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
-            <artifactId>spring-jms</artifactId>
-            <scope>test</scope>
-            <version>${cxf.spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
             <artifactId>spring-tx</artifactId>
             <scope>test</scope>
             <version>${cxf.spring.version}</version>

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java
Wed Feb 12 08:48:14 2014
@@ -45,7 +45,7 @@ import org.apache.cxf.transport.jms.uri.
 import org.apache.cxf.transport.jms.uri.JMSEndpointParser;
 import org.apache.cxf.transport.jms.uri.JMSURIConstants;
 import org.apache.cxf.transport.jms.util.JMSDestinationResolver;
-import org.springframework.jndi.JndiTemplate;
+import org.apache.cxf.transport.jms.util.JndiHelper;
 
 /**
  * 
@@ -127,8 +127,7 @@ public final class JMSTestUtil {
         }
 
         if (jmsConfig.isUsingEndpointInfo()) {
-            JndiTemplate jt = new JndiTemplate();
-            jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
+            JndiHelper jt = new JndiHelper(JMSOldConfigHolder.getInitialContextEnv(endpoint));
             boolean pubSubDomain = false;
             pubSubDomain = endpoint.getJmsVariant().equals(JMSURIConstants.TOPIC);
             JNDIConfiguration jndiConfig = new JNDIConfiguration();

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
Wed Feb 12 08:48:14 2014
@@ -76,6 +76,7 @@ import org.apache.cxf.transport.jms.JMSP
 import org.apache.cxf.transport.jms.JNDIConfiguration;
 import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
 import org.apache.cxf.transport.jms.uri.JMSEndpoint;
+import org.apache.cxf.transport.jms.util.JndiHelper;
 import org.apache.cxf.transport.jms.util.TestReceiver;
 import org.apache.hello_world_doc_lit.Greeter;
 import org.apache.hello_world_doc_lit.PingMeFault;
@@ -85,7 +86,6 @@ import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.jndi.JndiTemplate;
 
 public class JMSClientServerTest extends AbstractBusClientServerTestBase {
     private static final String BROKER_URI = "vm://JMSClientServerTest" 
@@ -888,8 +888,7 @@ public class JMSClientServerTest extends
         endpoint.setJndiConnectionFactoryName("ConnectionFactory");
 
         final JMSConfiguration jmsConfig = new JMSConfiguration();        
-        JndiTemplate jt = new JndiTemplate();
-        jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint));
+        JndiHelper jt = new JndiHelper(JMSOldConfigHolder.getInitialContextEnv(endpoint));
         
         JNDIConfiguration jndiConfig = new JNDIConfiguration();
         jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName());

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
Wed Feb 12 08:48:14 2014
@@ -27,11 +27,12 @@
         </jms:address>
         <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
     </jms:conduit>
-    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
p:brokerURL="${EmbeddedBrokerURL}"/>
-    <bean id="singleConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory"
destroy-method="destroy">
-        <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
-    </bean>
-    <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration" p:connectionFactory-ref="singleConnectionFactory"
p:concurrentConsumers="1" p:maxConcurrentConsumers="1"/>
+    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
+		p:brokerURL="${EmbeddedBrokerURL}"/>
+    <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration" 
+    	p:connectionFactory-ref="jmsConnectionFactory" 
+    	p:concurrentConsumers="1" 
+    	p:maxConcurrentConsumers="1"/>
     <jms:destination name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.jms-destination">
         <jms:address jndiConnectionFactoryName="ConnectionFactory" jndiDestinationName="dynamicQueues/test.jmstransport.text">
             <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
@@ -39,5 +40,11 @@
         </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="10000" p:concurrentConsumers="1" p:maxConcurrentConsumers="1" p:maxSuspendedContinuations="1"
p:cacheLevel="2"/>
+    <bean id="jmsConf2" class="org.apache.cxf.transport.jms.JMSConfiguration"
+     	p:connectionFactory-ref="jmsConnectionFactory" 
+     	p:timeToLive="10000" 
+     	p:concurrentConsumers="1" 
+     	p:maxConcurrentConsumers="1" 
+     	p:maxSuspendedContinuations="1" 
+     	p:cacheLevel="2"/>
 </beans>

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/soap12Bus.xml
Wed Feb 12 08:48:14 2014
@@ -35,11 +35,7 @@
             </bean>
         </cxf:features>
     </cxf:bus>
-    <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
-        <property name="targetConnectionFactory">
-            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
-                <property name="brokerURL" value="vm://JMSClientServerSoap12Test"/>
-            </bean>
-        </property>
+    <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
+	    <property name="brokerURL" value="vm://JMSClientServerSoap12Test"/>
     </bean>
 </beans>

Modified: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml?rev=1567565&r1=1567564&r2=1567565&view=diff
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
(original)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/tx/jms_server_config.xml
Wed Feb 12 08:48:14 2014
@@ -27,15 +27,17 @@
     <bean id="jmsConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
         <constructor-arg value="${EmbeddedBrokerURL}"/>
     </bean>
+    <!-- 
     <bean id="singleConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory"
destroy-method="destroy">
         <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
     </bean>
     <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
         <property name="connectionFactory" ref="singleConnectionFactory"/>
     </bean>
+     -->
     <bean id="implementor" class="org.apache.cxf.systest.jms.tx.GreeterImplWithTransaction"/>
     <bean id="transactionalImplementor" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
-        <property name="transactionManager" ref="jmsTransactionManager"/>
+        <!-- <property name="transactionManager" ref="jmsTransactionManager"/> -->
         <property name="target" ref="implementor"/>
         <property name="transactionAttributes">
             <props>
@@ -45,5 +47,8 @@
             </props>
         </property>
     </bean>
-    <bean id="jmsConf" class="org.apache.cxf.transport.jms.JMSConfiguration" p:connectionFactory-ref="singleConnectionFactory"
p:sessionTransacted="true" p:transactionManager-ref="jmsTransactionManager" p:usingEndpointInfo="true"/>
+    <bean id="jmsConf" class="org.apache.cxf.transport.jms.JMSConfiguration"
+     	p:connectionFactory-ref="jmsConnectionFactory" 
+     	p:sessionTransacted="true" 
+     	p:usingEndpointInfo="true"/>
 </beans>



Mime
View raw message