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 | 34b5a6affb7d00c30ae7478cd9d7f3c5aed0043a (patch) | |
tree | e29d0573d9a6831c902f862f862419f605a4bde3 /javaunohelper | |
parent | ac0a38c9db5f3caec500140702de9ba03f811744 (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')
-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 37eb3c984952..d283f2d08aad 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 ); } } |