summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/ObjectAdapterI.java49
-rw-r--r--java/src/IceInternal/Direct.java44
-rw-r--r--java/src/IceInternal/Incoming.java2
3 files changed, 65 insertions, 30 deletions
diff --git a/java/src/Ice/ObjectAdapterI.java b/java/src/Ice/ObjectAdapterI.java
index 6d8c8c597aa..2b80d551832 100644
--- a/java/src/Ice/ObjectAdapterI.java
+++ b/java/src/Ice/ObjectAdapterI.java
@@ -255,12 +255,20 @@ public class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapter
public synchronized ServantLocator
findServantLocator(String prefix)
{
+ //
+ // Don't check whether deactivation has been initiated. This
+ // operation might be called (e.g., from Incoming or Direct)
+ // after deactivation has been initiated, but before
+ // deactivation has been completed.
+ //
+ /*
if(_instance == null)
{
ObjectAdapterDeactivatedException e = new ObjectAdapterDeactivatedException();
e.name = _name;
throw e;
}
+ */
return (ServantLocator)_locatorMap.get(prefix);
}
@@ -268,7 +276,29 @@ public class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapter
public synchronized Ice.Object
identityToServant(Identity ident)
{
+ //
+ // Don't check whether deactivation has been initiated. This
+ // operation might be called (e.g., from Incoming or Direct)
+ // after deactivation has been initiated, but before
+ // deactivation has been completed.
+ //
+ /*
+ if(_instance == null)
+ {
+ ObjectAdapterDeactivatedException e = new ObjectAdapterDeactivatedException();
+ e.name = _name;
+ throw e;
+ }
+ */
+
+ //
+ // Don't call checkIdentity. We simply want null to be
+ // returned (e.g., for Direct, Incoming) in case the identity
+ // is incorrect and therefore no servant can be found.
+ //
+ /*
checkIdentity(ident);
+ */
return (Ice.Object)_activeServantMap.get(ident);
}
@@ -424,11 +454,15 @@ public class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapter
public synchronized void
incUsageCount()
{
- if(_instance == null)
- {
- throw new ObjectAdapterDeactivatedException();
- }
-
+ //
+ // Don't check whether deactivation has been initiated. This
+ // operation might be called (e.g., from Incoming or Direct)
+ // after deactivation has been initiated, but before
+ // deactivation has been completed.
+ //
+ /*
+ assert(_instance != null);
+ */
assert(_usageCount >= 0);
++_usageCount;
}
@@ -437,8 +471,9 @@ public class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapter
decUsageCount()
{
//
- // The object adapter may already be deactivated when the usage
- // count is decremented, thus no check for prior deactivation.
+ // The object adapter may already be deactivated when the
+ // usage count is decremented, thus no check for prior
+ // deactivation.
//
assert(_usageCount > 0);
diff --git a/java/src/IceInternal/Direct.java b/java/src/IceInternal/Direct.java
index a0a715a85fd..0534745e71f 100644
--- a/java/src/IceInternal/Direct.java
+++ b/java/src/IceInternal/Direct.java
@@ -21,27 +21,27 @@ public final class Direct
try
{
- _servant = _current.adapter.identityToServant(_current.id);
-
- if(_servant == null && _current.id.category.length() > 0)
- {
- _locator = _current.adapter.findServantLocator(_current.id.category);
- if(_locator != null)
- {
- _cookie = new Ice.LocalObjectHolder(); // Lazy creation
- _servant = _locator.locate(_current, _cookie);
- }
- }
-
- if(_servant == null)
- {
- _locator = _current.adapter.findServantLocator("");
- if(_locator != null)
- {
- _cookie = new Ice.LocalObjectHolder(); // Lazy creation
- _servant = _locator.locate(_current, _cookie);
- }
- }
+ _servant = _current.adapter.identityToServant(_current.id);
+
+ if(_servant == null && _current.id.category.length() > 0)
+ {
+ _locator = _current.adapter.findServantLocator(_current.id.category);
+ if(_locator != null)
+ {
+ _cookie = new Ice.LocalObjectHolder(); // Lazy creation
+ _servant = _locator.locate(_current, _cookie);
+ }
+ }
+
+ if(_servant == null)
+ {
+ _locator = _current.adapter.findServantLocator("");
+ if(_locator != null)
+ {
+ _cookie = new Ice.LocalObjectHolder(); // Lazy creation
+ _servant = _locator.locate(_current, _cookie);
+ }
+ }
if(_servant == null)
{
@@ -51,7 +51,7 @@ public final class Direct
ex.operation = _current.operation;
throw ex;
}
-
+
if(_current.facet.length > 0)
{
_facetServant = _servant.ice_findFacetPath(_current.facet, 0);
diff --git a/java/src/IceInternal/Incoming.java b/java/src/IceInternal/Incoming.java
index fd2b4b3e7d1..2ae4ab0eb38 100644
--- a/java/src/IceInternal/Incoming.java
+++ b/java/src/IceInternal/Incoming.java
@@ -53,7 +53,7 @@ public class Incoming
if(_current.adapter != null)
{
- ((Ice.ObjectAdapterI)(_current.adapter)).incUsageCount();
+ ((Ice.ObjectAdapterI)(_current.adapter)).incUsageCount();
}
}
}