summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Instance.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2014-09-27 16:31:46 -0700
committerMatthew Newhook <matthew@zeroc.com>2014-09-27 16:32:21 -0700
commit4951bbabdd6bd33a8e9ca0cdd46aad613a634626 (patch)
tree8634b14a258d2c9cee0e17a12af805e1af3fec76 /java/src/IceInternal/Instance.java
parentFixed deadlock in connection binding code (ICE-5693) (diff)
downloadice-4951bbabdd6bd33a8e9ca0cdd46aad613a634626.tar.bz2
ice-4951bbabdd6bd33a8e9ca0cdd46aad613a634626.tar.xz
ice-4951bbabdd6bd33a8e9ca0cdd46aad613a634626.zip
- begin_ now never interrupts.
- All potentially blocking Ice APIs are interruption points. - Fixes to the incoming/outgoing factories and shutdown procedure - Fixed bug where connect() was from a user thread. - Added lots more tests to the interrupt test suite.
Diffstat (limited to 'java/src/IceInternal/Instance.java')
-rw-r--r--java/src/IceInternal/Instance.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java
index 4c5db5043d7..a53eb841186 100644
--- a/java/src/IceInternal/Instance.java
+++ b/java/src/IceInternal/Instance.java
@@ -409,6 +409,11 @@ public final class Instance
public synchronized Ice.ObjectPrx
createAdmin(Ice.ObjectAdapter adminAdapter, Ice.Identity adminIdentity)
{
+ if(Thread.interrupted())
+ {
+ throw new Ice.OperationInterruptedException();
+ }
+
boolean createAdapter = (adminAdapter == null);
synchronized(this)
@@ -478,6 +483,11 @@ public final class Instance
public Ice.ObjectPrx
getAdmin()
{
+ if(Thread.interrupted())
+ {
+ throw new Ice.OperationInterruptedException();
+ }
+
Ice.ObjectAdapter adminAdapter;
Ice.Identity adminIdentity;
@@ -1137,6 +1147,11 @@ public final class Instance
public void
destroy()
{
+ if(Thread.interrupted())
+ {
+ throw new Ice.OperationInterruptedException();
+ }
+
synchronized(this)
{
//
@@ -1181,12 +1196,7 @@ public final class Instance
}
catch (InterruptedException e)
{
- //
- // Restore the interrupt, otherwise the instance will be
- // left in an undefined state. The thread joins below will
- // interrupt which is fine.
- //
- Thread.currentThread().interrupt();
+ throw new Ice.OperationInterruptedException();
}
}