summaryrefslogtreecommitdiff
path: root/java/demo/Ice/async/Server.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/Ice/async/Server.java')
-rw-r--r--java/demo/Ice/async/Server.java26
1 files changed, 10 insertions, 16 deletions
diff --git a/java/demo/Ice/async/Server.java b/java/demo/Ice/async/Server.java
index 25ba4e2baac..4434f3b59a5 100644
--- a/java/demo/Ice/async/Server.java
+++ b/java/demo/Ice/async/Server.java
@@ -17,22 +17,7 @@ public class Server extends Ice.Application
run()
{
_workQueue.destroy();
- try
- {
- _workQueue.join();
- }
- catch(java.lang.InterruptedException ex)
- {
- }
-
- try
- {
- communicator().destroy();
- }
- catch(Ice.LocalException ex)
- {
- ex.printStackTrace();
- }
+ communicator().shutdown();
}
}
@@ -49,6 +34,15 @@ public class Server extends Ice.Application
adapter.activate();
communicator().waitForShutdown();
+
+ try
+ {
+ _workQueue.join();
+ }
+ catch(java.lang.InterruptedException ex)
+ {
+ }
+
return 0;
}