notional testing of client and user app data read and writing
[vamsas.git] / src / uk / ac / vamsas / test / ExampleApplication.java
index 826a8eb..e7557df 100644 (file)
@@ -144,11 +144,18 @@ public class ExampleApplication {
         System.out.println("Client appdata\n" + cappds + "\nEnd of Appdata\n");
       } else {
         if (!writtenonce) {
+          String newapd = "Client Appdata:";
+          if (appd.hasClientAppdata())
+          {
+            AppDataInputStream is;
+            newapd = readData(is = appd.getClientInputStream());
+            is.close();
+          }
           writtenonce = true;
           // appd.setClientAppdata(makeappData("Client Appdata for
           // "+user.toString()+" written"));
           writeData(appd.getClientOutputStream(),
-              "Client Appdata for all users written on " + appdatareads
+              newapd+" : Client Appdata for all users written on " + appdatareads
                   + " read by " + vorbaclient.getUserHandle());
           System.out.println("Written to ClientAppdata stream.");
         }
@@ -567,6 +574,7 @@ public class ExampleApplication {
     vorbaclient=null;
     clientfactory=null;
     System.out.println("Byee!");
+    //try { Thread.sleep(100000); } catch (Exception e) {}
   }
 
   public static void main(String[] args) {