cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r701585 [2/2] - in /cxf/branches/2.1.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/spring/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms...
Date Sat, 04 Oct 2008 02:35:18 GMT
Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSUtilsTest.java?rev=701585&r1=701584&r2=701585&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSUtilsTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSUtilsTest.java
Fri Oct  3 19:35:17 2008
@@ -28,9 +28,6 @@
 
 public class JMSUtilsTest extends Assert {
 
-    
-    // This is just a place holder for now it will be chaning in next task 
-    // when the new JMS address policies and configurations are introdced.
     @Test
     public void testpopulateIncomingContextNonNull() throws Exception {
         AddressType addrType =  new AddressType();
@@ -40,14 +37,12 @@
         prop.setValue("testValue");
         addrType.getJMSNamingProperty().add(prop);      
         
-        prop.setName(Context.BATCHSIZE);
-        prop.setValue("12");
-        addrType.getJMSNamingProperty().add(prop);
+        JMSNamingPropertyType prop2 = new JMSNamingPropertyType();
+        prop2.setName(Context.BATCHSIZE);
+        prop2.setValue("12");
+        addrType.getJMSNamingProperty().add(prop2);
         
-        
-        Properties env = new Properties();
-        assertTrue(env.size() <= 0);
-        JMSUtils.populateContextEnvironment(addrType, env);
+        Properties env = JMSUtils.getInitialContextEnv(addrType);
         assertTrue("Environment should not be empty", env.size() > 0);
         assertTrue("Environemnt should contain NamingBatchSize property", env.get(Context.BATCHSIZE)
!= null);
     }

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/resources/jms_test_config.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/resources/jms_test_config.xml?rev=701585&r1=701584&r2=701585&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/resources/jms_test_config.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/resources/jms_test_config.xml Fri
Oct  3 19:35:17 2008
@@ -23,8 +23,10 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:ct="http://cxf.apache.org/configuration/types"
     xmlns:jms="http://cxf.apache.org/transports/jms"
+    xmlns:p="http://www.springframework.org/schema/p"
     xsi:schemaLocation="
 http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd
+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">
     
     <jms:conduit name="{http://cxf.apache.org/jms_conf_test}HelloWorldQueueBinMsgPort.jms-conduit">
@@ -40,7 +42,8 @@
           connectionPassword="testPassword">
           <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
           <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
-      </jms:address> 
+      </jms:address>
+      <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
     </jms:conduit>
     
     <jms:destination name="{http://cxf.apache.org/jms_conf_test}HelloWorldQueueBinMsgPort.jms-destination">
@@ -57,12 +60,12 @@
           highWaterMark="5000"/>
       <jms:address
           destinationStyle="queue"
-          jndiConnectionFactoryName="MockConnectionFactory"
+          jndiConnectionFactoryName="ConnectionFactory"
           jndiDestinationName="myOwnDestination"
           jndiReplyDestinationName="myOwnReplyDestination"
           connectionUserName="testUser"
           connectionPassword="testPassword">
-          <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.cxf.transport.jms.MockInitialContextFactory"/>
+          <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
           <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
       </jms:address>   
   </jms:destination> 
@@ -78,7 +81,6 @@
           highWaterMark="5000"/>      
   </jms:destination>  
   
-  <!-- 
   <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
   </bean>
   <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"
@@ -88,11 +90,11 @@
   />
   
   <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration"
-  	p:jmsTemplate-ref="jmsTemplate"
+  	p:connectionFactory-ref="connectionFactory"
   	p:targetDestination="queue:test"
   	p:pubSubDomain="false"
   />
-
+<!--
   <bean class="org.apache.cxf.transport.jms.JMSTransportFactory"
 	  id="org.apache.cxf.transport.jms.JMSTransportFactory"
 	  lazy-init="true">



Mime
View raw message