cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r542790 - in /incubator/cxf/trunk: rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm...
Date Wed, 30 May 2007 10:10:42 GMT
Author: andreasmyth
Date: Wed May 30 03:10:40 2007
New Revision: 542790

URL: http://svn.apache.org/viewvc?view=rev&rev=542790
Log:
[JIRA CXF-139] Server-side recovery.
System test with client surviving server crash and receiving asynchronous response from restarted
Server.
Note that for the resent response to actually make it back to the client (execution of callback
or availability in Response object) the server MUST use the same WSA-MessageID for the resent
response (cf. https://issues.apache.org/jira/browse/CXF-352).
Client silently (logging a WARNING) discards second and all following responses (aborts the
interceptor chain) so in that case a violation of the AtMostOnce delivery assurance cannot
be reported. This is necessary because a) correlation is only possibly once and b) most interceptors
are not capable to deal with the temporary exchange object (the exchange that is associated
with the message if no correlation takes place).
Fixed threading issues in transactional store (connection and statements are shared).



Added:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
  (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
  (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
  (with props)
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
  (with props)
Removed:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/DecoupledAsyncTest.java
Modified:
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
    incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/Messages.properties
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionCallback.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/RMMessage.java
    incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/OutMessageRecorder.java

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
Wed May 30 03:10:40 2007
@@ -379,8 +379,6 @@
                 if (null != referenceParameterHeaders && null != maps) {
                     decodeReferenceParameters(referenceParameterHeaders, maps, unmarshaller);
                 }
-                restoreExchange(message, maps);
-                markPartialResponse(message, maps);
             }
         } catch (JAXBException je) {
             LOG.log(Level.WARNING, "SOAP_HEADER_DECODE_FAILURE_MSG", je); 
@@ -618,6 +616,9 @@
                         }
                     }
                 }
+            } else {
+                LOG.log(Level.WARNING, "CORRELATION_FAILURE_MSG");
+                message.getInterceptorChain().abort();
             }
         }
     }

Modified: incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/Messages.properties?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/Messages.properties
(original)
+++ incubator/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/Messages.properties
Wed May 30 03:10:40 2007
@@ -22,3 +22,4 @@
 SOAP_HEADER_DECODE_FAILURE_MSG = WS-Addressing - decoding Message Addressing Properties from
SOAP Headers failed:
 UNSUPPORTED_VERSION_MSG = Unsupported WS-Addressing version {0}
 IGNORE_NON_ELEMENT_REF_PARAM_MSG = Ignoring reference parameter {0} because it is not a JAXBElement
+CORRELATION_FAILURE_MSG = Failed to correlate message, aborting dispatch.

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMManager.java Wed May
30 03:10:40 2007
@@ -417,7 +417,13 @@
                 }
                 RMProperties rmps = new RMProperties();
                 rmps.setSequence(st);
-                RMContextUtils.storeRMProperties(message, rmps, true);
+                RMContextUtils.storeRMProperties(message, rmps, true);                
+                if (null == conduit) {
+                    String to = m.getTo();
+                    AddressingProperties maps = new AddressingPropertiesImpl();
+                    maps.setTo(RMUtils.createReference(to));
+                    RMContextUtils.storeMAPs(maps, message, true, false);
+                }
                                     
                 message.setContent(byte[].class, m.getContent());
                           

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionCallback.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionCallback.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionCallback.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RetransmissionCallback.java
Wed May 30 03:10:40 2007
@@ -25,6 +25,8 @@
 import org.apache.cxf.io.AbstractCachedOutputStream;
 import org.apache.cxf.io.CachedOutputStreamCallback;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
+import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.rm.persistence.RMMessage;
 import org.apache.cxf.ws.rm.persistence.RMStore;
 
@@ -59,6 +61,12 @@
                 SourceSequence ss = s.getSequence(sid);
                 RMMessage msg = new RMMessage();
                 msg.setMessageNumber(rmps.getSequence().getMessageNumber());
+                if (!MessageUtils.isRequestor(message)) {
+                    AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false,
true);
+                    if (null != maps && null != maps.getTo()) {
+                        msg.setTo(maps.getTo().getValue());
+                    }
+                }
                 msg.setContent(bos.toByteArray());
                 store.persistOutgoing(ss, msg); 
             }

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/RMMessage.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/RMMessage.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/RMMessage.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/RMMessage.java
Wed May 30 03:10:40 2007
@@ -25,6 +25,7 @@
     
     private byte[] content;
     private BigInteger messageNumber;
+    private String to;
     
     /**
      * Returns the message number of the message within its sequence.
@@ -58,6 +59,23 @@
      */
     public void setContent(byte[] c) {
         content = c;
+    }
+    
+    /**
+     * Returns the to address of this message.
+     * @return the to address
+     */
+    public String getTo() {
+        return to;
+    }
+    
+    
+    /**
+     * Sets the to address of this message.
+     * @param t the to address
+     */
+    public void setTo(String t) {
+        to = t;
     }
 
 

Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
Wed May 30 03:10:40 2007
@@ -36,6 +36,8 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -57,7 +59,7 @@
 
 public class RMTxStore implements RMStore {
     
-    public static final String DEFAULT_DATABASE_DIR = "rmdb";
+    public static final String DEFAULT_DATABASE_NAME = "rmdb";
     
     private static final String CREATE_DEST_SEQUENCES_TABLE_STMT =
         "CREATE TABLE CXF_RM_DEST_SEQUENCES " 
@@ -80,6 +82,7 @@
         "CREATE TABLE {0} " 
         + "(SEQ_ID VARCHAR(256) NOT NULL, "
         + "MSG_NO DECIMAL(31, 0) NOT NULL, "
+        + "SEND_TO VARCHAR(256), "
         + "CONTENT BLOB, "
         + "PRIMARY KEY (SEQ_ID, MSG_NO))";
     private static final String INBOUND_MSGS_TABLE_NAME = "CXF_RM_INBOUND_MESSAGES";
@@ -99,7 +102,7 @@
     private static final String UPDATE_SRC_SEQUENCE_STMT_STR =
         "UPDATE CXF_RM_SRC_SEQUENCES SET CUR_MSG_NO = ?, LAST_MSG = ? WHERE SEQ_ID = ?";
     private static final String CREATE_MESSAGE_STMT_STR 
-        = "INSERT INTO {0} VALUES(?, ?, ?)";
+        = "INSERT INTO {0} VALUES(?, ?, ?, ?)";
     private static final String DELETE_MESSAGE_STMT_STR =
         "DELETE FROM {0} WHERE SEQ_ID = ? AND MSG_NO = ?";
     private static final String SELECT_DEST_SEQUENCES_STMT_STR =
@@ -109,11 +112,12 @@
         "SELECT SEQ_ID, CUR_MSG_NO, LAST_MSG, EXPIRY, OFFERING_SEQ_ID FROM CXF_RM_SRC_SEQUENCES
"
         + "WHERE ENDPOINT_ID = ?";
     private static final String SELECT_MESSAGES_STMT_STR =
-        "SELECT MSG_NO, CONTENT FROM {0} WHERE SEQ_ID = ?";
+        "SELECT MSG_NO, SEND_TO, CONTENT FROM {0} WHERE SEQ_ID = ?";
     
     private static final Logger LOG = LogUtils.getL7dLogger(RMTxStore.class);
     
     private Connection connection;
+    private Lock writeLock = new ReentrantLock();
 
     private PreparedStatement createDestSequenceStmt;
     private PreparedStatement createSrcSequenceStmt;
@@ -131,7 +135,7 @@
     private PreparedStatement selectOutboundMessagesStmt;
     
     private String driverClassName = "org.apache.derby.jdbc.EmbeddedDriver";
-    private String url = MessageFormat.format("jdbc:derby:{0};create=true", DEFAULT_DATABASE_DIR);
+    private String url = MessageFormat.format("jdbc:derby:{0};create=true", DEFAULT_DATABASE_NAME);
     private String userName;
     private String password;
     
@@ -342,10 +346,12 @@
             ResultSet res = stmt.executeQuery();
             while (res.next()) {
                 BigInteger mn = res.getBigDecimal(1).toBigInteger();
-                Blob blob = res.getBlob(2);
+                String to = res.getString(2);
+                Blob blob = res.getBlob(3);
                 byte[] bytes = blob.getBytes(1, (int)blob.length());     
                 RMMessage msg = new RMMessage();
                 msg.setMessageNumber(mn);
+                msg.setTo(to);
                 msg.setContent(bytes);
                 msgs.add(msg);                
             }            
@@ -423,13 +429,19 @@
     }
 
     // transaction demarcation
+    // 
     
     protected void beginTransaction() {
-        // no-op 
+        // avoid sharing of statements and result sets
+        writeLock.lock();
     }
     
     protected void commit() throws SQLException {
-        connection.commit();
+        try {
+            connection.commit();
+        } finally {
+            writeLock.unlock();
+        }
     }
     
     protected void abort() {
@@ -437,7 +449,9 @@
             connection.rollback(); 
         } catch (SQLException ex) {
             LogUtils.log(LOG, Level.SEVERE, "ABORT_FAILED_MSG", ex);
-        }     
+        } finally {
+            writeLock.unlock();
+        }
     }
     
     // helpers
@@ -446,8 +460,9 @@
         throws IOException, SQLException {
         String id = sid.getValue();
         BigInteger nr = msg.getMessageNumber();
-        LOG.log(Level.FINE, "Storing {0} message number {1} for sequence {2}",
-            new Object[] {outbound ? "outbound" : "inbound", nr, id});
+        String to = msg.getTo();
+        LOG.log(Level.FINE, "Storing {0} message number {1} for sequence {2}, to = {3}",
+            new Object[] {outbound ? "outbound" : "inbound", nr, id, to});
         PreparedStatement stmt = outbound ? createOutboundMessageStmt : createInboundMessageStmt;
         if (null == stmt) {
             stmt = connection.prepareStatement(MessageFormat.format(CREATE_MESSAGE_STMT_STR,
@@ -458,14 +473,16 @@
                 createInboundMessageStmt = stmt;
             }
         }
-
         int i = 1;
         stmt.setString(i++, id);  
-        stmt.setBigDecimal(i++, new BigDecimal(nr)); 
+        stmt.setBigDecimal(i++, new BigDecimal(nr));
+        stmt.setString(i++, to); 
         byte[] bytes = msg.getContent();    
         stmt.setBinaryStream(i++, new ByteArrayInputStream(bytes), bytes.length);
-        
         stmt.execute();
+        LOG.log(Level.FINE, "Successfully stored {0} message number {1} for sequence {2}",
+                new Object[] {outbound ? "outbound" : "inbound", nr, id});
+        
     }
     
     protected void updateSourceSequence(SourceSequence seq) 
@@ -579,20 +596,20 @@
     }
     
     public static void deleteDatabaseFiles() {
-        deleteDatabaseFiles(DEFAULT_DATABASE_DIR, true);
+        deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true);
     }
     
-    public static void deleteDatabaseFiles(String path, boolean now) {
+    public static void deleteDatabaseFiles(String dbName, boolean now) {
         String dsh = System.getProperty("derby.system.home");
        
         File root = null;  
         File log = null;
         if (null == dsh) {
             log = new File("derby.log");
-            root = new File(path);            
+            root = new File(dbName);            
         } else {
             log = new File(dsh, "derby.log"); 
-            root = new File(dsh, path);
+            root = new File(dsh, dbName);
         }
         if (log.exists()) {            
             if (now) {

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java Wed
May 30 03:10:40 2007
@@ -568,6 +568,9 @@
         EasyMock.expect(ss.isLastMessage()).andReturn(true);
         EasyMock.expect(ss.getCurrentMessageNr()).andReturn(BigInteger.TEN);
         EasyMock.expect(m.getMessageNumber()).andReturn(BigInteger.TEN).times(2);
+        if (null == conduit) {
+            EasyMock.expect(m.getTo()).andReturn("toAddress");
+        }
         byte[] content = new byte[] {'x', '9'};
         EasyMock.expect(m.getContent()).andReturn(content);
         queue.addUnacknowledged(EasyMock.isA(Message.class));

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStoreTest.java
Wed May 30 03:10:40 2007
@@ -97,7 +97,7 @@
             ex.printStackTrace();
         }
         */
-        RMTxStore.deleteDatabaseFiles(RMTxStore.DEFAULT_DATABASE_DIR, false);
+        RMTxStore.deleteDatabaseFiles(RMTxStore.DEFAULT_DATABASE_NAME, false);
     }
     
     
@@ -419,8 +419,8 @@
         assertEquals(0, out.size());
         
         try {
-            setupMessage(sid1, BigInteger.ONE, true);
-            setupMessage(sid1, BigInteger.ONE, false);
+            setupMessage(sid1, BigInteger.ONE, null, true);
+            setupMessage(sid1, BigInteger.ONE, null, false);
 
             out = store.getMessages(sid1, true);
             assertEquals(1, out.size());
@@ -430,8 +430,8 @@
             assertEquals(1, in.size());
             checkRecoveredMessages(in);
             
-            setupMessage(sid1, BigInteger.TEN, true);
-            setupMessage(sid1, BigInteger.TEN, false);
+            setupMessage(sid1, BigInteger.TEN, NON_ANON_ACKS_TO, true);
+            setupMessage(sid1, BigInteger.TEN, NON_ANON_ACKS_TO, false);
             
             out = store.getMessages(sid1, true);
             assertEquals(2, out.size());
@@ -518,10 +518,11 @@
         return sid;
     }
     
-    private void setupMessage(Identifier sid, BigInteger mn, boolean outbound) 
+    private void setupMessage(Identifier sid, BigInteger mn, String to, boolean outbound)

         throws IOException, SQLException  {
         RMMessage msg = control.createMock(RMMessage.class);
         EasyMock.expect(msg.getMessageNumber()).andReturn(mn);
+        EasyMock.expect(msg.getTo()).andReturn(to);
         String value = "Message " + mn.longValue();
         EasyMock.expect(msg.getContent()).andReturn(value.getBytes());
         
@@ -582,6 +583,11 @@
         for (RMMessage msg : msgs) {
             BigInteger mn = msg.getMessageNumber();
             assertTrue(BigInteger.ONE.equals(mn) || BigInteger.TEN.equals(mn));
+            if (BigInteger.TEN.equals(mn)) {
+                assertEquals(NON_ANON_ACKS_TO, msg.getTo());
+            } else {
+                assertNull(msg.getTo());
+            }
             byte[] actual = msg.getContent();
             assertEquals(new String("Message " + mn.longValue()), new String(actual));
         }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
Wed May 30 03:10:40 2007
@@ -71,7 +71,7 @@
 
         protected void run() {
             SpringBusFactory bf = new SpringBusFactory();
-            Bus bus = bf.createBus("/org/apache/cxf/systest/ws/rm/oneway-client-crash.xml");
+            Bus bus = bf.createBus("/org/apache/cxf/systest/ws/rm/persistent.xml");
             BusFactory.setDefaultBus(bus);
             
             LoggingInInterceptor logIn = new LoggingInInterceptor();
@@ -117,7 +117,7 @@
     
     @AfterClass
     public static void tearDownOnce() {
-        RMTxStore.deleteDatabaseFiles(RMTxStore.DEFAULT_DATABASE_DIR, false);
+        RMTxStore.deleteDatabaseFiles(RMTxStore.DEFAULT_DATABASE_NAME, false);
     }
 
     @Test 
@@ -134,7 +134,7 @@
     void startClient() {
         LOG.fine("Creating greeter client");
         SpringBusFactory bf = new SpringBusFactory();
-        bus = bf.createBus("/org/apache/cxf/systest/ws/rm/oneway-client-crash.xml");
+        bus = bf.createBus("/org/apache/cxf/systest/ws/rm/persistent.xml");
         BusFactory.setDefaultBus(bus);
 
         GreeterService gs = new GreeterService();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
Wed May 30 03:10:40 2007
@@ -41,19 +41,26 @@
 
     @Override
     public boolean startGreeter(String cfgResource) {
-        SpringBusFactory bf = new SpringBusFactory();
-        greeterBus = bf.createBus(cfgResource);
-        BusFactory.setDefaultBus(greeterBus);
-        LOG.info("Initialised bus with cfg file resource: " + cfgResource);
-        
-        Interceptor logIn = new LoggingInInterceptor();
-        Interceptor logOut = new LoggingOutInterceptor();
-        greeterBus.getInInterceptors().add(logIn);
-        greeterBus.getOutInterceptors().add(logOut);
-        greeterBus.getOutFaultInterceptors().add(logOut);
-        
-        Endpoint.publish(address, implementor);
-        LOG.info("Published greeter endpoint.");
+        String derbyHome = System.getProperty("derby.system.home"); 
+        try {
+            System.setProperty("derby.system.home", derbyHome + "-server");   
+            SpringBusFactory bf = new SpringBusFactory();
+            greeterBus = bf.createBus(cfgResource);
+            BusFactory.setDefaultBus(greeterBus);
+            LOG.info("Initialised bus " + greeterBus + " with cfg file resource: " + cfgResource);
+            LOG.fine("greeterBus inInterceptors: " + greeterBus.getInInterceptors());
+
+            Interceptor logIn = new LoggingInInterceptor();
+            Interceptor logOut = new LoggingOutInterceptor();
+            greeterBus.getInInterceptors().add(logIn);
+            greeterBus.getOutInterceptors().add(logOut);
+            greeterBus.getOutFaultInterceptors().add(logOut);
+
+            Endpoint.publish(address, implementor);
+            LOG.info("Published greeter endpoint.");
+        } finally {
+            System.setProperty("derby.system.home", derbyHome);
+        }
         
         return true;        
     }

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java?view=auto&rev=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
Wed May 30 03:10:40 2007
@@ -0,0 +1,36 @@
+/**
+ * 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.systest.ws.rm;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.greeter_control.AbstractGreeterImpl;
+
+/**
+ * 
+ */
+
+@WebService(serviceName = "GreeterService",
+            portName = "GreeterPort",
+            endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+            targetNamespace = "http://cxf.apache.org/greeter_control",
+            wsdlLocation = "testutils/greeter_control.wsdl")
+public class PersistentGreeterImpl extends AbstractGreeterImpl {
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/PersistentGreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java Wed
May 30 03:10:40 2007
@@ -38,6 +38,7 @@
         BusFactory.setDefaultBus(bus);
         setBus(bus);
 
+        System.out.println("Created control bus " + bus);
         ControlImpl implementor = new ControlImpl();
         GreeterImpl greeterImplementor = new GreeterImpl();
         implementor.setImplementor(greeterImplementor);

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java?view=auto&rev=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
Wed May 30 03:10:40 2007
@@ -0,0 +1,223 @@
+/**
+ * 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.systest.ws.rm;
+
+import java.util.logging.Logger;
+
+import javax.xml.ws.Response;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.greeter_control.Control;
+import org.apache.cxf.greeter_control.ControlService;
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.GreeterService;
+import org.apache.cxf.greeter_control.types.GreetMeResponse;
+import org.apache.cxf.systest.ws.util.InMessageRecorder;
+import org.apache.cxf.systest.ws.util.MessageFlow;
+import org.apache.cxf.systest.ws.util.MessageRecorder;
+import org.apache.cxf.systest.ws.util.OutMessageRecorder;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.apache.cxf.ws.rm.RMConstants;
+import org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests the addition of WS-RM properties to application messages and the
+ * exchange of WS-RM protocol messages.
+ */
+public class ServerPersistenceTest extends AbstractBusClientServerTestBase {
+
+    public static final String GREETMEONEWAY_ACTION = null;
+    public static final String GREETME_ACTION = null;
+    private static final Logger LOG = Logger.getLogger(ServerPersistenceTest.class.getName());
+    private static final String CFG = "/org/apache/cxf/systest/ws/rm/persistent.xml";
+    private static final String SERVER_LOSS_CFG 
+        = "/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml";
+
+    private OutMessageRecorder out;
+    private InMessageRecorder in;
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        RMTxStore.deleteDatabaseFiles();
+        String derbyHome = System.getProperty("derby.system.home"); 
+        try {
+            System.setProperty("derby.system.home", derbyHome + "-server");
+            RMTxStore.deleteDatabaseFiles();
+        } finally {
+            System.setProperty("derby.system.home", derbyHome);
+        }
+        
+        // run server in process to avoid a problem with UUID generation
+        // during asynchronous invocations
+
+        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
+        assertTrue("server did not launch correctly", launchServer(Server.class, inProcess));
 
+    }
+    
+    @Test 
+    public void testRecovery() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        bus = bf.createBus();
+        BusFactory.setDefaultBus(bus);        
+        LOG.fine("Created bus " + bus + " with default cfg");
+        ControlService cs = new ControlService();
+        Control control = cs.getControlPort();
+        
+        assertTrue("Failed to start greeter", control.startGreeter(SERVER_LOSS_CFG)); 
+        LOG.fine("Started greeter server.");
+        
+        Bus greeterBus = new SpringBusFactory().createBus(CFG);
+        LOG.fine("Created bus " + greeterBus + " with cfg : " + CFG);
+        BusFactory.setDefaultBus(greeterBus);
+        GreeterService gs = new GreeterService();
+        Greeter greeter = gs.getGreeterPort();
+        
+        LOG.fine("Created greeter client.");
+  
+        Client c = ClientProxy.getClient(greeter);
+        HTTPConduit hc = (HTTPConduit)(c.getConduit());
+        HTTPClientPolicy cp = hc.getClient();
+        cp.setDecoupledEndpoint("http://localhost:9994/decoupled_endpoint");
+
+        out = new OutMessageRecorder();
+        in = new InMessageRecorder();
+
+        greeterBus.getOutInterceptors().add(out);
+        greeterBus.getInInterceptors().add(in);
+        
+        LOG.fine("Configured greeter client.");
+
+        Response<GreetMeResponse> responses[] = cast(new Response[3]);
+        
+        responses[0] = greeter.greetMeAsync("one");
+        responses[1] = greeter.greetMeAsync("two");
+        responses[2] = greeter.greetMeAsync("three");
+        
+        verifyMissingResponse(responses);
+        control.stopGreeter(SERVER_LOSS_CFG);
+        LOG.fine("Stopped greeter server");
+       
+        out.getOutboundMessages().clear();
+        in.getInboundMessages().clear();
+        
+        control.startGreeter(CFG);
+        String nl = System.getProperty("line.separator");
+        LOG.fine("Restarted greeter server" + nl + nl);
+        
+        verifyServerRecovery(responses);
+        
+        greeterBus.shutdown(true);
+        
+        control.stopGreeter(CFG);
+        bus.shutdown(true);
+    }
+    
+    void verifyMissingResponse(Response<GreetMeResponse> responses[]) throws Exception
{
+        awaitMessages(4, 7);
+        // wait another while to prove that response to second request is indeed lost
+        Thread.sleep(1000);
+        int nDone = 0;
+        for (int i = 0; i < responses.length; i++) {
+            if (responses[i].isDone()) {
+                nDone++;
+            }
+        }
+        
+        assertEquals("Unexpected number of responses already received.", 2, nDone);
+        
+        MessageFlow mf = new MessageFlow(out.getOutboundMessages(), in.getInboundMessages());
+        String[] expectedActions = new String[] {RMConstants.getCreateSequenceAction(),
+                                                 GREETME_ACTION,
+                                                 GREETME_ACTION,
+                                                 GREETME_ACTION};
+        mf.verifyActions(expectedActions, true);
+        // mf.verifyMessageNumbers(new String[] {null, "1", "2", "3"}, true);
+        // mf.verifyAcknowledgements(new boolean[] {false, false, true, false}, true);
+        
+        mf.verifyPartialResponses(4);
+        mf.purgePartialResponses();
+        expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
+                                        GREETME_ACTION,
+                                        GREETME_ACTION};
+        mf.verifyActions(expectedActions, false);
+        // mf.verifyMessageNumbers(new String[] {null, "1", "3"}, false);
+        // mf.verifyAcknowledgements(new boolean[] {false, true, true}, false);    
+    }
+    
+    void verifyServerRecovery(Response<GreetMeResponse> responses[]) throws Exception
{
+   
+        // wait until all messages have received their responses
+        int nDone = 0;
+        long waited = 0;
+        while (waited < 5000) {
+            for (int i = 0; i < responses.length; i++) {
+                if (responses[i].isDone()) {
+                    nDone++;
+                }
+            }
+            if (nDone == 3) {
+                break;
+            }
+            Thread.sleep(500);
+            nDone = 0;
+        }
+        
+        assertEquals("Not all responses have been received.", 3, nDone);
+
+        // verify that all inbound messages are resent responses
+        
+        synchronized (this) {
+            MessageFlow mf = new MessageFlow(out.getOutboundMessages(), in.getInboundMessages());
+            int nOut = out.getOutboundMessages().size();
+            int nIn = in.getInboundMessages().size();
+            assertEquals("Unexpected outbound message(s)", 0, nOut);
+            assertTrue(nIn >= 1);
+            String[] expectedActions = new String[nIn];
+            for (int i = 0; i < nIn; i++) {
+                expectedActions[i] = GREETME_ACTION;
+            }
+            mf.verifyActions(expectedActions, false);
+        }
+    }
+  
+    
+    private void awaitMessages(int nExpectedOut, int nExpectedIn) {
+        awaitMessages(nExpectedOut, nExpectedIn, 10000);
+    }
+    
+    private void awaitMessages(int nExpectedOut, int nExpectedIn, int timeout) {
+        MessageRecorder mr = new MessageRecorder(out, in);
+        mr.awaitMessages(nExpectedOut, nExpectedIn, timeout);
+    }
+    
+    @SuppressWarnings("unchecked")
+    <T> Response<T>[] cast(Response[] val) {
+        return (Response<T>[])val;
+    }
+
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/ServerPersistenceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml?view=auto&rev=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
Wed May 30 03:10:40 2007
@@ -0,0 +1,94 @@
+<?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:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd
+http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/ws/rm/manager.xsd
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+http://cxf.apache.org/configuration/beans http://cxf.apache.org/schemas/configuration/cxf-beans.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+    
+    <!--
+    <import resource="message-loss-server.xml"/>
+    -->
+    
+    <bean class="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
+    
+    <wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">          
+      <wsrm-policy:RMAssertion>
+			<wsrm-policy:BaseRetransmissionInterval Milliseconds="60000" />
+	  </wsrm-policy:RMAssertion>
+	  <property name="store" ref="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
+    </wsrm-mgr:rmManager>
+    
+    <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="messageLoss" class="org.apache.cxf.systest.ws.rm.MessageLossSimulator"/>
+    
+    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
+        <property name="inInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalIn"/>
+                <ref bean="rmCodec"/>
+            </list>
+        </property>
+        <property name="inFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalIn"/>
+                <ref bean="rmCodec"/>
+            </list>
+        </property>
+        <property name="outInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalOut"/>
+                <ref bean="rmCodec"/>
+                <ref bean="messageLoss"/>
+            </list>
+        </property>
+        <property name="outFaultInterceptors">
+            <list>
+                <ref bean="mapAggregator"/>
+                <ref bean="mapCodec"/>
+                <ref bean="rmLogicalOut"/>
+                <ref bean="rmCodec"/>
+            </list>
+        </property>
+    </bean>
+	
+	
+    
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent-message-loss-server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml?view=auto&rev=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
Wed May 30 03:10:40 2007
@@ -0,0 +1,40 @@
+<?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:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd
+http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/ws/rm/manager.xsd
+http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+http://cxf.apache.org/configuration/beans http://cxf.apache.org/schemas/configuration/cxf-beans.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+    
+    <import resource="rminterceptors.xml"/>
+    
+    <bean class="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
+    
+    <wsrm-mgr:rmManager id="org.apache.cxf.ws.rm.RMManager">    
+      <property name="store" ref="org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore"/>
+    </wsrm-mgr:rmManager>
+    
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/persistent.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/OutMessageRecorder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/OutMessageRecorder.java?view=diff&rev=542790&r1=542789&r2=542790
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/OutMessageRecorder.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/util/OutMessageRecorder.java
Wed May 30 03:10:40 2007
@@ -58,6 +58,9 @@
         }
         if (os instanceof AbstractCachedOutputStream) {
             ((AbstractCachedOutputStream)os).registerCallback(new RecorderCallback());
+        } else {
+            LOG.fine("Can't register recorder callback for output stream of class "
+                     + os.getClass().getName());
         }
     }
    
@@ -83,6 +86,8 @@
                 if (LOG.isLoggable(Level.FINE)) {
                     LOG.fine("outbound: " + bos.toString());
                 }
+            } else {
+                LOG.fine("Can't record message from output stream class: " + os.getClass().getName());
             }
         }
         



Mime
View raw message