cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r780918 - in /cxf/branches/2.1.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/test/resources/
Date Tue, 02 Jun 2009 03:03:42 GMT
Author: dkulp
Date: Tue Jun  2 03:03:41 2009
New Revision: 780918

URL: http://svn.apache.org/viewvc?rev=780918&view=rev
Log:
Merged revisions 780902 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r780902 | ningjiang | 2009-06-01 21:50:28 -0400 (Mon, 01 Jun 2009) | 1 line
  
  CXF-2243 applied patch with thanks to Ron
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
    cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/resources/jms_test_config.xml

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  2 03:03:41 2009
@@ -1 +1 @@
-/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800
+/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902

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

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java?rev=780918&r1=780917&r2=780918&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
Tue Jun  2 03:03:41 2009
@@ -37,7 +37,7 @@
      * if the setCacheLevel has been called.
      */
     public static final int DEFAULT_VALUE = -1;
-
+    
     static final boolean DEFAULT_USEJMS11 = false;
     
     private boolean usingEndpointInfo = true;
@@ -53,8 +53,7 @@
     private boolean messageIdEnabled = true;
     private boolean messageTimestampEnabled = true;
     private boolean pubSubNoLocal;
-    private long receiveTimeout;
-    // Repalce the JmsTemplate.RECEIVE_TIMEOUT_INDEFINITE_WAIT with 0 to support the Spring
2.0.x 
+    private Long receiveTimeout;
     private boolean explicitQosEnabled;
     private int deliveryMode = Message.DEFAULT_DELIVERY_MODE;
     private int priority = Message.DEFAULT_PRIORITY;
@@ -157,11 +156,11 @@
         this.pubSubNoLocal = pubSubNoLocal;
     }
 
-    public long getReceiveTimeout() {
+    public Long getReceiveTimeout() {
         return receiveTimeout;
     }
 
-    public void setReceiveTimeout(long receiveTimeout) {
+    public void setReceiveTimeout(Long receiveTimeout) {
         this.receiveTimeout = receiveTimeout;
     }
 

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java?rev=780918&r1=780917&r2=780918&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSFactory.java
Tue Jun  2 03:03:41 2009
@@ -92,7 +92,9 @@
         JmsTemplate jmsTemplate = jmsConfig.isUseJms11() ? new JmsTemplate() : new JmsTemplate102();
         jmsTemplate.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
         jmsTemplate.setPubSubDomain(jmsConfig.isPubSubDomain());
-        jmsTemplate.setReceiveTimeout(jmsConfig.getReceiveTimeout());
+        if (jmsConfig.getReceiveTimeout() != null) {
+            jmsTemplate.setReceiveTimeout(jmsConfig.getReceiveTimeout());
+        }
         jmsTemplate.setTimeToLive(jmsConfig.getTimeToLive());
         int priority = (headers != null && headers.isSetJMSPriority())
             ? headers.getJMSPriority() : jmsConfig.getPriority();
@@ -137,6 +139,9 @@
         jmsListener.setSessionTransacted(jmsConfig.isSessionTransacted());
         jmsListener.setTransactionManager(jmsConfig.getTransactionManager());
         jmsListener.setMessageListener(listenerHandler);
+        if (jmsConfig.getReceiveTimeout() != null) {
+            jmsListener.setReceiveTimeout(jmsConfig.getReceiveTimeout());
+        }
         if (jmsConfig.getRecoveryInterval() != JMSConfiguration.DEFAULT_VALUE) {
             jmsListener.setRecoveryInterval(jmsConfig.getRecoveryInterval());
         }

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java?rev=780918&r1=780917&r2=780918&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSOldConfigHolder.java
Tue Jun  2 03:03:41 2009
@@ -95,9 +95,9 @@
             }        
             jmsConfig.setPubSubDomain(pubSubDomain);
             jmsConfig.setPubSubNoLocal(true);
-            //if (clientConfig.isSetClientReceiveTimeout()) {
-            jmsConfig.setReceiveTimeout(clientConfig.getClientReceiveTimeout());
-            //}
+            if (clientConfig.isSetClientReceiveTimeout()) {
+                jmsConfig.setReceiveTimeout(clientConfig.getClientReceiveTimeout());
+            }
             if (clientConfig.isSetUseConduitIdSelector()) {
                 jmsConfig.setUseConduitIdSelector(clientConfig.isUseConduitIdSelector());
             }

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=780918&r1=780917&r2=780918&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Tue Jun  2 03:03:41 2009
@@ -62,7 +62,7 @@
                          "HelloWorldQueueBinMsgService", "HelloWorldQueueBinMsgPort");
         JMSConduit conduit = setupJMSConduit(false, false);
         assertEquals("Can't get the right ClientReceiveTimeout", 500L, conduit.getJmsConfig()
-            .getReceiveTimeout());
+            .getReceiveTimeout().longValue());
         bus.shutdown(false);
         BusFactory.setDefaultBus(null);
         conduit.close();
@@ -93,7 +93,7 @@
         setupServiceInfo("http://cxf.apache.org/hello_world_jms", "/wsdl/jms_test.wsdl",
                          "HelloWorldServiceLoop", "HelloWorldPortLoop");
         JMSConduit conduit = setupJMSConduit(true, false);
-        conduit.getJmsConfig().setReceiveTimeout(10000);
+        conduit.getJmsConfig().setReceiveTimeout(Long.valueOf(10000));
 
         try {
             for (int c = 0; c < 10; c++) {
@@ -121,7 +121,7 @@
 
         JMSConduit conduit = setupJMSConduit(true, false);
         // TODO IF the system is extremely fast. The message could still get through
-        conduit.getJmsConfig().setReceiveTimeout(1);
+        conduit.getJmsConfig().setReceiveTimeout(Long.valueOf(1));
         Message message = new MessageImpl();
         try {
             sendoutMessage(conduit, message, false);

Modified: cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java?rev=780918&r1=780917&r2=780918&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
Tue Jun  2 03:03:41 2009
@@ -125,6 +125,7 @@
                          "HelloWorldQueueBinMsgService", "HelloWorldQueueBinMsgPort");
         destination = setupJMSDestination(false);
         jmsConfig = destination.getJmsConfig();*/
+        assertEquals("The receiveTimeout should be set", jmsConfig.getReceiveTimeout().longValue(),
1500L);
         assertEquals("The concurrentConsumer should be set", jmsConfig.getConcurrentConsumers(),
3);
         assertEquals("The maxConcurrentConsumer should be set", jmsConfig.getMaxConcurrentConsumers(),
5);
         assertEquals("The maxSuspendedContinuations should be set", 

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=780918&r1=780917&r2=780918&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 Tue
Jun  2 03:03:41 2009
@@ -105,6 +105,7 @@
   	p:replyDestination="queue:test.reply"
   	p:pubSubDomain="false"
   	p:usingEndpointInfo="false"
+    p:receiveTimeout="1500"
   	p:concurrentConsumers="3"
   	p:maxConcurrentConsumers="5"
   	p:maxSuspendedContinuations="2"



Mime
View raw message