// // Close the connection associated with the proxy and wait until the close completes. // private static void closeConnection(IObjectPrx prx) { CloseCallback cb = new CloseCallback(); prx.GetConnection().setCloseCallback(cb.closed); prx.GetConnection().close(ConnectionClose.GracefullyWithWait); cb.check(); }
private static Connection connect(IObjectPrx prx) { int nRetry = 10; while (--nRetry > 0) { try { prx.GetConnection(); break; } catch (ConnectTimeoutException) { // Can sporadically occur with slow machines } } return(prx.GetConnection()); }