cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r718665 - in /cxf/trunk: api/src/main/java/org/apache/cxf/continuations/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/ rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/co...
Date Tue, 18 Nov 2008 17:57:08 GMT
Author: sergeyb
Date: Tue Nov 18 09:57:07 2008
New Revision: 718665

URL: http://svn.apache.org/viewvc?rev=718665&view=rev
Log:
CXF-1835,CXF-1912:renaming ContinuationWrapper interface to Continuation, updating JMSDestination
to use ConcurrentLinkedQueue

Added:
    cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java   (with props)
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
      - copied, changed from r718565, cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapper.java
Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationWrapper.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapper.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapperTest.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapperTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/HelloImplWithWrapppedContinuation.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java

Added: cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java?rev=718665&view=auto
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java (added)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java Tue Nov 18
09:57:07 2008
@@ -0,0 +1,79 @@
+/**
+ * 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.continuations;
+
+/**
+ * Represents transport-neutral suspended invocation instances 
+ * or continuations
+ */
+public interface Continuation {
+    
+    /** 
+     * This method will suspend the request for the timeout or until resume is
+     * called
+     * 
+     * @param timeout. A timeout of < 0 will cause an immediate return.
+     * A timeout of 0 will wait indefinitely.
+     * @return True if resume called or false if timeout.
+     */
+    boolean suspend(long timeout);
+    
+    /** 
+     * Resume a suspended request  
+     */
+    void resume();
+    
+    /** 
+     * Reset the continuation
+     */
+    void reset();
+    
+    /** 
+     * Is this a newly created Continuation.
+     * @return True if the continuation has just been created and has not yet suspended the
request.
+     */
+    boolean isNew();
+    
+    /** 
+     * Get the pending status
+     * @return True if the continuation has been suspended.
+     */
+    boolean isPending();
+    
+    /** 
+     * Get the resumed status
+     * @return True if the continuation is has been resumed.
+     */
+    boolean isResumed();
+    
+    /** 
+     * Get arbitrary object associated with the continuation for context
+     * 
+     * @return An arbitrary object associated with the continuation
+     */
+    Object getObject();
+    
+    /** 
+     * Sets arbitrary object associated with the continuation for context
+     * 
+     * @param o An arbitrary object to associate with the continuation
+     */
+    void setObject(Object o);
+}

Propchange: cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/api/src/main/java/org/apache/cxf/continuations/Continuation.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/continuations/ContinuationProvider.java Tue
Nov 18 09:57:07 2008
@@ -29,5 +29,5 @@
      * Creates a new continuation or retrieves the existing one
      * @return transport-neutral ContinuationWrapper
      */
-    ContinuationWrapper getContinuation();
+    Continuation getContinuation();
 }

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationProvider.java
Tue Nov 18 09:57:07 2008
@@ -21,11 +21,9 @@
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
-import org.apache.cxf.continuations.ContinuationWrapper;
 import org.apache.cxf.message.Message;
-import org.mortbay.util.ajax.Continuation;
-import org.mortbay.util.ajax.ContinuationSupport;
 
 public class JettyContinuationProvider implements ContinuationProvider {
 
@@ -37,12 +35,11 @@
         this.inMessage = m;
     }
     
-    public ContinuationWrapper getContinuation() {
+    public Continuation getContinuation() {
         if (inMessage.getExchange().isOneWay()) {
             return null;
         }
-        Continuation cont = ContinuationSupport.getContinuation(request, null);
-        return new JettyContinuationWrapper(cont, inMessage);
+        return new JettyContinuationWrapper(request, inMessage);
     }
 
 }

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapper.java
Tue Nov 18 09:57:07 2008
@@ -19,21 +19,23 @@
 
 package org.apache.cxf.transport.http_jetty.continuations;
 
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationInfo;
-import org.apache.cxf.continuations.ContinuationWrapper;
 import org.apache.cxf.continuations.SuspendedInvocationException;
 import org.apache.cxf.message.Message;
 import org.mortbay.jetty.RetryRequest;
-import org.mortbay.util.ajax.Continuation;
+import org.mortbay.util.ajax.ContinuationSupport;
 
-public class JettyContinuationWrapper implements ContinuationWrapper {
+public class JettyContinuationWrapper implements Continuation {
 
-    private Continuation continuation;
+    private org.mortbay.util.ajax.Continuation continuation;
     private Message message;
     
     
-    public JettyContinuationWrapper(Continuation c, Message m) {
-        continuation = c; 
+    public JettyContinuationWrapper(HttpServletRequest request, Message m) {
+        continuation = ContinuationSupport.getContinuation(request, null); 
         message = m;
     }
 
@@ -95,7 +97,7 @@
         return message;
     }
     
-    protected Continuation getContinuation() {
+    protected org.mortbay.util.ajax.Continuation getContinuation() {
         return continuation;
     }
     

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapperTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapperTest.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapperTest.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/continuations/JettyContinuationWrapperTest.java
Tue Nov 18 09:57:07 2008
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.transport.http_jetty.continuations;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.cxf.continuations.ContinuationInfo;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -35,6 +37,7 @@
         ContinuationInfo ci = new ContinuationInfo(m);
         Object userObject = new Object();
         
+               
         Continuation c = EasyMock.createMock(Continuation.class);
         c.isNew();
         EasyMock.expectLastCall().andReturn(true);
@@ -55,7 +58,12 @@
         EasyMock.expectLastCall().andReturn(true);
         EasyMock.replay(c);
         
-        JettyContinuationWrapper cw = new JettyContinuationWrapper(c, m);
+        HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
+        request.getAttribute("org.mortbay.jetty.ajax.Continuation");
+        EasyMock.expectLastCall().andReturn(c);
+        EasyMock.replay(request);
+        
+        JettyContinuationWrapper cw = new JettyContinuationWrapper(request, m);
         cw.isNew();
         cw.isPending();
         cw.isResumed();

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Tue Nov 18 09:57:07 2008
@@ -25,12 +25,13 @@
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.util.Calendar;
+import java.util.Collection;
 import java.util.GregorianCalendar;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.SimpleTimeZone;
 import java.util.TimeZone;
+import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -56,8 +57,8 @@
 import org.apache.cxf.transport.AbstractMultiplexDestination;
 import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.MessageObserver;
+import org.apache.cxf.transport.jms.continuations.JMSContinuation;
 import org.apache.cxf.transport.jms.continuations.JMSContinuationProvider;
-import org.apache.cxf.transport.jms.continuations.JMSContinuationWrapper;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 import org.springframework.jms.core.JmsTemplate;
@@ -75,8 +76,8 @@
     private JMSConfiguration jmsConfig;
     private Bus bus;
     private DefaultMessageListenerContainer jmsListener;
-    private List<JMSContinuationWrapper> continuations = 
-        new LinkedList<JMSContinuationWrapper>();
+    private Collection<JMSContinuation> continuations = 
+        new ConcurrentLinkedQueue<JMSContinuation>();
 
     public JMSDestination(Bus b, EndpointInfo info, JMSConfiguration jmsConfig) {
         super(b, getTargetReference(info, b), info);

Copied: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
(from r718565, cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapper.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java?p2=cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java&p1=cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapper.java&r1=718565&r2=718665&rev=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationWrapper.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuation.java
Tue Nov 18 09:57:07 2008
@@ -19,23 +19,23 @@
 
 package org.apache.cxf.transport.jms.continuations;
 
-import java.util.List;
+import java.util.Collection;
 import java.util.Timer;
 import java.util.TimerTask;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.continuations.ContinuationWrapper;
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.SuspendedInvocationException;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.MessageObserver;
 
-public class JMSContinuationWrapper implements ContinuationWrapper {
+public class JMSContinuation implements Continuation {
 
     private Bus bus;
     private Message inMessage;
     private MessageObserver incomingObserver;
-    private List<JMSContinuationWrapper> continuations;
+    private Collection<JMSContinuation> continuations;
     
     private Object userObject;
     
@@ -44,10 +44,10 @@
     private boolean isResumed;
     private Timer timer = new Timer();
     
-    public JMSContinuationWrapper(Bus b,
+    public JMSContinuation(Bus b,
                                   Message m, 
                                   MessageObserver observer,
-                                  List<JMSContinuationWrapper> cList) {
+                                  Collection<JMSContinuation> cList) {
         bus = b;
         inMessage = m;    
         incomingObserver = observer;
@@ -87,9 +87,7 @@
             return;
         }
         
-        synchronized (continuations) {
-            continuations.remove(this);
-        }
+        continuations.remove(this);
         
         isResumed = true;
         isPending = false;
@@ -113,9 +111,7 @@
             return false;
         }
         
-        synchronized (continuations) {
-            continuations.add(this);
-        }
+        continuations.add(this);
         
         isNew = false;
         isResumed = false;

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProvider.java
Tue Nov 18 09:57:07 2008
@@ -19,11 +19,11 @@
 
 package org.apache.cxf.transport.jms.continuations;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
-import org.apache.cxf.continuations.ContinuationWrapper;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.MessageObserver;
 
@@ -32,29 +32,29 @@
     private Bus bus;
     private Message inMessage;
     private MessageObserver incomingObserver;
-    private List<JMSContinuationWrapper> continuations;
+    private Collection<JMSContinuation> continuations;
     
     public JMSContinuationProvider(Bus b,
                                    Message m, 
                                    MessageObserver observer,
-                                   List<JMSContinuationWrapper> cList) {
+                                   Collection<JMSContinuation> cList) {
         bus = b;
         inMessage = m;    
         incomingObserver = observer;
         continuations = cList;
     }
     
-    public ContinuationWrapper getContinuation() {
+    public Continuation getContinuation() {
         if (inMessage.getExchange().isOneWay()) {
             return null;
         }
-        JMSContinuationWrapper cw = inMessage.get(JMSContinuationWrapper.class);
+        JMSContinuation cw = inMessage.get(JMSContinuation.class);
         if (cw == null) {
-            cw = new JMSContinuationWrapper(bus,
+            cw = new JMSContinuation(bus,
                                            inMessage, 
                                            incomingObserver,
                                            continuations);
-            inMessage.put(JMSContinuationWrapper.class, cw);
+            inMessage.put(JMSContinuation.class, cw);
         }
         return cw;
         

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
Tue Nov 18 09:57:07 2008
@@ -19,7 +19,7 @@
 
 package org.apache.cxf.transport.jms.continuations;
 
-import org.apache.cxf.continuations.ContinuationWrapper;
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
@@ -45,19 +45,19 @@
         Message m = new MessageImpl();
         m.setExchange(new ExchangeImpl());
         JMSContinuationProvider provider = new JMSContinuationProvider(null, m, null, null);
-        ContinuationWrapper cw = provider.getContinuation(); 
+        Continuation cw = provider.getContinuation(); 
         assertTrue(cw.isNew());
-        assertSame(cw, m.get(JMSContinuationWrapper.class));
+        assertSame(cw, m.get(JMSContinuation.class));
     }
     
     @Test
     public void testGetExistingContinuation() {
         Message m = new MessageImpl();
         m.setExchange(new ExchangeImpl());
-        JMSContinuationWrapper cw = new JMSContinuationWrapper(null, m, null, null);
-        m.put(JMSContinuationWrapper.class, cw);
+        JMSContinuation cw = new JMSContinuation(null, m, null, null);
+        m.put(JMSContinuation.class, cw);
         JMSContinuationProvider provider = new JMSContinuationProvider(null, m, null, null);
         assertSame(cw, provider.getContinuation());
-        assertSame(cw, m.get(JMSContinuationWrapper.class));
+        assertSame(cw, m.get(JMSContinuation.class));
     }
 }

Modified: 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/JMSContinuationWrapperTest.java?rev=718665&r1=718664&r2=718665&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/JMSContinuationWrapperTest.java
Tue Nov 18 09:57:07 2008
@@ -37,22 +37,22 @@
 public class JMSContinuationWrapperTest extends Assert {
 
     private Message m;
-    private List<JMSContinuationWrapper> continuations;
+    private List<JMSContinuation> continuations;
     private Bus b;
     private MessageObserver observer;
     
     @Before
     public void setUp() {
         m = new MessageImpl();
-        continuations = new LinkedList<JMSContinuationWrapper>();
+        continuations = new LinkedList<JMSContinuation>();
         b = BusFactory.getDefaultBus();
         observer = EasyMock.createMock(MessageObserver.class);
     }
     
     @Test
     public void testInitialStatus() {
-        JMSContinuationWrapper cw = 
-            new JMSContinuationWrapper(b, m, observer, continuations);
+        JMSContinuation cw = 
+            new JMSContinuation(b, m, observer, continuations);
         assertTrue(cw.isNew());
         assertFalse(cw.isPending());
         assertFalse(cw.isResumed());
@@ -97,15 +97,15 @@
     
     @Test
     public void testUserObject() {
-        JMSContinuationWrapper cw = 
-            new JMSContinuationWrapper(b, m, observer, continuations);
+        JMSContinuation cw = 
+            new JMSContinuation(b, m, observer, continuations);
         assertNull(cw.getObject());
         Object userObject = new Object();
         cw.setObject(userObject);
         assertSame(userObject, cw.getObject());
     }
     
-    private static class TestJMSContinuationWrapper extends JMSContinuationWrapper {
+    private static class TestJMSContinuationWrapper extends JMSContinuation {
         
         private boolean taskCreated;
         private boolean taskCancelled;
@@ -113,7 +113,7 @@
         public TestJMSContinuationWrapper(Bus b,
                                           Message m, 
                                           MessageObserver observer,
-                                          List<JMSContinuationWrapper> cList) {
+                                          List<JMSContinuation> cList) {
             super(b, m, observer, cList);
         }
         

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/HelloImplWithWrapppedContinuation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/HelloImplWithWrapppedContinuation.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/HelloImplWithWrapppedContinuation.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/http_jetty/continuations/HelloImplWithWrapppedContinuation.java
Tue Nov 18 09:57:07 2008
@@ -24,8 +24,8 @@
 import javax.jws.WebService;
 import javax.xml.ws.WebServiceContext;
 
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
-import org.apache.cxf.continuations.ContinuationWrapper;
 
 
 @WebService(name = "HelloContinuation", 
@@ -36,8 +36,8 @@
 public class HelloImplWithWrapppedContinuation implements HelloContinuation {
     
     
-    private Map<String, ContinuationWrapper> suspended = 
-        new HashMap<String, ContinuationWrapper>();
+    private Map<String, Continuation> suspended = 
+        new HashMap<String, Continuation>();
     
     
     @Resource
@@ -45,7 +45,7 @@
     
     public String sayHi(String firstName, String secondName) {
         
-        ContinuationWrapper continuation = getContinuation(firstName);
+        Continuation continuation = getContinuation(firstName);
         if (continuation == null) {
             throw new RuntimeException("Failed to get continuation");
         }
@@ -87,7 +87,7 @@
 
     public void resumeRequest(final String name) {
         
-        ContinuationWrapper suspendedCont = null;
+        Continuation suspendedCont = null;
         synchronized (suspended) {
             suspendedCont = suspended.get(name);
         }
@@ -99,7 +99,7 @@
         }
     }
     
-    private void suspendInvocation(String name, ContinuationWrapper cont) {
+    private void suspendInvocation(String name, Continuation cont) {
         try {
             cont.suspend(20000);    
         } finally {
@@ -110,9 +110,9 @@
         }
     }
     
-    private ContinuationWrapper getContinuation(String name) {
+    private Continuation getContinuation(String name) {
         synchronized (suspended) {
-            ContinuationWrapper suspendedCont = suspended.remove(name);
+            Continuation suspendedCont = suspended.remove(name);
             if (suspendedCont != null) {
                 return suspendedCont;
             }

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
Tue Nov 18 09:57:07 2008
@@ -22,8 +22,8 @@
 import javax.jws.WebService;
 import javax.xml.ws.WebServiceContext;
 
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
-import org.apache.cxf.continuations.ContinuationWrapper;
 
 
 
@@ -52,7 +52,7 @@
     
     public String greetMe(String name) {
         
-        ContinuationWrapper continuation = getContinuation(name);
+        Continuation continuation = getContinuation(name);
         if (continuation == null) {
             throw new RuntimeException("Failed to get continuation");
         }
@@ -84,7 +84,7 @@
         return null;        
     }
     
-    private ContinuationWrapper getContinuation(String name) {
+    private Continuation getContinuation(String name) {
         
         ContinuationProvider provider = 
             (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java?rev=718665&r1=718664&r2=718665&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
(original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
Tue Nov 18 09:57:07 2008
@@ -29,8 +29,8 @@
 import javax.jws.WebService;
 import javax.xml.ws.WebServiceContext;
 
+import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.continuations.ContinuationProvider;
-import org.apache.cxf.continuations.ContinuationWrapper;
 import org.apache.cxf.systest.http_jetty.continuations.HelloContinuation;
 
 
@@ -43,8 +43,8 @@
             wsdlLocation = "org/apache/cxf/systest/jms/continuations/test.wsdl")
 public class HelloWorldWithContinuationsJMS implements HelloContinuation {    
     
-    private Map<String, ContinuationWrapper> suspended = 
-        new HashMap<String, ContinuationWrapper>();
+    private Map<String, Continuation> suspended = 
+        new HashMap<String, Continuation>();
     private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
                                         new ArrayBlockingQueue<Runnable>(10));
     
@@ -53,7 +53,7 @@
     
     public String sayHi(String firstName, String secondName) {
         
-        ContinuationWrapper continuation = getContinuation(firstName);
+        Continuation continuation = getContinuation(firstName);
         if (continuation == null) {
             throw new RuntimeException("Failed to get continuation");
         }
@@ -97,7 +97,7 @@
 
     public void resumeRequest(final String name) {
         
-        ContinuationWrapper suspendedCont = null;
+        Continuation suspendedCont = null;
         synchronized (suspended) {
             suspendedCont = suspended.get(name);
         }
@@ -109,7 +109,7 @@
         }
     }
     
-    private void suspendInvocation(final String name, ContinuationWrapper cont) {
+    private void suspendInvocation(final String name, Continuation cont) {
         
         System.out.println("Suspending invocation for " + name);
         
@@ -132,12 +132,12 @@
         }
     }
     
-    private ContinuationWrapper getContinuation(String name) {
+    private Continuation getContinuation(String name) {
         
         System.out.println("Getting continuation for " + name);
         
         synchronized (suspended) {
-            ContinuationWrapper suspendedCont = suspended.remove(name);
+            Continuation suspendedCont = suspended.remove(name);
             if (suspendedCont != null) {
                 return suspendedCont;
             }



Mime
View raw message