From 84d9f5c369fceccfa16401ed50783ed2ad209559 Mon Sep 17 00:00:00 2001 From: Matthew Newhook Date: Fri, 22 Dec 2006 18:52:53 +0000 Subject: http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1391. --- java/demo/Freeze/library/Client.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'java/demo/Freeze/library/Client.java') diff --git a/java/demo/Freeze/library/Client.java b/java/demo/Freeze/library/Client.java index 3105354d443..67b6af17477 100644 --- a/java/demo/Freeze/library/Client.java +++ b/java/demo/Freeze/library/Client.java @@ -9,9 +9,32 @@ public class Client extends Ice.Application { + class ShutdownHook extends Thread + { + public void + run() + { + try + { + communicator().destroy(); + } + catch(Ice.LocalException ex) + { + ex.printStackTrace(); + } + } + } + public int run(String[] args) { + // + // Since this is an interactive demo we want to clear the + // Application installed interrupt callback and install our + // own shutdown hook. + // + setInterruptHook(new ShutdownHook()); + return RunParser.runParser(appName(), args, communicator()); } -- cgit v1.2.3