2005-10-10 Audrius Meskauskas <[EMAIL PROTECTED]>
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
(main):
3 sec pause replaced by while(..) loop.
Index: examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java,v
retrieving revision 1.2
diff -u -r1.2 Demo.java
--- examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java 2 Jul
2005 20:32:08 -0000 1.2
+++ examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java 10 Oct
2005 19:54:54 -0000
@@ -38,6 +38,8 @@
package gnu.classpath.examples.CORBA.SimpleCommunication;
+import java.io.File;
+
import
gnu.classpath.examples.CORBA.SimpleCommunication.communication.DirectTest;
import
gnu.classpath.examples.CORBA.SimpleCommunication.communication.RequestTest;
@@ -61,6 +63,10 @@
{
public static void main(final String[] args)
{
+ File ior = new File("IOR.txt");
+ if (ior.exists())
+ ior.delete();
+
// Start the server.
new Thread()
{
@@ -70,14 +76,20 @@
}
}.start();
- System.out.println("Waiting for three seconds for the server to start...");
-
- // Pause some time for the server to start.
- try {
- Thread.sleep(3000);
- }
- catch (InterruptedException ex) {
- }
+ while (!ior.exists())
+ {
+ System.out.print("Waiting for for the server to start ");
+ // Pause some time for the server to start.
+ try
+ {
+ Thread.sleep(200);
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ System.out.print(".");
+ }
+ System.out.println("ok.");
// Test the stream oriented communication.
DirectTest.main(args);
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches