Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-09-22 21:31:09 +0000
committerEike Stepper2010-09-22 21:31:09 +0000
commitcdf3ef5331fc8cd2ba1f47228891f9941e40a6b2 (patch)
tree9754270e4af228462173ba2e9f70bf79057db9f2 /plugins/org.eclipse.emf.cdo.examples/src/org/eclipse
parentc795a745218d950d8172b43ce0f6eba9c111c426 (diff)
downloadcdo-cdf3ef5331fc8cd2ba1f47228891f9941e40a6b2.tar.gz
cdo-cdf3ef5331fc8cd2ba1f47228891f9941e40a6b2.tar.xz
cdo-cdf3ef5331fc8cd2ba1f47228891f9941e40a6b2.zip
[325928] Provide FailoverMonitor server and FailoverAgents to coordinate fail-over scenarios
https://bugs.eclipse.org/bugs/show_bug.cgi?id=325928
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
index d6a4809c45..4ebfb30f27 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/FailoverExample.java
@@ -405,6 +405,10 @@ public abstract class FailoverExample
{
public static final String REPOSITORY_GROUP = "ExampleGroup";
+ // public static final String REPOSITORY_MONITOR_HOST = "92.231.107.180";
+
+ public static final String REPOSITORY_MONITOR_HOST = "localhost";
+
public static final int REPOSITORY_MONITOR_PORT = 2038;
protected String host;
@@ -438,12 +442,12 @@ public abstract class FailoverExample
}
};
- agent.setMonitorConnector(createConnector("localhost:" + REPOSITORY_MONITOR_PORT));
+ agent.setMonitorConnector(createConnector(REPOSITORY_MONITOR_HOST + ":" + REPOSITORY_MONITOR_PORT));
agent.setConnectorDescription(host + ":" + port);
agent.setRepository(repository);
agent.setGroup(REPOSITORY_GROUP);
- agent.setRate(60000L);
- agent.setTimeout(200000L);
+ agent.setRate(200L);
+ agent.setTimeout(2000L);
agent.activate();
return repository;
@@ -541,8 +545,8 @@ public abstract class FailoverExample
public static void main(String[] args) throws Exception
{
IManagedContainer container = createContainer();
- CDOSessionConfiguration configuration = CDONet4jUtil.createFailoverSessionConfiguration(container, "localhost:"
- + REPOSITORY_MONITOR_PORT, REPOSITORY_GROUP);
+ CDOSessionConfiguration configuration = CDONet4jUtil.createFailoverSessionConfiguration(container,
+ REPOSITORY_MONITOR_HOST + ":" + REPOSITORY_MONITOR_PORT, REPOSITORY_GROUP);
CDOSession session = configuration.openSession();
session.addListener(new IListener()

Back to the top