diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:22:42 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:22:42 +0000 |
commit | 53b94569d73a9c884db1155a600123a3a0cb29c4 (patch) | |
tree | 5904e44b2db2213692f1f584b092d62f54e7fc9d /javaunohelper/com/sun | |
parent | 3668105a2357e50e8c96d11a26913f057885a99f (diff) |
INTEGRATION: CWS sb70 (1.14.32); FILE MERGED
2007/06/06 08:21:10 sb 1.14.32.1: #i66196# In Bootstrap.bootstrap, give up waiting for an soffice connection after 5 min.
Diffstat (limited to 'javaunohelper/com/sun')
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/Bootstrap.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java index 74698c6e1..de51d63d6 100644 --- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java +++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java @@ -4,9 +4,9 @@ * * $RCSfile: Bootstrap.java,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: obo $ $Date: 2006-01-20 10:11:54 $ + * last change: $Author: hr $ $Date: 2007-06-27 13:22:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -286,7 +286,7 @@ public class Bootstrap { ";urp;StarOffice.ComponentContext"; // wait until office is started - for ( ; ; ) { + for (int i = 0;; ++i) { try { // try to connect to office Object context = xUrlResolver.resolve( sConnect ); @@ -296,7 +296,11 @@ public class Bootstrap { throw new BootstrapException( "no component context!" ); break; } catch ( com.sun.star.connection.NoConnectException ex ) { - // wait 500 ms, then try to connect again + // Wait 500 ms, then try to connect again, but do not wait + // longer than 5 min (= 600 * 500 ms) total: + if (i == 600) { + throw new BootstrapException(ex.toString()); + } Thread.currentThread().sleep( 500 ); } } |