summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/ProxyFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/ProxyFactory.java')
-rw-r--r--java/src/IceInternal/ProxyFactory.java33
1 files changed, 32 insertions, 1 deletions
diff --git a/java/src/IceInternal/ProxyFactory.java b/java/src/IceInternal/ProxyFactory.java
index dcf25adeccc..69c28059ba4 100644
--- a/java/src/IceInternal/ProxyFactory.java
+++ b/java/src/IceInternal/ProxyFactory.java
@@ -61,7 +61,7 @@ public final class ProxyFactory
referenceToProxy(Reference reference)
{
Ice.ObjectPrxHelper proxy = new Ice.ObjectPrxHelper();
- proxy.setup(reference);
+ proxy.setup(reference, _retryIntervals);
return proxy;
}
@@ -90,7 +90,38 @@ public final class ProxyFactory
ProxyFactory(Instance instance)
{
_instance = instance;
+
+ String str = _instance.properties().getPropertyWithDefault("Ice.RetryIntervals", "0");
+
+ String[] arr = str.trim().split("[ \t\n\r]+");
+
+ if(arr.length > 0)
+ {
+ _retryIntervals = new int[arr.length];
+
+ for(int i = 0; i < arr.length; i++)
+ {
+ int v = Integer.parseInt(arr[i]);
+
+ //
+ // If -1 is the first value, no retry and wait intervals.
+ //
+ if(i == 0 && v == -1)
+ {
+ _retryIntervals = new int[0];
+ break;
+ }
+
+ _retryIntervals[i] = v > 0 ? v : 0;
+ }
+ }
+ else
+ {
+ _retryIntervals = new int[1];
+ _retryIntervals[0] = 0;
+ }
}
private Instance _instance;
+ private int[] _retryIntervals;
}