diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-05-23 11:59:44 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-05-23 11:59:44 +0200 |
commit | d81701ca8182942b7936f9fd84a019b695e9c890 (patch) | |
tree | dc036c9d701fbbe1afad67782bd78572c0f61974 /java/demo/Ice/nested | |
parent | Fixed bug ICE-5543: stringToIdentity bug with escaped escapes (diff) | |
download | ice-d81701ca8182942b7936f9fd84a019b695e9c890.tar.bz2 ice-d81701ca8182942b7936f9fd84a019b695e9c890.tar.xz ice-d81701ca8182942b7936f9fd84a019b695e9c890.zip |
Added support for invocation timeouts and ACM heartbeats
Diffstat (limited to 'java/demo/Ice/nested')
-rw-r--r-- | java/demo/Ice/nested/Client.java | 7 | ||||
-rw-r--r-- | java/demo/Ice/nested/NestedI.java | 7 | ||||
-rw-r--r-- | java/demo/Ice/nested/config.client | 4 | ||||
-rw-r--r-- | java/demo/Ice/nested/config.server | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/java/demo/Ice/nested/Client.java b/java/demo/Ice/nested/Client.java index 0698ac16237..82c0f166c42 100644 --- a/java/demo/Ice/nested/Client.java +++ b/java/demo/Ice/nested/Client.java @@ -56,6 +56,13 @@ public class Client extends Ice.Application return 1; } + // + // Ensure the invocation times out if the nesting level is too + // high and there are no more threads in the thread pool to + // dispatch the call. + // + nested = (NestedPrx)nested.ice_invocationTimeout(5000); + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Nested.Client"); NestedPrx self = NestedPrxHelper.uncheckedCast(adapter.createProxy(communicator().stringToIdentity("nestedClient"))); diff --git a/java/demo/Ice/nested/NestedI.java b/java/demo/Ice/nested/NestedI.java index 4dc087d18c7..3622b7933a6 100644 --- a/java/demo/Ice/nested/NestedI.java +++ b/java/demo/Ice/nested/NestedI.java @@ -22,7 +22,12 @@ class NestedI extends _NestedDisp System.out.println("" + level); if(--level > 0) { - proxy.nestedCall(level, _self); + // + // Ensure the invocation times out if the nesting level is too + // high and there are no more threads in the thread pool to + // dispatch the call. + // + ((NestedPrx)proxy.ice_invocationTimeout(5000)).nestedCall(level, _self); } } diff --git a/java/demo/Ice/nested/config.client b/java/demo/Ice/nested/config.client index bf5aa1de86f..31c04dd2609 100644 --- a/java/demo/Ice/nested/config.client +++ b/java/demo/Ice/nested/config.client @@ -2,14 +2,14 @@ # The client reads this property to create the reference to the # "Nested" object in the server. # -Nested.Proxy=nestedServer:default -h localhost -p 10000 -t 10000 +Nested.Proxy=nestedServer:default -h localhost -p 10000 # # The client creates one single object adapter with the name # "Nested.Client". The following line sets the endpoints for this # adapter. # -Nested.Client.Endpoints=default -h localhost -t 10000 +Nested.Client.Endpoints=default -h localhost # # The following properties configure the server thread pool. The diff --git a/java/demo/Ice/nested/config.server b/java/demo/Ice/nested/config.server index de0fc503896..5b30db90cbc 100644 --- a/java/demo/Ice/nested/config.server +++ b/java/demo/Ice/nested/config.server @@ -3,7 +3,7 @@ # "Nested.Server". The following line sets the endpoints for this # adapter. # -Nested.Server.Endpoints=default -h localhost -p 10000 -t 10000 +Nested.Server.Endpoints=default -h localhost -p 10000 # # The following properties configure the server thread pool. The |