summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-03 15:10:59 (EDT)
committerEike Stepper2007-08-03 15:10:59 (EDT)
commitc6fb86067f07d5c766b411e09dd97fbf21c6766d (patch)
tree75fadeae227d93e3d6778d0300314a994e77de37
parentaf6347b5be80eb13aed6ff0289b0ae4d8b085449 (diff)
downloadcdo-c6fb86067f07d5c766b411e09dd97fbf21c6766d.zip
cdo-c6fb86067f07d5c766b411e09dd97fbf21c6766d.tar.gz
cdo-c6fb86067f07d5c766b411e09dd97fbf21c6766d.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.server/.options1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java44
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java10
5 files changed, 58 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/.options b/plugins/org.eclipse.emf.cdo.server/.options
index 0d5c584..42a3559 100644
--- a/plugins/org.eclipse.emf.cdo.server/.options
+++ b/plugins/org.eclipse.emf.cdo.server/.options
@@ -4,3 +4,4 @@ org.eclipse.emf.cdo.server/debug.repository = true
org.eclipse.emf.cdo.server/debug.session = true
org.eclipse.emf.cdo.server/debug.revision = true
org.eclipse.emf.cdo.server/debug.resource = true
+org.eclipse.emf.cdo.server/debug.store = true
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
index 956f118..41c543d 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
@@ -73,7 +73,7 @@ public class Session implements ISession, CDOIDProvider
public CDOID provideCDOID(Object idObject)
{
CDOID id = (CDOID)idObject;
- if (id.isNull())
+ if (id.isNull() || id.isMeta())
{
return id;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
index 0ff2627..c08135a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
@@ -39,6 +39,8 @@ public abstract class OM
public static final OMTracer DEBUG_RESOURCE = DEBUG.tracer("resource"); //$NON-NLS-1$
+ public static final OMTracer DEBUG_STORE = DEBUG.tracer("store"); //$NON-NLS-1$
+
public static final OMLogger LOG = BUNDLE.logger();
static void start() throws Exception
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
index c7a8c41..23d4de5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/store/Store.java
@@ -14,9 +14,11 @@ import org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.internal.server.Repository;
import org.eclipse.emf.cdo.internal.server.RevisionManager;
+import org.eclipse.emf.cdo.internal.server.bundle.OM;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.server.IStore;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.transaction.TX;
import java.util.Map;
@@ -26,6 +28,8 @@ import java.util.Map;
*/
public abstract class Store implements IStore
{
+ public static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SESSION, Store.class);
+
private String type;
private Repository repository;
@@ -47,41 +51,81 @@ public abstract class Store implements IStore
public void setRepository(Repository repository)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Setting repository: {0} ({1})", repository.getName(), repository.getUUID());
+ }
+
this.repository = repository;
}
public void registerResource(CDOID id, String path, Map<CDOID, String> idToPathMap, Map<String, CDOID> pathToIDMap)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Registering resource: {0}", id);
+ }
+
TX.execute(createRegisterResourceOperation(id, path, idToPathMap, pathToIDMap));
}
public CDOID loadResourceID(String path)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Loading resource ID: {0}", path);
+ }
+
return (CDOID)TX.execute(createLoadResourceIDOperation(path));
}
public String loadResourcePath(CDOID id)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Loading resource path: {0}", id);
+ }
+
return (String)TX.execute(createLoadResourcePathOperation(id));
}
public void addRevision(RevisionManager revisionManager, CDORevisionImpl revision)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Adding revision: {0}", revision);
+ }
+
TX.execute(createAddRevisionOperation(revisionManager, revision));
}
public CDORevisionImpl loadRevision(CDOID id)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Loading revision: {0}", id);
+ }
+
return (CDORevisionImpl)TX.execute(createLoadRevisionOperation(id));
}
public CDORevisionImpl loadHistoricalRevision(CDOID id, long timeStamp)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Loading historical revision: {0} ({1,date} {1,time})", id, timeStamp);
+ }
+
return (CDORevisionImpl)TX.execute(createLoadHistoricalRevisionOperation(id, timeStamp));
}
public CDOClassRefImpl queryObjectType(CDOID id)
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Querying object type: {0}", id);
+ }
+
// TODO Implement method Store.queryObjectType()
throw new UnsupportedOperationException("Not yet implemented");
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
index b66d0ea..479838a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOLegacyImpl.java
@@ -171,6 +171,11 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl
protected void transferInstanceToRevision()
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Transfering instance to revision: {0} --> {1}", instance, revision);
+ }
+
CDOViewImpl view = cdoView();
if (view == null)
{
@@ -254,6 +259,11 @@ public abstract class CDOLegacyImpl extends CDOWrapperImpl
protected void transferRevisionToInstance()
{
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Transfering revision to instance: {0} --> {1}", revision, instance);
+ }
+
CDOViewImpl view = cdoView();
if (view == null)
{