cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r719210 - in /cxf/trunk/rt/transports/jms/src: main/java/org/apache/cxf/transport/jms/continuations/ test/java/org/apache/cxf/transport/jms/continuations/
Date Thu, 20 Nov 2008 11:07:44 GMT
Author: sergeyb
Date: Thu Nov 20 03:07:44 2008
New Revision: 719210

URL: http://svn.apache.org/viewvc?rev=719210&view=rev
Log:
CXF-1912: minor updates to JMSContinuation

Added:
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationTest.java
      - copied, changed from r718665, cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java
Removed:
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java
Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java?rev=719210&r1=719209&r2=719210&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Thu Nov 20 03:07:44 2008
@@ -83,20 +83,19 @@
     }
     
     protected void doResume() {
-        if (isResumed) {
+        if (isResumed || !isPending) {
             return;
         }
         
         continuations.remove(this);
         
-        isResumed = true;
-        isPending = false;
-        isNew = false;
-
         BusFactory.setThreadDefaultBus(bus);
         try {
             incomingObserver.onMessage(inMessage);
         } finally {
+            isResumed = true;
+            isPending = false;
+            
             BusFactory.setThreadDefaultBus(null);
         }
     }
@@ -127,7 +126,9 @@
     protected void createTimerTask(long timeout) {
         timer.schedule(new TimerTask() {
             public void run() {
-                doResume();
+                synchronized (JMSContinuation.this) { 
+                    doResume();
+                }
             }
         }, timeout);
     }

Copied: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationTest.java
(from r718665, cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationTest.java?p2=cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationTest.java&p1=cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java&r1=718665&r2=719210&rev=719210&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationTest.java
Thu Nov 20 03:07:44 2008
@@ -34,7 +34,7 @@
 import org.junit.Test;
 
 
-public class JMSContinuationWrapperTest extends Assert {
+public class JMSContinuationTest extends Assert {
 
     private Message m;
     private List<JMSContinuation> continuations;



Mime
View raw message