Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-28 13:55:32 +0000
committerEike Stepper2012-09-28 13:55:32 +0000
commitad7806bbde62a4ff94ac6114fa7635861dc9423c (patch)
treebdbf6667ee30ad47faa23d1e06f5eb878396c6ff /plugins/org.eclipse.emf.cdo.examples.clone
parent4c1f15e2cd01dd7ebbfcc0eb8b7357fac85637af (diff)
downloadcdo-ad7806bbde62a4ff94ac6114fa7635861dc9423c.tar.gz
cdo-ad7806bbde62a4ff94ac6114fa7635861dc9423c.tar.xz
cdo-ad7806bbde62a4ff94ac6114fa7635861dc9423c.zip
[390684] Add exception handler to IRepositorySynchronizer
https://bugs.eclipse.org/bugs/show_bug.cgi?id=390684
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.clone')
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.clone/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/AbstractOfflineExampleServer.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleUtil.java2
3 files changed, 10 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.clone/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.clone/META-INF/MANIFEST.MF
index fd871f5daf..dc69789386 100644
--- a/plugins/org.eclipse.emf.cdo.examples.clone/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.examples.clone/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo.server.net4j;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)",
org.eclipse.net4j.tcp;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)"
+ org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)",
+ org.eclipse.emf.cdo.examples.company;bundle-version="[4.0.0,5.0.0)"
Import-Package: org.h2.jdbcx;version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.emf.cdo.examples.server.offline;version="4.1.0";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/AbstractOfflineExampleServer.java b/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/AbstractOfflineExampleServer.java
index 7e7e314f1e..8b450e5f93 100644
--- a/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/AbstractOfflineExampleServer.java
+++ b/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/AbstractOfflineExampleServer.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.examples.server.offline;
import org.eclipse.emf.cdo.common.CDOCommonRepository.Type;
import org.eclipse.emf.cdo.common.util.RepositoryStateChangedEvent;
import org.eclipse.emf.cdo.common.util.RepositoryTypeChangedEvent;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
import org.eclipse.emf.cdo.server.CDOServerUtil;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.ISession;
@@ -31,6 +32,8 @@ import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.log.PrintLogHandler;
import org.h2.jdbcx.JdbcDataSource;
@@ -62,9 +65,9 @@ public abstract class AbstractOfflineExampleServer
{
// OMPlatform.INSTANCE.setDebugging(true);
// OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
- // OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
+ OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
- // CompanyPackage.eINSTANCE.getClass(); // Register EPackage in standalone
+ CompanyPackage.eINSTANCE.getClass(); // Register EPackage in standalone
}
public AbstractOfflineExampleServer(String name, int port, int dbBrowserPort)
@@ -91,12 +94,12 @@ public abstract class AbstractOfflineExampleServer
if (event instanceof RepositoryTypeChangedEvent)
{
RepositoryTypeChangedEvent e = (RepositoryTypeChangedEvent)event;
- System.out.println("Type changed to " + e.getNewType());
+ System.out.println("Type changed from " + e.getOldType() + " to " + e.getNewType());
}
else if (event instanceof RepositoryStateChangedEvent)
{
RepositoryStateChangedEvent e = (RepositoryStateChangedEvent)event;
- System.out.println("State changed to " + e.getNewState());
+ System.out.println("State changed from " + e.getOldState() + " to " + e.getNewState());
}
}
});
diff --git a/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleUtil.java b/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleUtil.java
index 4405d542c8..e877cecf33 100644
--- a/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleUtil.java
+++ b/plugins/org.eclipse.emf.cdo.examples.clone/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleUtil.java
@@ -26,7 +26,7 @@ import org.eclipse.net4j.util.container.IManagedContainer;
*/
public class OfflineExampleUtil
{
- public static final String MASTER_NAME = "master";
+ public static final String MASTER_NAME = "repo1";
public static final int MASTER_PORT = 2036;

Back to the top