You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by an...@apache.org on 2006/11/29 13:32:50 UTC

svn commit: r480555 - in /incubator/cxf/trunk: distribution/src/main/release/samples/ws_rm/ distribution/src/main/release/samples/ws_rm/build/ distribution/src/main/release/samples/ws_rm/src/ distribution/src/main/release/samples/ws_rm/src/demo/ distri...

Author: andreasmyth
Date: Wed Nov 29 04:32:48 2006
New Revision: 480555

URL: http://svn.apache.org/viewvc?view=rev&rev=480555
Log:
Fixed minor issue in RM whereby SequenceAcknowledgement timer tasks had not been removed from queue once they were executed.
Added simple RM demo using oneway requests where every second message is lost and demonstrating retransmissions and server side originated out-of-band SequenceAcknowledgments (no README yet).

Added:
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/
    incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl   (with props)
Modified:
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml Wed Nov 29 04:32:48 2006
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<project name="WS-RM demo" default="build" basedir=".">
+
+    <import file="../common_build.xml"/>
+
+    <target name="client" description="run demo client" depends="build">
+        <cxfrun classname="demo.ws_rm.client.Client"
+                logging-properties-file="logging.properties"/>
+    </target>
+
+    <target name="server" description="run demo server" depends="build">
+        <cxfrun classname="demo.ws_rm.server.Server"
+                logging-properties-file="${basedir}/logging.properties"/>
+    </target>
+
+    <target name="generate.code">
+        <echo level="info" message="Generating code using wsdl2java..."/>
+        <wsdl2java file="hello_world_rm.wsdl"/>
+    </target>
+</project>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties Wed Nov 29 04:32:48 2006
@@ -0,0 +1,78 @@
+#    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.
+
+############################################################
+#  	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.  
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler 
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the WARNING and above levels.
+handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= WARNING
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+# Limit the message that are printed on the console to WARNING and above.
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#com.xyz.foo.level = SEVERE
+
+# Set log levels so that we can ob server the exchange of RM protocol messgaes
+# and the retransmission of application messages
+
+org.apache.cxf.interceptor.LoggingInInterceptor.level=INFO
+org.apache.cxf.interceptor.LoggingOutInterceptor.level=INFO
+org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.level=INFO

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/logging.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java Wed Nov 29 04:32:48 2006
@@ -0,0 +1,68 @@
+/**
+ * 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 demo.ws_rm.client;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.hello_world_soap_http.Greeter;
+import org.apache.cxf.hello_world_soap_http.GreeterService;
+
+
+public final class Client {
+    
+    private static final String USER_NAME = System.getProperty("user.name");
+
+    private Client() {
+    } 
+
+    public static void main(String args[]) throws Exception {
+        try { 
+       
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus("ws_rm.xml");
+            bf.setDefaultBus(bus);
+ 
+            GreeterService service = new GreeterService();
+            Greeter port = service.getGreeterPort();
+
+            String[] names = new String[] {"Anne", "Bill", "Chris", "Daisy"};
+            // make a sequence of 4 invocations
+            for (int i = 0; i < 4; i++) {
+                System.out.println("Invoking greetMeOneWay...");
+                port.greetMeOneWay(names[i]);
+                System.out.println("No response as method is OneWay\n");
+            }
+
+            // allow aynchronous resends to occur
+            Thread.sleep(30 * 1000);
+
+            bus.shutdown(true);
+
+        } catch (UndeclaredThrowableException ex) { 
+            ex.getUndeclaredThrowable().printStackTrace();
+        } catch (Exception ex) { 
+            ex.printStackTrace();
+        } finally { 
+            System.exit(0); 
+        }
+    }
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/client/Client.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java Wed Nov 29 04:32:48 2006
@@ -0,0 +1,134 @@
+/**
+ * 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 demo.ws_rm.common;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigInteger;
+import java.util.ListIterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.InterceptorChain;
+import org.apache.cxf.interceptor.MessageSenderInterceptor;
+import org.apache.cxf.io.AbstractWrappedOutputStream;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.phase.PhaseInterceptor;
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.rm.RMContextUtils;
+
+/**
+ * 
+ */
+public class MessageLossSimulator extends AbstractPhaseInterceptor<Message> {
+
+    private static final Logger LOG = Logger.getLogger(MessageLossSimulator.class.getName());
+    private int appMessageCount; 
+    
+    public MessageLossSimulator() {
+        super();
+        setPhase(Phase.PREPARE_SEND);
+        addBefore(MessageSenderInterceptor.class.getName());
+    }
+
+    /**
+      * Simulate loss of every second application message by replacing the stream normally 
+      * provided by the transport (in the MessageSenderInterceptor)/ 
+     */ 
+    public void handleMessage(Message message) throws Fault {
+        AddressingProperties maps =
+            RMContextUtils.retrieveMAPs(message, false, true);
+        RMContextUtils.ensureExposedVersion(maps);
+        String action = null;
+        if (maps != null && null != maps.getAction()) {
+            action = maps.getAction().getValue();
+        }
+        if (!RMContextUtils.isAplicationMessage(action)) {
+            return;
+        }
+        appMessageCount++;
+        if (0 != (appMessageCount % 2)) {
+            return;
+        }
+        
+        InterceptorChain chain = message.getInterceptorChain();
+        ListIterator it = chain.getIterator();
+        while (it.hasNext()) {
+            PhaseInterceptor pi = (PhaseInterceptor)it.next();
+            if (MessageSenderInterceptor.class.getName().equals(pi.getId())) {
+                chain.remove(pi);
+                LOG.fine("Removed MessageSenderInterceptor from interceptor chain.");
+                break;
+            }
+        }
+        
+        message.setContent(OutputStream.class, new WrappedOutputStream(message));     
+    }
+    
+    private class WrappedOutputStream extends AbstractWrappedOutputStream {
+
+        public WrappedOutputStream(Message m) {
+            super(m);
+            // TODO Auto-generated constructor stub
+        }
+
+        @Override
+        protected void doClose() throws IOException {
+            // TODO Auto-generated method stub
+            
+        }
+
+        @Override
+        protected void doFlush() throws IOException {
+            boolean af = alreadyFlushed();
+            if (!af) {
+                if (LOG.isLoggable(Level.INFO)) {
+                    BigInteger nr = RMContextUtils.retrieveRMProperties(outMessage, true)
+                        .getSequence().getMessageNumber();
+                    LOG.info("Losing message " + nr);
+                }
+                resetOut(new DummyOutputStream(), true);
+            }
+        }
+
+        @Override
+        protected void onWrite() throws IOException {
+            // TODO Auto-generated method stub
+            
+        } 
+        
+    }
+    
+    private class DummyOutputStream extends OutputStream {
+
+        @Override
+        public void write(int b) throws IOException {
+            // TODO Auto-generated method stub
+            
+        }
+        
+    }
+    
+    
+    
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/common/MessageLossSimulator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java Wed Nov 29 04:32:48 2006
@@ -0,0 +1,63 @@
+/**
+ * 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 demo.ws_rm.server;
+
+import java.util.logging.Logger;
+import org.apache.cxf.hello_world_soap_http.Greeter;
+
+@javax.jws.WebService(serviceName = "GreeterService",
+            portName = "GreeterPort",
+            endpointInterface = "org.apache.cxf.hello_world_soap_http.Greeter",
+            wsdlLocation = "file:./wsdl/hello_world_rm.wsdl",
+            targetNamespace = "http://cxf.apache.org/hello_world_soap_http")
+                  
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG = 
+        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+    
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#greetMe(java.lang.String)
+     */
+    public String greetMe(String me) {
+        LOG.info("Executing operation greetMe");
+        System.out.println("Executing operation greetMe");
+        System.out.println("Message received: " + me + "\n");
+        return "Hello " + me;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#greetMeOneWay(java.lang.String)
+     */
+    public void greetMeOneWay(String me) {
+        LOG.info("Executing operation greetMeOneWay");
+        System.out.println("Executing operation greetMeOneWay\n");
+        System.out.println("Hello there " + me);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.cxf.hello_world_soap_http.Greeter#sayHi()
+     */
+    public String sayHi() {
+        LOG.info("Executing operation sayHi");
+        System.out.println("Executing operation sayHi\n");
+        return "Bonjour";
+    }
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java Wed Nov 29 04:32:48 2006
@@ -0,0 +1,113 @@
+/**
+ * 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 demo.ws_rm.server;
+
+import java.util.concurrent.Future;
+import java.util.logging.Logger;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.PingMeFault;
+import org.apache.cxf.greeter_control.types.GreetMeResponse;
+import org.apache.cxf.greeter_control.types.PingMeResponse;
+import org.apache.cxf.greeter_control.types.SayHiResponse;
+
+/**
+ * 
+ */
+
+@WebService(serviceName = "GreeterService",
+            portName = "GreeterPort",
+            endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+            targetNamespace = "http://cxf.apache.org/greeter_control")
+public class GreeterImplInternal implements Greeter {
+
+    private static final Logger LOG = Logger.getLogger(GreeterImplInternal.class.getName());
+    private long delay;
+     
+    public long getDelay() {
+        return delay;
+    }
+
+    public void setDelay(long d) {
+        delay = d;
+    }
+
+    public String greetMe(String arg0) {
+        LOG.fine("Executing operation greetMe with parameter: " + arg0);
+        String result = arg0.toUpperCase();
+        if (delay > 0) {
+            try {
+                Thread.sleep(delay);
+            } catch (InterruptedException ex) {
+                // ignore
+            }
+        }
+        LOG.fine("returning: " + result);
+        return result;
+    }
+
+    public Future<?> greetMeAsync(String arg0, AsyncHandler<GreetMeResponse> arg1) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<GreetMeResponse> greetMeAsync(String arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void greetMeOneWay(String arg0) {
+        LOG.fine("Executing operation greetMeOneWay with parameter: " + arg0);
+    }
+
+    public void pingMe() throws PingMeFault {
+        LOG.fine("Executing operation pingMe");        
+    }
+
+    public Response<PingMeResponse> pingMeAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String sayHi() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Response<SayHiResponse> sayHiAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/GreeterImplInternal.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java Wed Nov 29 04:32:48 2006
@@ -0,0 +1,53 @@
+/**
+ * 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 demo.ws_rm.server;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+
+        Object implementor = new GreeterImpl();
+        String address = "http://localhost:9000/SoapContext/GreeterPort";
+        Endpoint e = Endpoint.publish(address, implementor);
+    }
+    
+    public static void main(String args[]) throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus("ws_rm.xml");
+        bf.setDefaultBus(bus);
+
+        new Server();
+        System.out.println("Server ready..."); 
+        
+        Thread.sleep(5 * 60 * 1000); 
+      
+        bus.shutdown(true);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/src/demo/ws_rm/server/Server.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml Wed Nov 29 04:32:48 2006
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xmlns:wsrm-mgmt="http://cxf.apache.org/ws/rm/manager"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+  
+    <bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator"/>
+    <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
+    <bean id="rmLogicalOut" class="org.apache.cxf.ws.rm.RMOutInterceptor">
+        <property name="bus" ref="cxf"/>
+    </bean>
+    <bean id="rmLogicalIn" class="org.apache.cxf.ws.rm.RMInInterceptor">
+        <property name="bus" ref="cxf"/>
+    </bean>
+    <bean id="rmCodec" class="org.apache.cxf.ws.rm.soap.RMSoapInterceptor"/>
+    <bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+    <bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+    <bean id="messageLoss" class="demo.ws_rm.common.MessageLossSimulator"/>
+
+    <!-- We are adding the interceptors to the bus as we will have only one endpoint/service/bus. -->
+
+    <bean id="cxf" class="org.apache.cxf.bus.spring.SpringBusImpl">
+        <property name="inInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalIn"/>
+                <ref bean="rmCodec"/>
+                <ref bean="logInbound"/>
+            </list>
+        </property>
+        <property name="inFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalIn"/>
+                <ref bean="rmCodec"/>
+                <ref bean="logInbound"/>
+            </list>
+        </property>
+        <property name="outInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalOut"/>
+                <ref bean="rmCodec"/>
+                <ref bean="logOutbound"/>
+                <ref bean="messageLoss"/>
+            </list>
+        </property>
+        <property name="outFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalOut"/>
+                <ref bean="rmCodec"/>
+                <ref bean="logOutbound"/>
+            </list>
+        </property>
+    </bean>
+
+    <bean name="{http://cxf.apache.org/hello_world_soap_http}GreeterPort.http-conduit" abstract="true">     
+        <property name="client">
+            <value>
+                <http-conf:client DecoupledEndpoint="http://localhost:9999/decoupled_endpoint"/>
+            </value>
+        </property>
+    </bean>
+
+    <bean id="org.apache.cxf.ws.rm.RMManager" class="org.apache.cxf.ws.rm.RMManager">
+        <property name="bus" ref="cxf"/>  
+        <property name="RMAssertion">
+            <value>
+                <wsrm-policy:RMAssertion>         
+                    <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>           
+                    <wsrm-policy:AcknowledgementInterval Milliseconds="2000"/>                                                        
+                </wsrm-policy:RMAssertion>
+            </value>
+        </property>  
+        <property name="destinationPolicy">
+            <value>
+                <wsrm-mgmt:destinationPolicy>
+                    <wsrm-mgmt:acksPolicy intraMessageThreshold="0"/>                    
+                </wsrm-mgmt:destinationPolicy>
+            </value>
+        </property>
+    </bean>
+
+
+</beans>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/ws_rm.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl?view=auto&rev=480555
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl Wed Nov 29 04:32:48 2006
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://cxf.apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://cxf.apache.org/hello_world_soap_http"
+    xmlns:x1="http://cxf.apache.org/hello_world_soap_http/types"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <wsdl:types>
+        <schema targetNamespace="http://cxf.apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+            <element name="sayHi">
+                <complexType/>
+            </element>
+            <element name="sayHiResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part element="x1:sayHi" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="x1:sayHiResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="Greeter">
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="sayHiRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="GreeterService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="GreeterPort">
+            <soap:address location="http://localhost:9000/SoapContext/GreeterPort"/>
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/08/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/ws_rm/wsdl/hello_world_rm.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java?view=diff&rev=480555&r1=480554&r2=480555
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java Wed Nov 29 04:32:48 2006
@@ -105,6 +105,7 @@
     }
     
     public void acknowledge(BigInteger messageNumber) throws SequenceFault {
+        LOG.fine("Acknowledging message: " + messageNumber);
         if (null != lastMessageNumber && messageNumber.compareTo(lastMessageNumber) > 0) {
             SequenceFaultType sf = RMUtils.getWSRMFactory().createSequenceFaultType();
             sf.setFaultCode(RMConstants.getLastMessageNumberExceededFaultCode());
@@ -265,8 +266,10 @@
         AcksPolicyType ap = destination.getManager().getDestinationPolicy().getAcksPolicy();
  
         if (delay > 0 && getMonitor().getMPM() >= ap.getIntraMessageThreshold()) {
+            LOG.fine("Schedule deferred acknowledgment");
             scheduleDeferredAcknowledgement(delay);
         } else {
+            LOG.fine("Schedule immediate acknowledgment");
             scheduleImmediateAcknowledgement();
         }
     }
@@ -307,6 +310,11 @@
             } catch (IOException ex) {
                 Message msg = new Message("SEQ_ACK_SEND_EXC", LOG, DestinationSequence.this);
                 LOG.log(Level.SEVERE, msg.toString(), ex);
+            } finally {
+                synchronized (DestinationSequence.this) {
+                    DestinationSequence.this.deferredAcknowledgments.remove(this);
+                }
+               
             }
 
         }