summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cs/src/Ice/Proxy.cs23
-rw-r--r--java/src/Ice/ObjectPrx.java1
-rw-r--r--java/src/Ice/ObjectPrxHelperBase.java22
3 files changed, 46 insertions, 0 deletions
diff --git a/cs/src/Ice/Proxy.cs b/cs/src/Ice/Proxy.cs
index 2237aafc1c9..621a612620b 100644
--- a/cs/src/Ice/Proxy.cs
+++ b/cs/src/Ice/Proxy.cs
@@ -114,6 +114,7 @@ namespace Ice
[Obsolete("This method has been deprecated, use ice_getConnection instead.")]
Connection ice_connection();
Connection ice_getConnection();
+ Connection ice_getCachedConnection();
}
public class ObjectPrxHelperBase : ObjectPrx
@@ -803,6 +804,28 @@ namespace Ice
}
}
+ public Connection ice_getCachedConnection()
+ {
+ ObjectDel_ del__ = null;
+ lock(this)
+ {
+ del__ = _delegate;
+ }
+
+ if(del__ != null)
+ {
+ try
+ {
+ bool comp;
+ return del__.getConnection__(out comp);
+ }
+ catch(CollocationOptimizationException)
+ {
+ }
+ }
+ return null;
+ }
+
public override bool Equals(object r)
{
ObjectPrxHelperBase rhs = r as ObjectPrxHelperBase;
diff --git a/java/src/Ice/ObjectPrx.java b/java/src/Ice/ObjectPrx.java
index c489b9f60f5..da2e4c6a8b4 100644
--- a/java/src/Ice/ObjectPrx.java
+++ b/java/src/Ice/ObjectPrx.java
@@ -127,6 +127,7 @@ public interface ObjectPrx
**/
Connection ice_connection();
Connection ice_getConnection();
+ Connection ice_getCachedConnection();
boolean equals(java.lang.Object r);
}
diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java
index 6c6a977d843..fdde0d32269 100644
--- a/java/src/Ice/ObjectPrxHelperBase.java
+++ b/java/src/Ice/ObjectPrxHelperBase.java
@@ -785,6 +785,28 @@ public class ObjectPrxHelperBase implements ObjectPrx
}
}
+ public final Connection
+ ice_getCachedConnection()
+ {
+ _ObjectDel __del = null;
+ synchronized(this)
+ {
+ __del = _delegate;
+ }
+
+ if(__del != null)
+ {
+ try
+ {
+ return __del.__getConnection(new BooleanHolder());
+ }
+ catch(CollocationOptimizationException ex)
+ {
+ }
+ }
+ return null;
+ }
+
public final boolean
equals(java.lang.Object r)
{