Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEsteban Dugueperoux2015-10-29 08:21:54 +0000
committerEsteban Dugueperoux2015-10-29 09:25:12 +0000
commitb5aa7672077d735a339bcf9934ccbfcf07af0ac8 (patch)
treed0d7b47a68a11cd7a36a2591fbb51955b37cbd9b
parentbd9f9ce08698df7f88242cb4aae6250fddf72c52 (diff)
downloadcdo-b5aa7672077d735a339bcf9934ccbfcf07af0ac8.tar.gz
cdo-b5aa7672077d735a339bcf9934ccbfcf07af0ac8.tar.xz
cdo-b5aa7672077d735a339bcf9934ccbfcf07af0ac8.zip
[480919] Timeout in ChangeCredentialsRequest
- Have ChangeCredentialsRequest/OpenSessionRequest/AuthenticationRequest use a OMMonitor to avoid timeout exception. Change-Id: I2240cd09a907ef38dc77364c461a614666b9f10e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=480919 Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/protocol/CDOAdminServerProtocol.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java7
4 files changed, 21 insertions, 18 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
index 899bbdf821..b4c17ddbe6 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientProtocol.java
@@ -60,6 +60,7 @@ import org.eclipse.net4j.util.collection.Pair;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.StringCompressor;
import org.eclipse.net4j.util.io.StringIO;
+import org.eclipse.net4j.util.om.monitor.Monitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.PerfTracer;
import org.eclipse.net4j.util.security.CredentialsUpdateOperation;
@@ -83,7 +84,7 @@ import java.util.Set;
/**
* @author Eike Stepper
*/
-public class CDOClientProtocol extends AuthenticatingSignalProtocol<CDOSessionImpl>implements CDOSessionProtocol
+public class CDOClientProtocol extends AuthenticatingSignalProtocol<CDOSessionImpl> implements CDOSessionProtocol
{
private static final PerfTracer REVISION_LOADING = new PerfTracer(OM.PERF_REVISION_LOADING, CDOClientProtocol.class);
@@ -114,7 +115,7 @@ public class CDOClientProtocol extends AuthenticatingSignalProtocol<CDOSessionIm
PassiveUpdateMode passiveUpdateMode, LockNotificationMode lockNotificationMode)
{
return send(new OpenSessionRequest(this, repositoryName, userID, passiveUpdateEnabled, passiveUpdateMode,
- lockNotificationMode));
+ lockNotificationMode), new Monitor());
}
public void disablePassiveUpdate()
@@ -622,11 +623,11 @@ public class CDOClientProtocol extends AuthenticatingSignalProtocol<CDOSessionIm
public void requestChangeCredentials()
{
- send(new ChangeCredentialsRequest(this, CredentialsUpdateOperation.CHANGE_PASSWORD, null));
+ send(new ChangeCredentialsRequest(this, CredentialsUpdateOperation.CHANGE_PASSWORD, null), new Monitor());
}
public void requestResetCredentials(String userID)
{
- send(new ChangeCredentialsRequest(this, CredentialsUpdateOperation.RESET_PASSWORD, userID));
+ send(new ChangeCredentialsRequest(this, CredentialsUpdateOperation.RESET_PASSWORD, userID), new Monitor());
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
index efcadded3f..cc4f36f410 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.admin/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.admin;singleton:=true
-Bundle-Version: 4.2.100.qualifier
+Bundle-Version: 4.2.200.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -17,11 +17,11 @@ Require-Bundle: org.eclipse.core.runtime;resolution:=optional;bundle-version="[3
org.eclipse.emf.cdo.server.security;bundle-version="[4.3.0,5.0.0)",
org.eclipse.emf.cdo.security;bundle-version="[4.3.0,5.0.0)",
org.eclipse.net4j.jvm;bundle-version="[4.1.100,5.0.0)";resolution:=optional
-Export-Package: org.eclipse.emf.cdo.server.admin;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin;x-internal:=true;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin.bundle;x-internal:=true;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin.protocol;x-internal:=true;version="4.2.100",
- org.eclipse.emf.cdo.server.spi.admin;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin.catalog;x-internal:=true;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin.catalog.impl;x-internal:=true;version="4.2.100",
- org.eclipse.emf.cdo.server.internal.admin.catalog.util;x-internal:=true;version="4.2.100"
+Export-Package: org.eclipse.emf.cdo.server.admin;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin;x-internal:=true;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin.bundle;x-internal:=true;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin.protocol;x-internal:=true;version="4.2.200",
+ org.eclipse.emf.cdo.server.spi.admin;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin.catalog;x-internal:=true;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin.catalog.impl;x-internal:=true;version="4.2.200",
+ org.eclipse.emf.cdo.server.internal.admin.catalog.util;x-internal:=true;version="4.2.200"
diff --git a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/protocol/CDOAdminServerProtocol.java b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/protocol/CDOAdminServerProtocol.java
index edad2c755a..c3027820a7 100644
--- a/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/protocol/CDOAdminServerProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server.admin/src/org/eclipse/emf/cdo/server/internal/admin/protocol/CDOAdminServerProtocol.java
@@ -27,6 +27,7 @@ import org.eclipse.net4j.util.confirmation.Confirmation;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.container.IPluginContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.monitor.Monitor;
import org.eclipse.net4j.util.security.CredentialsUpdateOperation;
import org.eclipse.net4j.util.security.DiffieHellman.Client.Response;
import org.eclipse.net4j.util.security.DiffieHellman.Server.Challenge;
@@ -36,7 +37,7 @@ import org.eclipse.spi.net4j.ServerProtocolFactory;
/**
* @author Eike Stepper
*/
-public class CDOAdminServerProtocol extends SignalProtocol<CDOAdminServer>implements IAuthenticationProtocol
+public class CDOAdminServerProtocol extends SignalProtocol<CDOAdminServer> implements IAuthenticationProtocol
{
public static final long DEFAULT_NEGOTIATION_TIMEOUT = 15 * 1000;
@@ -110,7 +111,7 @@ public class CDOAdminServerProtocol extends SignalProtocol<CDOAdminServer>implem
public Response sendAuthenticationChallenge(Challenge challenge) throws Exception
{
return new AuthenticationRequest(this, CDOAdminProtocolConstants.SIGNAL_AUTHENTICATION, challenge)
- .send(negotiationTimeout);
+ .send(negotiationTimeout, new Monitor());
}
public Response sendCredentialsChallenge(Challenge challenge, String userID, CredentialsUpdateOperation operation)
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
index 88bbb15734..f51a2fb386 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerProtocol.java
@@ -34,6 +34,7 @@ import org.eclipse.net4j.signal.security.AuthenticationRequest;
import org.eclipse.net4j.util.io.StringCompressor;
import org.eclipse.net4j.util.io.StringIO;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.monitor.Monitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.security.CredentialsUpdateOperation;
import org.eclipse.net4j.util.security.DiffieHellman.Client.Response;
@@ -42,7 +43,7 @@ import org.eclipse.net4j.util.security.DiffieHellman.Server.Challenge;
/**
* @author Eike Stepper
*/
-public class CDOServerProtocol extends SignalProtocol<InternalSession>implements ISessionProtocol
+public class CDOServerProtocol extends SignalProtocol<InternalSession> implements ISessionProtocol
{
public static final long DEFAULT_NEGOTIATION_TIMEOUT = 15 * 1000;
@@ -101,13 +102,13 @@ public class CDOServerProtocol extends SignalProtocol<InternalSession>implements
public Response sendAuthenticationChallenge(Challenge challenge) throws Exception
{
return new AuthenticationRequest(this, CDOProtocolConstants.SIGNAL_AUTHENTICATION, challenge)
- .send(negotiationTimeout);
+ .send(negotiationTimeout, new Monitor());
}
public Response sendCredentialsChallenge(Challenge challenge, String userID, CredentialsUpdateOperation operation)
throws Exception
{
- return new CredentialsChallengeRequest(this, challenge, userID, operation).send(negotiationTimeout);
+ return new CredentialsChallengeRequest(this, challenge, userID, operation).send(negotiationTimeout, new Monitor());
}
public void sendRepositoryTypeNotification(CDOCommonRepository.Type oldType, CDOCommonRepository.Type newType)

Back to the top