summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-04-26 11:26:15 (EDT)
committerEike Stepper2008-04-26 11:26:15 (EDT)
commit852d8f5fabc1d287ca72ae8b8602cb7f9610b566 (patch)
tree5bbf6a656044f8ab8799f38e6a68131fe94cb723
parentd65321143d6261db8a3b3f535b0e294fd9c58543 (diff)
downloadcdo-852d8f5fabc1d287ca72ae8b8602cb7f9610b566.zip
cdo-852d8f5fabc1d287ca72ae8b8602cb7f9610b566.tar.gz
cdo-852d8f5fabc1d287ca72ae8b8602cb7f9610b566.tar.bz2
[228994] Add a Spring config example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=228994
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/CDODBUtil.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java231
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreFactory.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStore.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Store.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java40
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/factory/FactoryKey.java10
11 files changed, 175 insertions, 160 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/CDODBUtil.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/CDODBUtil.java
index 77ab602..f434453 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/CDODBUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/CDODBUtil.java
@@ -38,7 +38,11 @@ public final class CDODBUtil
public static IDBStore createStore(IMappingStrategy mappingStrategy, IDBAdapter dbAdapter,
IDBConnectionProvider dbConnectionProvider)
{
- return new DBStore(mappingStrategy, dbAdapter, dbConnectionProvider);
+ DBStore store = new DBStore();
+ store.setMappingStrategy(mappingStrategy);
+ store.setDbAdapter(dbAdapter);
+ store.setDbConnectionProvider(dbConnectionProvider);
+ return store;
}
public static IMappingStrategy createHorizontalMappingStrategy()
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
index c7e5154..af6bd86 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/CDODBSchema.java
@@ -28,12 +28,6 @@ public class CDODBSchema extends DBSchema
*/
public static final IDBTable REPOSITORY = INSTANCE.addTable("cdo_repository");
- public static final IDBField REPOSITORY_NAME = //
- REPOSITORY.addField("name", DBType.VARCHAR, 255);
-
- public static final IDBField REPOSITORY_UUID = //
- REPOSITORY.addField("uuid", DBType.VARCHAR, 64);
-
public static final IDBField REPOSITORY_STARTS = //
REPOSITORY.addField("starts", DBType.BIGINT);
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
index 8b62279..ea998be 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
@@ -11,7 +11,6 @@
package org.eclipse.emf.cdo.server.internal.db;
import org.eclipse.emf.cdo.internal.server.LongIDStore;
-import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.protocol.model.CDOType;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.IView;
@@ -28,10 +27,13 @@ import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.IDBConnectionProvider;
import org.eclipse.net4j.db.ddl.IDBSchema;
import org.eclipse.net4j.db.ddl.IDBTable;
+import org.eclipse.net4j.internal.db.DataSourceConnectionProvider;
import org.eclipse.net4j.internal.db.ddl.DBSchema;
import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import javax.sql.DataSource;
+
import java.sql.Connection;
import java.text.MessageFormat;
import java.util.Set;
@@ -57,27 +59,45 @@ public class DBStore extends LongIDStore implements IDBStore
private int nextFeatureID;
- public DBStore(IMappingStrategy mappingStrategy, IDBAdapter dbAdapter, IDBConnectionProvider dbConnectionProvider)
+ public DBStore()
{
super(TYPE);
- if (dbAdapter == null)
- {
- throw new IllegalArgumentException("dbAdapter is null");
- }
+ }
- if (dbConnectionProvider == null)
- {
- throw new IllegalArgumentException("dbConnectionProvider is null");
- }
+ public IMappingStrategy getMappingStrategy()
+ {
+ return mappingStrategy;
+ }
+ public void setMappingStrategy(IMappingStrategy mappingStrategy)
+ {
this.mappingStrategy = mappingStrategy;
+ mappingStrategy.setStore(this);
+ }
+
+ public IDBAdapter getDBAdapter()
+ {
+ return dbAdapter;
+ }
+
+ public void setDbAdapter(IDBAdapter dbAdapter)
+ {
this.dbAdapter = dbAdapter;
+ }
+
+ public IDBConnectionProvider getDBConnectionProvider()
+ {
+ return dbConnectionProvider;
+ }
+
+ public void setDbConnectionProvider(IDBConnectionProvider dbConnectionProvider)
+ {
this.dbConnectionProvider = dbConnectionProvider;
}
- public IMappingStrategy getMappingStrategy()
+ public void setDataSource(DataSource dataSource)
{
- return mappingStrategy;
+ dbConnectionProvider = new DataSourceConnectionProvider(dataSource);
}
public synchronized IDBSchema getDBSchema()
@@ -91,16 +111,6 @@ public class DBStore extends LongIDStore implements IDBStore
return dbSchema;
}
- public IDBAdapter getDBAdapter()
- {
- return dbAdapter;
- }
-
- public IDBConnectionProvider getDBConnectionProvider()
- {
- return dbConnectionProvider;
- }
-
@Override
public boolean hasAuditingSupport()
{
@@ -161,39 +171,97 @@ public class DBStore extends LongIDStore implements IDBStore
return nextFeatureID++;
}
- @Override
- protected void doActivate() throws Exception
+ public Connection getConnection()
{
- super.doActivate();
- activateOrDeactivate(true);
+ Connection connection = dbConnectionProvider.getConnection();
+ if (connection == null)
+ {
+ throw new DBException("No connection from connection provider: " + dbConnectionProvider);
+ }
+
+ return connection;
}
@Override
- protected void doDeactivate() throws Exception
+ protected void doBeforeActivate() throws Exception
{
- activateOrDeactivate(false);
- super.doDeactivate();
+ super.doBeforeActivate();
+ checkNull(mappingStrategy, "mappingStrategy is null");
+ checkNull(dbAdapter, "dbAdapter is null");
+ checkNull(dbConnectionProvider, "dbConnectionProvider is null");
}
- protected void activateOrDeactivate(boolean started)
+ @Override
+ protected void doActivate() throws Exception
{
- Repository repository = (Repository)getRepository();
- Connection connection = dbConnectionProvider.getConnection();
- if (connection == null)
- {
- throw new DBException("No connection from connection provider: " + dbConnectionProvider);
- }
+ super.doActivate();
+ Connection connection = null;
try
{
- if (started)
+ connection = getConnection();
+ Set<IDBTable> createdTables = CDODBSchema.INSTANCE.create(dbAdapter, dbConnectionProvider);
+ if (createdTables.contains(CDODBSchema.REPOSITORY))
{
- activateStore(repository, connection);
+ // First start
+ DBUtil.insertRow(connection, dbAdapter, CDODBSchema.REPOSITORY, 1, System.currentTimeMillis(), 0, CRASHED,
+ CRASHED);
+
+ MappingStrategy mappingStrategy = (MappingStrategy)getMappingStrategy();
+
+ IClassMapping resourceClassMapping = mappingStrategy.getResourceClassMapping();
+ Set<IDBTable> tables = resourceClassMapping.getAffectedTables();
+ if (dbAdapter.createTables(tables, connection).size() != tables.size())
+ {
+ throw new DBException("CDOResource tables not completely created");
+ }
}
else
{
- deactivateStore(repository, connection);
+ // Restart
+ long lastObjectID = DBUtil.selectMaximumLong(connection, CDODBSchema.REPOSITORY_NEXT_CDOID);
+ setLastMetaID(DBUtil.selectMaximumLong(connection, CDODBSchema.REPOSITORY_NEXT_METAID));
+ if (lastObjectID == CRASHED || getLastMetaID() == CRASHED)
+ {
+ OM.LOG.warn("Detected restart after crash");
+ }
+
+ setLastObjectID(lastObjectID);
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("UPDATE ");
+ builder.append(CDODBSchema.REPOSITORY);
+ builder.append(" SET ");
+ builder.append(CDODBSchema.REPOSITORY_STARTS);
+ builder.append("=");
+ builder.append(CDODBSchema.REPOSITORY_STARTS);
+ builder.append("+1, ");
+ builder.append(CDODBSchema.REPOSITORY_STARTED);
+ builder.append("=");
+ builder.append(System.currentTimeMillis());
+ builder.append(", ");
+ builder.append(CDODBSchema.REPOSITORY_STOPPED);
+ builder.append("=0, ");
+ builder.append(CDODBSchema.REPOSITORY_NEXT_CDOID);
+ builder.append("=");
+ builder.append(CRASHED);
+ builder.append(", ");
+ builder.append(CDODBSchema.REPOSITORY_NEXT_METAID);
+ builder.append("=");
+ builder.append(CRASHED);
+
+ String sql = builder.toString();
+ int count = DBUtil.update(connection, sql);
+ if (count == 0)
+ {
+ throw new DBException("No row updated in table " + CDODBSchema.REPOSITORY);
+ }
}
+
+ nextPackageID = DBUtil.selectMaximumInt(connection, CDODBSchema.PACKAGES_ID) + 1;
+ nextClassID = DBUtil.selectMaximumInt(connection, CDODBSchema.CLASSES_ID) + 1;
+ nextFeatureID = DBUtil.selectMaximumInt(connection, CDODBSchema.FEATURES_ID) + 1;
+ LifecycleUtil.activate(mappingStrategy);
}
finally
{
@@ -201,58 +269,32 @@ public class DBStore extends LongIDStore implements IDBStore
}
}
- protected void activateStore(Repository repository, Connection connection)
+ @Override
+ protected void doDeactivate() throws Exception
{
- Set<IDBTable> createdTables = CDODBSchema.INSTANCE.create(dbAdapter, dbConnectionProvider);
- if (createdTables.contains(CDODBSchema.REPOSITORY))
- {
- // First start
- DBUtil.insertRow(connection, dbAdapter, CDODBSchema.REPOSITORY, repository.getName(), repository.getUUID(), 1,
- System.currentTimeMillis(), 0, CRASHED, CRASHED);
-
- MappingStrategy mappingStrategy = (MappingStrategy)getMappingStrategy();
+ Connection connection = null;
- IClassMapping resourceClassMapping = mappingStrategy.getResourceClassMapping();
- Set<IDBTable> tables = resourceClassMapping.getAffectedTables();
- if (dbAdapter.createTables(tables, connection).size() != tables.size())
- {
- throw new DBException("CDOResource tables not completely created");
- }
- }
- else
+ try
{
- // Restart
- long lastObjectID = DBUtil.selectMaximumLong(connection, CDODBSchema.REPOSITORY_NEXT_CDOID);
- long lastMetaID = DBUtil.selectMaximumLong(connection, CDODBSchema.REPOSITORY_NEXT_METAID);
- if (lastObjectID == CRASHED || lastMetaID == CRASHED)
- {
- OM.LOG.warn("Detected restart after crash");
- }
+ connection = getConnection();
- setLastObjectID(lastObjectID);
- repository.setLastMetaID(lastMetaID);
+ LifecycleUtil.deactivate(mappingStrategy);
StringBuilder builder = new StringBuilder();
builder.append("UPDATE ");
builder.append(CDODBSchema.REPOSITORY);
builder.append(" SET ");
- builder.append(CDODBSchema.REPOSITORY_STARTS);
- builder.append("=");
- builder.append(CDODBSchema.REPOSITORY_STARTS);
- builder.append("+1, ");
- builder.append(CDODBSchema.REPOSITORY_STARTED);
+ builder.append(CDODBSchema.REPOSITORY_STOPPED);
builder.append("=");
builder.append(System.currentTimeMillis());
builder.append(", ");
- builder.append(CDODBSchema.REPOSITORY_STOPPED);
- builder.append("=0, ");
builder.append(CDODBSchema.REPOSITORY_NEXT_CDOID);
builder.append("=");
- builder.append(CRASHED);
+ builder.append(getLastObjectID());
builder.append(", ");
builder.append(CDODBSchema.REPOSITORY_NEXT_METAID);
builder.append("=");
- builder.append(CRASHED);
+ builder.append(getRepository().getLastMetaID());
String sql = builder.toString();
int count = DBUtil.update(connection, sql);
@@ -261,44 +303,17 @@ public class DBStore extends LongIDStore implements IDBStore
throw new DBException("No row updated in table " + CDODBSchema.REPOSITORY);
}
}
-
- nextPackageID = DBUtil.selectMaximumInt(connection, CDODBSchema.PACKAGES_ID) + 1;
- nextClassID = DBUtil.selectMaximumInt(connection, CDODBSchema.CLASSES_ID) + 1;
- nextFeatureID = DBUtil.selectMaximumInt(connection, CDODBSchema.FEATURES_ID) + 1;
- LifecycleUtil.activate(mappingStrategy);
- }
-
- protected void deactivateStore(Repository repository, Connection connection)
- {
- LifecycleUtil.deactivate(mappingStrategy);
- StringBuilder builder = new StringBuilder();
- builder.append("UPDATE ");
- builder.append(CDODBSchema.REPOSITORY);
- builder.append(" SET ");
- builder.append(CDODBSchema.REPOSITORY_STOPPED);
- builder.append("=");
- builder.append(System.currentTimeMillis());
- builder.append(", ");
- builder.append(CDODBSchema.REPOSITORY_NEXT_CDOID);
- builder.append("=");
- builder.append(getLastObjectID());
- builder.append(", ");
- builder.append(CDODBSchema.REPOSITORY_NEXT_METAID);
- builder.append("=");
- builder.append(repository.getLastMetaID());
-
- String sql = builder.toString();
- int count = DBUtil.update(connection, sql);
- if (count == 0)
+ finally
{
- throw new DBException("No row updated in table " + CDODBSchema.REPOSITORY);
+ DBUtil.close(connection);
}
+
+ super.doDeactivate();
}
@Override
public void repairAfterCrash()
{
- Repository repository = (Repository)getRepository();
DBStoreReader storeReader = getReader(null);
StoreUtil.setReader(storeReader);
@@ -306,11 +321,11 @@ public class DBStore extends LongIDStore implements IDBStore
{
Connection connection = storeReader.getConnection();
long maxObjectID = mappingStrategy.repairAfterCrash(connection);
- long maxMetaID = DBUtil.selectMaximumLong(connection, CDODBSchema.PACKAGES_RANGE_UB);
+ setLastMetaID(DBUtil.selectMaximumLong(connection, CDODBSchema.PACKAGES_RANGE_UB));
- OM.LOG.info(MessageFormat.format("Repaired after crash: maxObjectID={0}, maxMetaID={1}", maxObjectID, maxMetaID));
+ OM.LOG.info(MessageFormat.format("Repaired after crash: maxObjectID={0}, maxMetaID={1}", maxObjectID,
+ getLastMetaID()));
setLastObjectID(maxObjectID);
- repository.setLastMetaID(maxMetaID);
}
finally
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreFactory.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreFactory.java
index 291ecdb..d073c97 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreFactory.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreFactory.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.internal.server.RepositoryConfigurator;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.IStoreFactory;
import org.eclipse.emf.cdo.server.db.CDODBUtil;
+import org.eclipse.emf.cdo.server.db.IDBStore;
import org.eclipse.emf.cdo.server.db.IMappingStrategy;
import org.eclipse.net4j.db.DBUtil;
@@ -50,7 +51,7 @@ public class DBStoreFactory implements IStoreFactory
IDBAdapter dbAdapter = getDBAdapter(storeConfig);
DataSource dataSource = getDataSource(storeConfig);
IDBConnectionProvider connectionProvider = DBUtil.createConnectionProvider(dataSource);
- DBStore store = new DBStore(mappingStrategy, dbAdapter, connectionProvider);
+ IDBStore store = CDODBUtil.createStore(mappingStrategy, dbAdapter, connectionProvider);
mappingStrategy.setStore(store);
return store;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
index 1e676f2..d084e3e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
@@ -55,6 +55,11 @@ public class HorizontalMappingStrategy extends MappingStrategy
return objectTypeCache;
}
+ public void setObjectTypeCache(IObjectTypeCache objectTypeCache)
+ {
+ this.objectTypeCache = objectTypeCache;
+ }
+
public CDOClassRef readObjectType(IDBStoreReader storeReader, CDOID id)
{
return objectTypeCache.getObjectType(storeReader, id);
@@ -137,8 +142,11 @@ public class HorizontalMappingStrategy extends MappingStrategy
protected void doActivate() throws Exception
{
super.doActivate();
- objectTypeCache = createObjectTypeCache(getStore());
- LifecycleUtil.activate(objectTypeCache);
+ if (objectTypeCache == null)
+ {
+ objectTypeCache = createObjectTypeCache(getStore());
+ LifecycleUtil.activate(objectTypeCache);
+ }
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStore.java
index 5793bf5..52b01b2 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/MEMStore.java
@@ -158,21 +158,25 @@ public class MEMStore extends LongIDStore
return null;
}
+ @Override
public boolean hasBranchingSupport()
{
return false;
}
+ @Override
public boolean hasWriteDeltaSupport()
{
return true;
}
+ @Override
public boolean hasAuditingSupport()
{
return true;
}
+ @Override
public void repairAfterCrash()
{
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 29d1838..c62da17 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -81,6 +81,7 @@ public class Repository extends Container<IRepositoryElement> implements IReposi
public void setStore(IStore store)
{
this.store = store;
+ store.setRepository(this);
}
public String getUUID()
@@ -193,7 +194,7 @@ public class Repository extends Container<IRepositoryElement> implements IReposi
@Override
public String toString()
{
- return MessageFormat.format("Repository[{0}, {1}]", name, uuid);
+ return MessageFormat.format("Repository[{0}]", name);
}
protected PackageManager createPackageManager()
@@ -266,6 +267,8 @@ public class Repository extends Container<IRepositoryElement> implements IReposi
store.repairAfterCrash();
}
+ setLastMetaID(store.getLastMetaID());
+
sessionManager.activate();
resourceManager.activate();
revisionManager.activate();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Store.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Store.java
index ec430f5..37585df 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Store.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Store.java
@@ -36,6 +36,8 @@ public abstract class Store extends Lifecycle implements IStore
private IRepository repository;
+ private long lastMetaID;
+
public Store(String type)
{
this.type = type;
@@ -61,9 +63,9 @@ public abstract class Store extends Lifecycle implements IStore
this.properties = properties;
}
- public IRepository getRepository()
+ public Repository getRepository()
{
- return repository;
+ return (Repository)repository;
}
public void setRepository(IRepository repository)
@@ -71,6 +73,16 @@ public abstract class Store extends Lifecycle implements IStore
this.repository = repository;
}
+ public long getLastMetaID()
+ {
+ return lastMetaID;
+ }
+
+ public void setLastMetaID(long lastMetaID)
+ {
+ this.lastMetaID = lastMetaID;
+ }
+
public IStoreReader getReader(ISession session)
{
return createReader(session);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
index 9e3e091..b6840ff 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStore.java
@@ -69,6 +69,8 @@ public interface IStore extends IRepositoryElement
public void repairAfterCrash();
+ public long getLastMetaID();
+
/**
* Returns a reader that can be used to read from this store in the context of the given session.
*
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
index cbf9f18..09e745c 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
@@ -36,10 +36,6 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, TCPSelector.class);
- private static final boolean VISTA = System.getProperty("vista.cache.selector") != null;
-
- private static Selector vistaCache;
-
private Selector selector;
/**
@@ -273,46 +269,12 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
protected Selector openSelector() throws IOException
{
- if (VISTA)
- {
- if (vistaCache == null)
- {
- vistaCache = Selector.open();
- }
-
- return vistaCache;
- }
-
return Selector.open();
}
protected void closeSelector() throws IOException
{
- if (VISTA)
- {
- for (SelectionKey key : selector.keys())
- {
- try
- {
- key.cancel();
- }
- catch (RuntimeException ignore)
- {
- }
- }
-
- try
- {
- selector.selectNow();
- }
- catch (RuntimeException ignore)
- {
- }
- }
- else
- {
- selector.close();
- }
+ selector.close();
}
@Override
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/factory/FactoryKey.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/factory/FactoryKey.java
index c0feb64..b6d9bc8 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/factory/FactoryKey.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/factory/FactoryKey.java
@@ -39,11 +39,21 @@ public final class FactoryKey implements IFactoryKey, Serializable, Comparable<F
return productGroup;
}
+ public void setProductGroup(String productGroup)
+ {
+ this.productGroup = productGroup;
+ }
+
public String getType()
{
return type;
}
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
@Override
public boolean equals(Object obj)
{