summaryrefslogtreecommitdiff
path: root/java/src/Ice/AsyncResult.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-07-10 17:17:55 -0230
committerMatthew Newhook <matthew@zeroc.com>2014-07-10 17:17:55 -0230
commit9326917abfa8ebd9815e192db2dd57cd8e85179d (patch)
tree26045ee4f12e9eab55cbeaefb6a3855ac16d6f50 /java/src/Ice/AsyncResult.java
parentPartial fix for ICE-5548: better C++11 detection (diff)
downloadice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.bz2
ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.xz
ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.zip
ICE-5573 - .NET TimeoutException ignores Dispatcher
- Added test for C++, C# & Java to the dispatcher test to ensure that the invocation timeout is throwin in the correct thread. - Pass the connection to the dispatcher invocation in more cases.
Diffstat (limited to 'java/src/Ice/AsyncResult.java')
-rw-r--r--java/src/Ice/AsyncResult.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/java/src/Ice/AsyncResult.java b/java/src/Ice/AsyncResult.java
index 706616fe32f..d3146d1533f 100644
--- a/java/src/Ice/AsyncResult.java
+++ b/java/src/Ice/AsyncResult.java
@@ -252,7 +252,7 @@ public class AsyncResult
//
try
{
- _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem()
+ _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem(_cachedConnection)
{
public void
run()
@@ -370,7 +370,7 @@ public class AsyncResult
//
try
{
- _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem()
+ _instance.clientThreadPool().execute(new IceInternal.DispatchWorkItem(_cachedConnection)
{
public void
run()
@@ -489,8 +489,17 @@ public class AsyncResult
if(handler != null)
{
final IceInternal.RequestHandler h = handler;
+ Ice.Connection connection = null;
+ try
+ {
+ connection = handler.getConnection(false);
+ }
+ catch(Ice.LocalException e)
+ {
+ // Ignore.
+ }
_instance.clientThreadPool().execute(
- new IceInternal.DispatchWorkItem()
+ new IceInternal.DispatchWorkItem(connection)
{
public void
run()
@@ -519,6 +528,7 @@ public class AsyncResult
protected Communicator _communicator;
protected IceInternal.Instance _instance;
protected String _operation;
+ protected Ice.Connection _cachedConnection;
protected java.lang.Object _monitor = new java.lang.Object();
protected IceInternal.BasicStream _is;