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 | |
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')
-rw-r--r-- | java/demo/Database/library/config.client | 2 | ||||
-rw-r--r-- | java/demo/Ice/bidir/config.client | 5 | ||||
-rw-r--r-- | java/demo/Ice/hello/Client.java | 8 | ||||
-rw-r--r-- | java/demo/Ice/latency/config.client | 2 | ||||
-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 | ||||
-rw-r--r-- | java/demo/Ice/throughput/config.client | 2 |
9 files changed, 23 insertions, 16 deletions
diff --git a/java/demo/Database/library/config.client b/java/demo/Database/library/config.client index db7a8405137..ec7ea31f884 100644 --- a/java/demo/Database/library/config.client +++ b/java/demo/Database/library/config.client @@ -14,7 +14,7 @@ SessionFactory.Proxy=SessionFactory:default -h localhost -p 10000 # No active connection management is permitted because of the session # interfaces. Connections must remain established. # -Ice.ACM.Client=0 +Ice.ACM.Client.Timeout=0 # # Connection retry is not possible because of the session diff --git a/java/demo/Ice/bidir/config.client b/java/demo/Ice/bidir/config.client index 7e2040cb224..35689270541 100644 --- a/java/demo/Ice/bidir/config.client +++ b/java/demo/Ice/bidir/config.client @@ -10,11 +10,6 @@ CallbackSender.Proxy=sender:tcp -h localhost -p 10000 Ice.Warn.Connections=1 # -# Client-side ACM must be disabled for bidirectional connections. -# -Ice.ACM.Client=0 - -# # Network Tracing # # 0 = no network tracing diff --git a/java/demo/Ice/hello/Client.java b/java/demo/Ice/hello/Client.java index a81bb3e6f1d..688644c92c1 100644 --- a/java/demo/Ice/hello/Client.java +++ b/java/demo/Ice/hello/Client.java @@ -63,7 +63,7 @@ public class Client extends Ice.Application setInterruptHook(new ShutdownHook()); HelloPrx twoway = HelloPrxHelper.checkedCast( - communicator().propertyToProxy("Hello.Proxy").ice_twoway().ice_timeout(-1).ice_secure(false)); + communicator().propertyToProxy("Hello.Proxy").ice_twoway().ice_secure(false)); if(twoway == null) { System.err.println("invalid proxy"); @@ -143,9 +143,9 @@ public class Client extends Ice.Application timeout = -1; } - twoway = (HelloPrx)twoway.ice_timeout(timeout); - oneway = (HelloPrx)oneway.ice_timeout(timeout); - batchOneway = (HelloPrx)batchOneway.ice_timeout(timeout); + twoway = (HelloPrx)twoway.ice_invocationTimeout(timeout); + oneway = (HelloPrx)oneway.ice_invocationTimeout(timeout); + batchOneway = (HelloPrx)batchOneway.ice_invocationTimeout(timeout); if(timeout == -1) { diff --git a/java/demo/Ice/latency/config.client b/java/demo/Ice/latency/config.client index 2a074090ea1..1ac8acd40a0 100644 --- a/java/demo/Ice/latency/config.client +++ b/java/demo/Ice/latency/config.client @@ -7,7 +7,7 @@ Ping.Proxy=ping:default -p 10000 -h localhost # # Disable client-side ACM. # -Ice.ACM.Client=0 +Ice.ACM.Client.Timeout=0 # # IceMX configuration. 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 diff --git a/java/demo/Ice/throughput/config.client b/java/demo/Ice/throughput/config.client index d7c6838b8a9..0609329225d 100644 --- a/java/demo/Ice/throughput/config.client +++ b/java/demo/Ice/throughput/config.client @@ -7,7 +7,7 @@ Throughput.Proxy=throughput:default -p 10000 -h localhost # # Disable client-side ACM. # -Ice.ACM.Client=0 +Ice.ACM.Client.Timeout=0 # # IceMX configuration. |