summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-10-28 05:14:50 (EDT)
committerEike Stepper2006-10-28 05:14:50 (EDT)
commiteb098fcb074b0e34826d861db793df6b3cbe2d10 (patch)
treea0a6129f2b19560aca8e917dc868d2e25f6dcd2e
parentd58e62c0c8163cc0f578afdb3554ec00899c2e82 (diff)
downloadcdo-eb098fcb074b0e34826d861db793df6b3cbe2d10.zip
cdo-eb098fcb074b0e34826d861db793df6b3cbe2d10.tar.gz
cdo-eb098fcb074b0e34826d861db793df6b3cbe2d10.tar.bz2
Added instance tracer
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java94
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java40
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DeleteResourcesIndication.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/InvalidationNotificationRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadObjectIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadResourceIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryExtentIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryXRefsIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/RemovalNotificationRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourceRIDIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcesChangedRequest.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/.classpath2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch448
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java17
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractOMTest.java8
-rw-r--r--plugins/org.eclipse.net4j/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMPlatform.java10
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java37
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java24
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferFactoryImpl.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferImpl.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferPoolImpl.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/ChannelImpl.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/AbstractTCPConnector.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/ControlChannelImpl.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPSelectorImpl.java14
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPUtil.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java20
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferInputStream.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferOutputStream.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/ReflectUtil.java30
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/concurrent/AsynchronousWorkSerializer.java6
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/AbstractLifecycle.java16
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTraceHandler.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTracer.java12
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/EclipseLoggingBridge.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java)7
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/OSGiLoggingBridge.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java)7
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/PrintLogHandler.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java)12
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/ContextTracer.java110
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/InstanceTracer.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/ContextTracer.java)28
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/PrintTraceHandler.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java)14
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceHandler.java158
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceServer.java344
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java4
55 files changed, 1396 insertions, 229 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
index e48e9f7..d50ef47 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.impl;
import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataOutput;
import org.eclipse.emf.cdo.core.CDOProtocol;
@@ -365,7 +365,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(SELECT_PACKAGES);
+ TRACER.trace(this, SELECT_PACKAGES);
}
jdbcTemplate.query(SELECT_PACKAGES, new RowCallbackHandler()
@@ -377,7 +377,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Initializing package: pid=" + pid + ", name=" + name);
+ TRACER.trace(this, "Initializing package: pid=" + pid + ", name=" + name);
}
PackageInfo packageInfo = packageManager.addPackage(pid, name);
initClasses(packageInfo);
@@ -394,7 +394,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Integer(packageInfo.getPid())};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_CLASSES, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_CLASSES, "?", args));
}
nestedTemplate.query(SELECT_CLASSES, args, new RowCallbackHandler()
@@ -413,7 +413,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Initializing class: cid=" + cid + ", name=" + name + ", parentName="
+ TRACER.trace(this, "Initializing class: cid=" + cid + ", name=" + name + ", parentName="
+ parentName + ", tableName=" + tableName);
}
ClassInfo classInfo = packageInfo.addClass(cid, name, parentName, tableName);
@@ -437,7 +437,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Integer(classInfo.getCID())};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_ATTRIBUTES, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_ATTRIBUTES, "?", args));
}
nestedTemplate.query(SELECT_ATTRIBUTES, args, new RowCallbackHandler()
@@ -452,7 +452,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Initializing attribute: name=" + name + ", featureId=" + featureId
+ TRACER.trace(this, "Initializing attribute: name=" + name + ", featureId=" + featureId
+ ", dataType=" + dataType + ", columnName=" + columnName + ", columnType="
+ columnType);
}
@@ -485,7 +485,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { path};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_RID_OF_RESOURCE, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_RID_OF_RESOURCE, "?", args));
}
final int[] rows = new int[1];
@@ -511,7 +511,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Selected " + result);
+ TRACER.trace(this, "Selected " + result);
}
return result;
}
@@ -521,7 +521,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Integer(rid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_PATH_OF_RESOURCE, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_PATH_OF_RESOURCE, "?", args));
}
final int[] rows = new int[1];
@@ -547,7 +547,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Selected " + result);
+ TRACER.trace(this, "Selected " + result);
}
return result;
}
@@ -557,7 +557,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = ridBounds(rid);
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_MAX_OID_FRAGMENT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_MAX_OID_FRAGMENT, "?", args));
}
long oid = jdbcTemplate.queryForLong(SELECT_MAX_OID_FRAGMENT, args);
return oidEncoder.getOIDFragment(oid);
@@ -574,7 +574,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(SELECT_MAX_PID);
+ TRACER.trace(this, SELECT_MAX_PID);
}
return jdbcTemplate.queryForInt(SELECT_MAX_PID);
}
@@ -583,7 +583,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(SELECT_MAX_CID);
+ TRACER.trace(this, SELECT_MAX_CID);
}
return jdbcTemplate.queryForInt(SELECT_MAX_CID);
}
@@ -592,7 +592,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(SELECT_MAX_RID);
+ TRACER.trace(this, SELECT_MAX_RID);
}
return jdbcTemplate.queryForInt(SELECT_MAX_RID);
}
@@ -609,7 +609,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid), new Integer(feature)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_COLLECTION_COUNT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_COLLECTION_COUNT, "?", args));
}
return jdbcTemplate.queryForInt(SELECT_COLLECTION_COUNT, args);
@@ -620,7 +620,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid), new Integer(oca)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(DO_OPTIMISTIC_CONTROL, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(DO_OPTIMISTIC_CONTROL, "?", args));
}
int changed = jdbcTemplate.update(DO_OPTIMISTIC_CONTROL, args);
@@ -653,7 +653,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
new Integer(startIndex), new Integer(endIndex)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(MOVE_REFERENCES_RELATIVE, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(MOVE_REFERENCES_RELATIVE, "?", args));
}
// ignore number of affected rows
@@ -670,7 +670,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { oid};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(REMOVE_REFERENCES, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(REMOVE_REFERENCES, "?", args));
}
jdbcTemplate.update(REMOVE_REFERENCES, args);
@@ -700,7 +700,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_CID_OF_OBJECT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_CID_OF_OBJECT, "?", args));
}
try
@@ -751,7 +751,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(sql);
+ TRACER.trace(this, sql);
}
int rows = jdbcTemplate.update(sql);
@@ -766,7 +766,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(sql, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(sql, "?", args));
}
int rows = jdbcTemplate.update(sql, args);
@@ -781,7 +781,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(sql, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(sql, "?", args));
}
int rows = jdbcTemplate.update(sql, args, types);
@@ -799,7 +799,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = ridBounds(resourceInfo.getRID());
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(TRANSMIT_CONTENT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(TRANSMIT_CONTENT, "?", args));
}
try
@@ -816,8 +816,8 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca + ", cid="
- + cid);
+ TRACER.trace(this, "Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca
+ + ", cid=" + cid);
}
out.writeLong(oid);
@@ -854,7 +854,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(TRANSMIT_OBJECT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(TRANSMIT_OBJECT, "?", args));
}
try
@@ -870,8 +870,8 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca + ", cid="
- + cid);
+ TRACER.trace(this, "Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca
+ + ", cid=" + cid);
}
out.writeLong(oid);
@@ -925,7 +925,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(child[0]), Boolean.TRUE};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_CONTAINER_OF_OBJECT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_CONTAINER_OF_OBJECT, "?", args));
}
child[0] = 0;
@@ -947,7 +947,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Container container = (Container) it.next();
if (TRACER.isEnabled())
{
- TRACER.trace("Container: oid=" + oidEncoder.toString(container.oid) + ", cid="
+ TRACER.trace(this, "Container: oid=" + oidEncoder.toString(container.oid) + ", cid="
+ container.cid);
}
@@ -961,7 +961,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(TRANSMIT_REFERENCES, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(TRANSMIT_REFERENCES, "?", args));
}
try
@@ -977,7 +977,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
int cid = resultSet.getInt(3);
if (TRACER.isEnabled())
{
- TRACER.trace("Reference: feature=" + feature + ", target="
+ TRACER.trace(this, "Reference: feature=" + feature + ", target="
+ oidEncoder.toString(target) + ", cid=" + cid);
}
@@ -1015,7 +1015,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(sql, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(sql, "?", args));
}
try
@@ -1056,8 +1056,8 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace("Querying all resources");
- TRACER.trace(SELECT_ALL_RESOURCES);
+ TRACER.trace(this, "Querying all resources");
+ TRACER.trace(this, SELECT_ALL_RESOURCES);
}
try
@@ -1092,7 +1092,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace("Deleting resource: rid=" + rid);
+ TRACER.trace(this, "Deleting resource: rid=" + rid);
}
sql(DELETE_RESOURCE, new Object[] { rid});
@@ -1100,7 +1100,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = ridBounds(rid);
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_ALL_OBJECTS_OF_RESOURCE, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_ALL_OBJECTS_OF_RESOURCE, "?", args));
}
jdbcTemplate.query(SELECT_ALL_OBJECTS_OF_RESOURCE, args, new RowCallbackHandler()
@@ -1112,7 +1112,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Deleting object: oid=" + oidEncoder.toString(oid) + ", cid=" + cid);
+ TRACER.trace(this, "Deleting object: oid=" + oidEncoder.toString(oid) + ", cid=" + cid);
}
removeObject(oid, cid);
@@ -1124,7 +1124,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace("Removing stale references");
+ TRACER.trace(this, "Removing stale references");
}
final Set<Long> modifiedOIDs = new HashSet<Long>();
@@ -1138,7 +1138,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
if (TRACER.isEnabled())
{
- TRACER.trace("Reference: oid=" + oidEncoder.toString(oid) + ", feature=" + feature
+ TRACER.trace(this, "Reference: oid=" + oidEncoder.toString(oid) + ", feature=" + feature
+ ", ordinal=" + ordinal);
}
@@ -1191,7 +1191,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
String sql = buffer.toString();
if (TRACER.isEnabled())
{
- TRACER.trace(sql);
+ TRACER.trace(this, sql);
}
try
@@ -1206,7 +1206,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
int cid = exactMatch ? context : resultSet.getInt(2);
if (TRACER.isEnabled())
{
- TRACER.trace("Extent: oid=" + oidEncoder.toString(oid)
+ TRACER.trace(this, "Extent: oid=" + oidEncoder.toString(oid)
+ (exactMatch ? "" : ", cid=" + cid));
}
@@ -1237,7 +1237,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
Object[] args = { new Long(oid)};
if (TRACER.isEnabled())
{
- TRACER.trace(StringHelper.replaceWildcards(SELECT_XREFS_OF_OBJECT, "?", args));
+ TRACER.trace(this, StringHelper.replaceWildcards(SELECT_XREFS_OF_OBJECT, "?", args));
}
try
@@ -1253,8 +1253,8 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
int cid = resultSet.getInt(3);
if (TRACER.isEnabled())
{
- TRACER.trace("XRef: referer=" + oidEncoder.toString(referer) + ", feature=" + feature
- + ", cid=" + cid);
+ TRACER.trace(this, "XRef: referer=" + oidEncoder.toString(referer) + ", feature="
+ + feature + ", cid=" + cid);
}
out.writeLong(referer);
@@ -1280,7 +1280,7 @@ public class MapperImpl extends AbstractLifecycle implements Mapper, SQLConstant
{
if (TRACER.isEnabled())
{
- TRACER.trace("Creating attribute tables");
+ TRACER.trace(this, "Creating attribute tables");
}
Database database = DBGenFactory.eINSTANCE.createDatabase();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
index 70fe143..aba729d 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.impl;
import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.cdo.server.Mapper;
import org.eclipse.emf.cdo.server.ResourceInfo;
@@ -39,7 +39,7 @@ public class ResourceManagerImpl extends AbstractLifecycle implements ResourceMa
{
if (TRACER.isEnabled())
{
- TRACER.trace("Registering " + resourceInfo);
+ TRACER.trace(this, "Registering " + resourceInfo);
}
ridToResourceMap.put(resourceInfo.getRID(), resourceInfo);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
index 6b897a8..a5584b4 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -54,7 +54,7 @@ public class AnnouncePackageIndication extends IndicationWithResponse
packageName = in.readString();
if (TRACER.isEnabled())
{
- TRACER.trace("Announced package " + packageName);
+ TRACER.trace(this, "Announced package " + packageName);
}
}
@@ -66,7 +66,7 @@ public class AnnouncePackageIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("Unknown package " + packageName);
+ TRACER.trace(this, "Unknown package " + packageName);
}
out.writeInt(-1);
@@ -80,7 +80,8 @@ public class AnnouncePackageIndication extends IndicationWithResponse
ClassInfo classInfo = classInfos[i];
if (TRACER.isEnabled())
{
- TRACER.trace("Responding class " + classInfo.getName() + " = " + classInfo.getCID());
+ TRACER
+ .trace(this, "Responding class " + classInfo.getName() + " = " + classInfo.getCID());
}
out.writeInt(classInfo.getCID());
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
index 2c8ef8c..2d075bb 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -173,7 +173,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("receiveObjectsToDetach()");
+ TRACER.trace(this, "receiveObjectsToDetach()");
}
for (;;)
@@ -192,7 +192,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("receiveObjectsToAttach()");
+ TRACER.trace(this, "receiveObjectsToAttach()");
}
int count = in.readInt();
@@ -222,7 +222,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("receiveObjectsToAttachReferences()");
+ TRACER.trace(this, "receiveObjectsToAttachReferences()");
}
int count = in.readInt();
@@ -283,7 +283,8 @@ public class CommitTransactionIndication extends IndicationWithResponse
oidList.add(val);
if (TRACER.isEnabled())
{
- TRACER.trace("Mapping oid " + oidEncoder.toString(key) + " --> " + oidEncoder.toString(val));
+ TRACER.trace(this, "Mapping oid " + oidEncoder.toString(key) + " --> "
+ + oidEncoder.toString(val));
}
return oid;
@@ -309,7 +310,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("receiveObjectChanges()");
+ TRACER.trace(this, "receiveObjectChanges()");
}
for (;;)
@@ -382,7 +383,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
OIDEncoder oidEncoder = mapper.getOidEncoder();
- TRACER.trace("received reference set: oid=" + oidEncoder.toString(oid) + ", feature="
+ TRACER.trace(this, "received reference set: oid=" + oidEncoder.toString(oid) + ", feature="
+ feature + ", target=" + oidEncoder.toString(target) + ", containment=" + containment);
}
@@ -402,7 +403,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
OIDEncoder oidEncoder = mapper.getOidEncoder();
- TRACER.trace("received reference unset: oid=" + oidEncoder.toString(oid) + ", feature="
+ TRACER.trace(this, "received reference unset: oid=" + oidEncoder.toString(oid) + ", feature="
+ feature);
}
@@ -430,7 +431,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
OIDEncoder oidEncoder = mapper.getOidEncoder();
- TRACER.trace("received reference add: oid=" + oidEncoder.toString(oid) + ", feature="
+ TRACER.trace(this, "received reference add: oid=" + oidEncoder.toString(oid) + ", feature="
+ feature + ", ordinal=" + ordinal + ", target=" + oidEncoder.toString(target)
+ ", containment=" + containment);
}
@@ -458,8 +459,9 @@ public class CommitTransactionIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
OIDEncoder oidEncoder = mapper.getOidEncoder();
- TRACER.trace("receiveObjectChangesReferences(REMOVE, sourceId=" + oidEncoder.toString(oid)
- + ", featureId=" + feature + ", sourceOrdinal=" + ordinal + ")");
+ TRACER.trace(this, "receiveObjectChangesReferences(REMOVE, sourceId="
+ + oidEncoder.toString(oid) + ", featureId=" + feature + ", sourceOrdinal=" + ordinal
+ + ")");
}
mapper.removeReference(oid, feature, ordinal);
@@ -481,7 +483,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
OIDEncoder oidEncoder = mapper.getOidEncoder();
- TRACER.trace("received reference move: oid=" + oidEncoder.toString(oid) + ", feature="
+ TRACER.trace(this, "received reference move: oid=" + oidEncoder.toString(oid) + ", feature="
+ feature + ", ordinal=" + ordinal + ", moveToIndex=" + moveToIndex);
}
@@ -513,11 +515,11 @@ public class CommitTransactionIndication extends IndicationWithResponse
optimisticControlException = true;
if (TRACER.isEnabled())
{
- TRACER.trace("");
- TRACER.trace("============================");
- TRACER.trace("OPTIMISTIC CONTROL EXCEPTION");
- TRACER.trace("============================");
- TRACER.trace("");
+ TRACER.trace(this, "");
+ TRACER.trace(this, "============================");
+ TRACER.trace(this, "OPTIMISTIC CONTROL EXCEPTION");
+ TRACER.trace(this, "============================");
+ TRACER.trace(this, "");
}
return oca;
@@ -606,7 +608,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("receiveObjectsToAttachAttributes()");
+ TRACER.trace(this, "receiveObjectsToAttachAttributes()");
}
while (classInfo != null)
@@ -626,7 +628,7 @@ public class CommitTransactionIndication extends IndicationWithResponse
AttributeInfo attributeInfo = attributeInfos[i];
if (TRACER.isEnabled())
{
- TRACER.trace("Receiving attribute " + attributeInfo.getName());
+ TRACER.trace(this, "Receiving attribute " + attributeInfo.getName());
}
ColumnConverter converter = mapper.getColumnConverter();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DeleteResourcesIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DeleteResourcesIndication.java
index 7b41df9..d32a052 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DeleteResourcesIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DeleteResourcesIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -77,7 +77,7 @@ public class DeleteResourcesIndication extends IndicationWithResponse implements
if (TRACER.isEnabled())
{
- TRACER.trace("Deleting rid " + rid);
+ TRACER.trace(this, "Deleting rid " + rid);
}
rids.add(rid);
@@ -102,7 +102,7 @@ public class DeleteResourcesIndication extends IndicationWithResponse implements
{
if (TRACER.isEnabled())
{
- TRACER.trace("Deleted resources: " + ok);
+ TRACER.trace(this, "Deleted resources: " + ok);
}
out.writeBoolean(ok);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
index ba55aac..3da7379 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -60,7 +60,7 @@ public class DescribePackageIndication extends IndicationWithResponse
String packageName = in.readString();
if (TRACER.isEnabled())
{
- TRACER.trace("Described package " + packageName);
+ TRACER.trace(this, "Described package " + packageName);
}
PackageInfo packageInfo = mapper.getPackageManager().addPackage(pid, packageName);
@@ -79,7 +79,7 @@ public class DescribePackageIndication extends IndicationWithResponse
ClassInfo classInfo = iter.next();
if (TRACER.isEnabled())
{
- TRACER.trace("Responding class " + classInfo.getName() + " = " + classInfo.getCID());
+ TRACER.trace(this, "Responding class " + classInfo.getName() + " = " + classInfo.getCID());
}
out.writeInt(classInfo.getCID());
@@ -100,7 +100,7 @@ public class DescribePackageIndication extends IndicationWithResponse
String tableName = in.readString();
if (TRACER.isEnabled())
{
- TRACER.trace("Described class " + name);
+ TRACER.trace(this, "Described class " + name);
}
ClassInfo classInfo = packageInfo.addClass(cid, name, parentName, tableName);
@@ -126,7 +126,7 @@ public class DescribePackageIndication extends IndicationWithResponse
int columnType = in.readInt();
if (TRACER.isEnabled())
{
- TRACER.trace("Described attribute " + name);
+ TRACER.trace(this, "Described attribute " + name);
}
AttributeInfo attributeInfo = classInfo.addAttribute(name, featureId, dataType, columnName,
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/InvalidationNotificationRequest.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/InvalidationNotificationRequest.java
index 49925f1..618b7c6 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/InvalidationNotificationRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/InvalidationNotificationRequest.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.Request;
import org.eclipse.net4j.transport.Channel;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
import org.eclipse.emf.cdo.core.CDOSignals;
@@ -52,7 +52,7 @@ public class InvalidationNotificationRequest extends Request
int size = changedObjectIds.size();
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting " + size + " invalidations");
+ TRACER.trace(this, "Transmitting " + size + " invalidations");
}
out.writeInt(size);
@@ -60,7 +60,7 @@ public class InvalidationNotificationRequest extends Request
{
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting oid " + oid);
+ TRACER.trace(this, "Transmitting oid " + oid);
}
out.writeLong(oid);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadObjectIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadObjectIndication.java
index ddbbf6e..e31a9ac 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadObjectIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadObjectIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -52,7 +52,7 @@ public class LoadObjectIndication extends IndicationWithResponse
oid = in.readLong();
if (TRACER.isEnabled())
{
- TRACER.trace("Loading object " + mapper.getOidEncoder().toString(oid));
+ TRACER.trace(this, "Loading object " + mapper.getOidEncoder().toString(oid));
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadResourceIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadResourceIndication.java
index fafa720..2dde316 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadResourceIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/LoadResourceIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -54,7 +54,7 @@ public class LoadResourceIndication extends IndicationWithResponse
rid = in.readInt();
if (TRACER.isEnabled())
{
- TRACER.trace("Loading rid " + rid);
+ TRACER.trace(this, "Loading rid " + rid);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryExtentIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryExtentIndication.java
index ab3061c..6965579 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryExtentIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryExtentIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -59,7 +59,7 @@ public class QueryExtentIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
- TRACER.trace("Received cid=" + cid + ", exactMatch=" + exactMatch + ", rid=" + rid);
+ TRACER.trace(this, "Received cid=" + cid + ", exactMatch=" + exactMatch + ", rid=" + rid);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryXRefsIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryXRefsIndication.java
index af5257d..384811e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryXRefsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/QueryXRefsIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -56,7 +56,7 @@ public class QueryXRefsIndication extends IndicationWithResponse
if (TRACER.isEnabled())
{
- TRACER.trace("Received oid=" + oid + ", rid=" + rid);
+ TRACER.trace(this, "Received oid=" + oid + ", rid=" + rid);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/RemovalNotificationRequest.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/RemovalNotificationRequest.java
index 530cec5..7e759e7 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/RemovalNotificationRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/RemovalNotificationRequest.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.Request;
import org.eclipse.net4j.transport.Channel;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
import org.eclipse.emf.cdo.core.CDOSignals;
@@ -52,7 +52,7 @@ public class RemovalNotificationRequest extends Request
int size = rids.size();
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting " + size + " removals");
+ TRACER.trace(this, "Transmitting " + size + " removals");
}
out.writeInt(size);
@@ -60,7 +60,7 @@ public class RemovalNotificationRequest extends Request
{
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting rid " + rid);
+ TRACER.trace(this, "Transmitting rid " + rid);
}
out.writeInt(rid);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
index 4a60971..c82871c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -54,7 +54,7 @@ public class ResourcePathIndication extends IndicationWithResponse
path = in.readString();
if (TRACER.isEnabled())
{
- TRACER.trace("Requested path " + path);
+ TRACER.trace(this, "Requested path " + path);
}
}
@@ -69,7 +69,7 @@ public class ResourcePathIndication extends IndicationWithResponse
resourceManager.registerResourceInfo(path, rid, 1);
if (TRACER.isEnabled())
{
- TRACER.trace("No resource with path " + path + " - reserving rid " + rid);
+ TRACER.trace(this, "No resource with path " + path + " - reserving rid " + rid);
}
out.writeInt(-rid);
@@ -78,7 +78,7 @@ public class ResourcePathIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("Responding rid " + info.getRID());
+ TRACER.trace(this, "Responding rid " + info.getRID());
}
out.writeInt(info.getRID());
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourceRIDIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourceRIDIndication.java
index 49a616f..6b7f504 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourceRIDIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourceRIDIndication.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -54,7 +54,7 @@ public class ResourceRIDIndication extends IndicationWithResponse
rid = in.readInt();
if (TRACER.isEnabled())
{
- TRACER.trace("Requested rid " + rid);
+ TRACER.trace(this, "Requested rid " + rid);
}
}
@@ -67,7 +67,7 @@ public class ResourceRIDIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("No resource with rid " + rid);
+ TRACER.trace(this, "No resource with rid " + rid);
}
out.writeString(null);
@@ -76,7 +76,7 @@ public class ResourceRIDIndication extends IndicationWithResponse
{
if (TRACER.isEnabled())
{
- TRACER.trace("Responding path " + info.getPath());
+ TRACER.trace(this, "Responding path " + info.getPath());
}
out.writeString(info.getPath());
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcesChangedRequest.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcesChangedRequest.java
index afae679..f72c3e8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcesChangedRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcesChangedRequest.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.server.protocol;
import org.eclipse.net4j.signal.Request;
import org.eclipse.net4j.transport.Channel;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
import org.eclipse.emf.cdo.core.CDOResSignals;
@@ -52,15 +52,15 @@ public class ResourcesChangedRequest extends Request
{
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting " + infos.size() + " resource changes");
+ TRACER.trace(this, "Transmitting " + infos.size() + " resource changes");
}
for (ResourceChangeInfo info : infos)
{
if (TRACER.isEnabled())
{
- TRACER.trace("Transmitting changeKind=" + info.getChangeKind() + ", rid=" + info.getRID()
- + ". path=" + info.getPath());
+ TRACER.trace(this, "Transmitting changeKind=" + info.getChangeKind() + ", rid="
+ + info.getRID() + ". path=" + info.getPath());
}
info.transmit(out);
diff --git a/plugins/org.eclipse.emf.cdo.tests/.classpath b/plugins/org.eclipse.emf.cdo.tests/.classpath
index 751c8f2..7b6e15f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/.classpath
+++ b/plugins/org.eclipse.emf.cdo.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry excluding="org/eclipse/emf/cdo/tests/topology/ClientSeparatedServerTopology.java|org/eclipse/emf/cdo/tests/topology/ClientTopology.java|org/eclipse/emf/cdo/tests/topology/EmbeddedTopology.java" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
index 5f94cac..73aaf60 100644
--- a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
@@ -11,6 +11,454 @@
</listAttribute>
<stringAttribute key="selected_target_plugins" value="com.ibm.icu,org.apache.ant,org.apache.xerces,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.emf.ocl,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.servlet.api,org.eclipse.osgi,org.eclipse.osgi.services,org.eclipse.update.configurator,org.junit"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<mapAttribute key="tracingOptions">
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/events" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
+<mapEntry key="org.eclipse.emf.validation/debug/exceptions/throwing" value="false"/>
+<mapEntry key="com.soyatec.uml.std/trace/module/modelJavaEvent" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/formatter/enable_new" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
+<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/services/config" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/constraints/evaluation" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/undo" value="false"/>
+<mapEntry key="org.eclipse.emf.query/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
+<mapEntry key="org.eclipse.emf.query/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/actions/admin" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.server/debug.mapper" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
+<mapEntry key="org.eclipse.net4j/debug" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/canonical" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.server/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
+<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.client/debug.model" value="true"/>
+<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.core/debug.worker" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
+<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
+<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.om" value="true"/>
+<mapEntry key="org.eclipse.team.core/streams" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/execute" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
+<mapEntry key="org.eclipse.net4j/debug.selector" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/model/operations" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
+<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.client/debug.resource" value="true"/>
+<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
+<mapEntry key="org.eclipse.emf.query/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.server/debug.resource" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.validation/debug/providers" value="false"/>
+<mapEntry key="com.soyatec.uml.std/trace/module/modelMapper" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/events/tracing" value="false"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.validation/debug/parsers" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.examples.library.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
+<mapEntry key="com.soyatec.uml.core/trace/module/viewEvent" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/resource/tracing" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
+<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/services/config" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
+<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
+<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
+<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/execute" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
+<mapEntry key="org.eclipse.help.base/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug" value="true"/>
+<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.validation/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.buffer" value="true"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/cache" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
+<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
+<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.signal" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.emf.ocl/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.cdo.dbgen/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
+<mapEntry key="org.eclipse.net4j/debug.acceptor" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.examples.client/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
+<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.emf.validation/debug/constraints/disabled" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/resources" value="false"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
+<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
+<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
+<mapEntry key="org.eclipse.help/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.examples.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
+<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/plugin/ondemand/loading" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.client.ocl/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.lifecycle.dump" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/showSystemJobs" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.utilities.migrator/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.transaction/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.resources/history" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/resolver/grouping" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/xml" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug" value="true"/>
+<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.client/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
+<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
+<mapEntry key="org.eclipse.net4j/debug.channel" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/locking" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/transactions" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/repeat" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
+<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.client/debug.protocol" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.server/debug.protocol" value="true"/>
+<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug" value="true"/>
+<mapEntry key="org.eclipse.net4j/perf" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
+<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
+<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
+<mapEntry key="org.eclipse.emf.workspace/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.examples.server/debug" value="true"/>
+<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.registry" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
+<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.core/debug" value="true"/>
+<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
+<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/persistencemgr" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/listeners" value="false"/>
+<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
+<mapEntry key="com.soyatec.uml.core/trace/module/UMLPlugin" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
+<mapEntry key="org.eclipse.emf.query/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.jdbc/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.help/debug/context" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/actions/run" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.examples.library/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/events/tracing" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
+<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
+<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/config" value="false"/>
+<mapEntry key="org.eclipse.team.core/debug" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
+<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.emf.ocl/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
+<mapEntry key="org.eclipse.emf.cdo.core/debug.extension" value="true"/>
+<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
+<mapEntry key="org.eclipse.team.core/threading" value="false"/>
+<mapEntry key="org.eclipse.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
+<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
+<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/constraints" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/redo" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/admin" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
+<mapEntry key="org.eclipse.emf.query/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/activate" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/admin" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.lifecycle" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
+<mapEntry key="org.eclipse.net4j/debug.buffer.stream" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
+<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/monitorbundles" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
+<mapEntry key="org.eclipse.emf.validation/debug" value="true"/>
+<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
+<mapEntry key="org.eclipse.emf.workspace/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
+<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
+<mapEntry key="com.soyatec.uml.core/trace/level" value="error"/>
+<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
+<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
+<mapEntry key="org.eclipse.emf.ocl/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
+<mapEntry key="org.eclipse.emf.transaction/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/run" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
+<mapEntry key="org.eclipse.net4j/debug.connector" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug" value="true"/>
+<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
+<mapEntry key="org.eclipse.net4j/debug.concurrency" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/dnd/tracing" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
+<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
+<mapEntry key="org.eclipse.emf.workspace/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug" value="true"/>
+<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
+<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/methods/entering" value="false"/>
+</mapAttribute>
<booleanAttribute key="automaticValidate" value="true"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.net4j"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
index 7337c1d..295c269 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
@@ -21,8 +21,9 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.PrintStreamLogHandler;
-import org.eclipse.net4j.util.om.PrintStreamTraceHandler;
+import org.eclipse.net4j.util.om.log.PrintLogHandler;
+import org.eclipse.net4j.util.om.trace.RemoteTraceHandler;
+import org.eclipse.net4j.util.om.trace.RemoteTraceServer;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -33,6 +34,8 @@ import junit.framework.TestCase;
public abstract class AbstractTopologyTest extends TestCase implements ITopologyConstants
{
+ private static int run;
+
private String mode;
private ITopology topology;
@@ -41,7 +44,7 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
private String label;
- private static int run;
+ private RemoteTraceServer remoteTraceServer;
public String getMode()
{
@@ -66,9 +69,13 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
@Override
protected void setUp() throws Exception
{
- OMPlatform.INSTANCE.addLogHandler(PrintStreamLogHandler.CONSOLE);
- OMPlatform.INSTANCE.addTraceHandler(PrintStreamTraceHandler.CONSOLE);
+ // remoteTraceServer = new RemoteTraceServer();
+ // remoteTraceServer.addListener(RemoteTraceServer.PrintListener.CONSOLE);
+
OMPlatform.INSTANCE.setDebugging(true);
+ OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
+ OMPlatform.INSTANCE.addTraceHandler(new RemoteTraceHandler());
+ // OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
System.gc();
startMemory = getUsedMemory();
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractOMTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractOMTest.java
index f5c429c..ba33eaf 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractOMTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractOMTest.java
@@ -11,8 +11,8 @@
package org.eclipse.net4j.tests;
import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.PrintStreamLogHandler;
-import org.eclipse.net4j.util.om.PrintStreamTraceHandler;
+import org.eclipse.net4j.util.om.log.PrintLogHandler;
+import org.eclipse.net4j.util.om.trace.PrintTraceHandler;
import junit.framework.TestCase;
@@ -33,8 +33,8 @@ public abstract class AbstractOMTest extends TestCase
System.out.print(getName());
System.out.println(" =================================");
- OMPlatform.INSTANCE.addLogHandler(PrintStreamLogHandler.CONSOLE);
- OMPlatform.INSTANCE.addTraceHandler(PrintStreamTraceHandler.CONSOLE);
+ OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
+ OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
OMPlatform.INSTANCE.setDebugging(true);
}
diff --git a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
index 979bbb0..9b12f7d 100644
--- a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
@@ -25,6 +25,8 @@ Export-Package: org.eclipse.internal.net4j.transport;version="0.8.0",
org.eclipse.net4j.util.concurrent;version="0.8.0",
org.eclipse.net4j.util.lifecycle;version="0.8.0",
org.eclipse.net4j.util.om;version="0.8.0",
+ org.eclipse.net4j.util.om.log,
+ org.eclipse.net4j.util.om.trace,
org.eclipse.net4j.util.registry;version="0.8.0",
org.eclipse.net4j.util.stream;version="0.8.0"
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMPlatform.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMPlatform.java
index f692808..7b43fd0 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMPlatform.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/AbstractOMPlatform.java
@@ -10,7 +10,6 @@
**************************************************************************/
package org.eclipse.internal.net4j.bundle;
-import org.eclipse.net4j.util.om.ContextTracer;
import org.eclipse.net4j.util.om.OMBundle;
import org.eclipse.net4j.util.om.OMLogHandler;
import org.eclipse.net4j.util.om.OMLogger;
@@ -18,6 +17,7 @@ import org.eclipse.net4j.util.om.OMPlatform;
import org.eclipse.net4j.util.om.OMTraceHandler;
import org.eclipse.net4j.util.om.OMTracer;
import org.eclipse.net4j.util.om.OMLogger.Level;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.util.Map;
import java.util.Queue;
@@ -105,25 +105,25 @@ public abstract class AbstractOMPlatform implements OMPlatform
{
if (TRACER().isEnabled())
{
- TRACER().trace(ex);
+ TRACER().trace(this, ex);
}
}
}
}
- protected void trace(OMTracer tracer, Class context, String msg, Throwable t)
+ protected void trace(OMTracer tracer, Class context, Object instance, String msg, Throwable t)
{
for (OMTraceHandler traceHandler : traceHandlers)
{
try
{
- traceHandler.traced(tracer, context, msg, t);
+ traceHandler.traced(tracer, context, instance, msg, t);
}
catch (Exception ex)
{
if (TRACER().isEnabled())
{
- TRACER().trace(ex);
+ TRACER().trace(this, ex);
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java
index 6cb3e0a..bd43e09 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/bundle/OMTracerImpl.java
@@ -73,30 +73,55 @@ public class OMTracerImpl implements OMTracer
bundle.setDebugOption(fullName, enabled);
}
+ public void trace(Class context, Object instance, String msg, Throwable t)
+ {
+ ((AbstractOMPlatform)bundle.getPlatform()).trace(this, context, instance, msg, t);
+ }
+
+ public void trace(Class context, Object instance, String msg)
+ {
+ trace(context, instance, msg, (Throwable)null);
+ }
+
+ public void trace(Class context, Object instance, Throwable t)
+ {
+ trace(context, instance, t.getLocalizedMessage(), t);
+ }
+
+ public void trace(Class context, Object instance, String pattern, Object... args)
+ {
+ trace(context, instance, pattern, (Throwable)null, args);
+ }
+
+ public void trace(Class context, Object instance, String pattern, Throwable t, Object... args)
+ {
+ String msg = MessageFormat.format(pattern, args);
+ trace(context, instance, msg, t);
+ }
+
public void trace(Class context, String pattern, Object... args)
{
- trace(context, pattern, null, args);
+ trace(context, NO_INSTANCE, pattern, (Throwable)null, args);
}
public void trace(Class context, String pattern, Throwable t, Object... args)
{
- String msg = MessageFormat.format(pattern, args);
- trace(context, msg, t);
+ trace(context, NO_INSTANCE, pattern, t, args);
}
public void trace(Class context, String msg, Throwable t)
{
- ((AbstractOMPlatform)bundle.getPlatform()).trace(this, context, msg, t);
+ trace(context, NO_INSTANCE, msg, t);
}
public void trace(Class context, String msg)
{
- trace(context, msg, (Throwable)null);
+ trace(context, NO_INSTANCE, msg);
}
public void trace(Class context, Throwable t)
{
- trace(context, t.getLocalizedMessage(), t);
+ trace(context, NO_INSTANCE, t);
}
public OMTracer tracer(String name)
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
index f2873f4..1f04104 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/AbstractConnector.java
@@ -22,7 +22,7 @@ import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
import org.eclipse.net4j.util.lifecycle.LifecycleListener;
import org.eclipse.net4j.util.lifecycle.LifecycleNotifier;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -210,9 +210,9 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString()
- + ": Setting state " + newState + " (was " + oldState.toString().toLowerCase() //$NON-NLS-1$ //$NON-NLS-2$
- + ")"); //$NON-NLS-1$
+ TRACER.trace(this,
+ "Setting state " + newState + " (was " + oldState.toString().toLowerCase() //$NON-NLS-1$ //$NON-NLS-2$
+ + ")"); //$NON-NLS-1$
}
state = newState;
@@ -291,7 +291,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Waiting for connection..."); //$NON-NLS-1$
+ TRACER.trace(this, "Waiting for connection..."); //$NON-NLS-1$
}
return finishedNegotiating.await(timeout, TimeUnit.MILLISECONDS);
@@ -374,7 +374,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
Protocol protocol = createProtocol(protocolID, channel);
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Opening channel " + channelIndex //$NON-NLS-1$
+ TRACER.trace(this, "Opening channel " + channelIndex //$NON-NLS-1$
+ (protocol == null ? " without protocol" : " with protocol " + protocolID)); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -402,7 +402,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Invalid channelIndex " + channelIndex); //$NON-NLS-1$
+ TRACER.trace(this, "Invalid channelIndex " + channelIndex); //$NON-NLS-1$
}
return null;
@@ -461,7 +461,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
int channelIndex = channel.getChannelIndex();
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Removing channel " + channelIndex); //$NON-NLS-1$
+ TRACER.trace(this, "Removing channel " + channelIndex); //$NON-NLS-1$
}
channels.set(channelIndex, NULL_CHANNEL);
@@ -485,7 +485,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Unknown protocol " + protocolID); //$NON-NLS-1$
+ TRACER.trace(this, "Unknown protocol " + protocolID); //$NON-NLS-1$
}
return null;
@@ -565,12 +565,12 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
if (protocolFactoryRegistry == null && TRACER.isEnabled())
{
- TRACER.trace(toString() + ": No protocol factory registry!"); //$NON-NLS-1$
+ TRACER.trace(this, "No protocol factory registry!"); //$NON-NLS-1$
}
if (receiveExecutor == null && TRACER.isEnabled())
{
- TRACER.trace(toString() + ": No receive executor!"); //$NON-NLS-1$
+ TRACER.trace(this, "No receive executor!"); //$NON-NLS-1$
}
}
@@ -608,7 +608,7 @@ public abstract class AbstractConnector extends AbstractLifecycle implements Con
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": ID wrap around"); //$NON-NLS-1$
+ TRACER.trace(this, "ID wrap around"); //$NON-NLS-1$
}
nextConnectorID = MIN_CONNECTOR_ID;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferFactoryImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferFactoryImpl.java
index beac29a..b5926f4 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferFactoryImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferFactoryImpl.java
@@ -11,7 +11,7 @@
package org.eclipse.internal.net4j.transport;
import org.eclipse.net4j.transport.Buffer;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -34,7 +34,7 @@ public class BufferFactoryImpl extends BufferProviderImpl
BufferImpl buffer = new BufferImpl(this, getBufferCapacity());
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Created " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Created " + buffer); //$NON-NLS-1$
}
return buffer;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferImpl.java
index bfaed8e..ea86cc4 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferImpl.java
@@ -14,7 +14,7 @@ import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.transport.BufferProvider;
import org.eclipse.net4j.util.HexUtil;
import org.eclipse.net4j.util.ReflectUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -185,7 +185,7 @@ public class BufferImpl implements Buffer
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Read " + byteBuffer.limit() + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
+ TRACER.trace(this, "Read " + byteBuffer.limit() + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
+ (eos ? " (EOS)" : "") + NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -241,7 +241,7 @@ public class BufferImpl implements Buffer
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Writing " + (payloadSize - 1) + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
+ TRACER.trace(this, "Writing " + (payloadSize - 1) + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
+ (eos ? " (EOS)" : "") + NL + formatContent()); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferPoolImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferPoolImpl.java
index e7021bd..b3f1352 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferPoolImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/BufferPoolImpl.java
@@ -13,7 +13,7 @@ package org.eclipse.internal.net4j.transport;
import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.transport.BufferPool;
import org.eclipse.net4j.transport.BufferProvider;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -56,7 +56,7 @@ public class BufferPoolImpl extends BufferProviderImpl implements BufferPool,
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Evicting " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Evicting " + buffer); //$NON-NLS-1$
}
factory.retainBuffer(buffer);
@@ -95,7 +95,7 @@ public class BufferPoolImpl extends BufferProviderImpl implements BufferPool,
buffer.clear();
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Obtained " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Obtained " + buffer); //$NON-NLS-1$
}
return buffer;
@@ -111,7 +111,7 @@ public class BufferPoolImpl extends BufferProviderImpl implements BufferPool,
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Retaining " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Retaining " + buffer); //$NON-NLS-1$
}
queue.add(buffer);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/ChannelImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/ChannelImpl.java
index 42e6e78..e98c08e 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/ChannelImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/ChannelImpl.java
@@ -21,7 +21,7 @@ import org.eclipse.net4j.util.concurrent.AsynchronousWorkSerializer;
import org.eclipse.net4j.util.concurrent.SynchronousWorkSerializer;
import org.eclipse.net4j.util.concurrent.WorkSerializer;
import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
import org.eclipse.internal.net4j.transport.BufferImpl.State;
@@ -146,7 +146,7 @@ public class ChannelImpl extends AbstractLifecycle implements Channel, BufferPro
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Handling buffer from client: " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Handling buffer from client: " + buffer); //$NON-NLS-1$
}
sendQueue.add(buffer);
@@ -164,7 +164,7 @@ public class ChannelImpl extends AbstractLifecycle implements Channel, BufferPro
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Handling buffer from multiplexer: " + buffer); //$NON-NLS-1$
+ TRACER.trace(this, "Handling buffer from multiplexer: " + buffer); //$NON-NLS-1$
}
receiveSerializer.addWork(new Runnable()
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/AbstractTCPConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/AbstractTCPConnector.java
index 6df749f..76350c5 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/AbstractTCPConnector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/AbstractTCPConnector.java
@@ -18,7 +18,7 @@ import org.eclipse.net4j.transport.tcp.TCPSelector;
import org.eclipse.net4j.transport.tcp.TCPSelectorListener;
import org.eclipse.net4j.util.Net4jUtil;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
import org.eclipse.internal.net4j.transport.AbstractConnector;
@@ -159,7 +159,7 @@ public abstract class AbstractTCPConnector extends AbstractConnector implements
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Discarding buffer from unknown channel"); //$NON-NLS-1$
+ TRACER.trace(this, "Discarding buffer from unknown channel"); //$NON-NLS-1$
}
inputBuffer.release();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/ControlChannelImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/ControlChannelImpl.java
index 850dbcf..38bbe2d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/ControlChannelImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/ControlChannelImpl.java
@@ -13,7 +13,7 @@ package org.eclipse.internal.net4j.transport.tcp;
import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.util.concurrent.Synchronizer;
import org.eclipse.net4j.util.concurrent.SynchronizingCorrelator;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
import org.eclipse.internal.net4j.transport.BufferUtil;
@@ -149,7 +149,7 @@ public final class ControlChannelImpl extends ChannelImpl
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Invalid channel id: " + channelIndex); //$NON-NLS-1$
+ TRACER.trace(this, "Invalid channel id: " + channelIndex); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java
index b0ba67c..b283cbf 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPAcceptorImpl.java
@@ -23,7 +23,7 @@ import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
import org.eclipse.net4j.util.lifecycle.LifecycleListener;
import org.eclipse.net4j.util.lifecycle.LifecycleNotifier;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -249,7 +249,7 @@ public class TCPAcceptorImpl extends AbstractLifecycle implements TCPAcceptor, B
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Accepted connector " + connector); //$NON-NLS-1$
+ TRACER.trace(this, "Accepted connector " + connector); //$NON-NLS-1$
}
fireConnectorAccepted(connector);
@@ -301,12 +301,12 @@ public class TCPAcceptorImpl extends AbstractLifecycle implements TCPAcceptor, B
if (protocolFactoryRegistry == null && TRACER.isEnabled())
{
- TRACER.trace(toString() + ": No protocol factory registry!"); //$NON-NLS-1$
+ TRACER.trace(this, "No protocol factory registry!"); //$NON-NLS-1$
}
if (receiveExecutor == null && TRACER.isEnabled())
{
- TRACER.trace(toString() + ": No receive executor!"); //$NON-NLS-1$
+ TRACER.trace(this, "No receive executor!"); //$NON-NLS-1$
}
if (selector == null)
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPSelectorImpl.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPSelectorImpl.java
index 568083d..7c52c77 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPSelectorImpl.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPSelectorImpl.java
@@ -13,7 +13,7 @@ package org.eclipse.internal.net4j.transport.tcp;
import org.eclipse.net4j.transport.tcp.TCPSelector;
import org.eclipse.net4j.transport.tcp.TCPSelectorListener;
import org.eclipse.net4j.util.lifecycle.AbstractLifecycle;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -56,7 +56,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Registering " + TCPUtil.toString(channel)); //$NON-NLS-1$
+ TRACER.trace(this, "Registering " + TCPUtil.toString(channel)); //$NON-NLS-1$
}
return channel.register(selector, SelectionKey.OP_ACCEPT, listener);
@@ -72,7 +72,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Registering " + TCPUtil.toString(channel)); //$NON-NLS-1$
+ TRACER.trace(this, "Registering " + TCPUtil.toString(channel)); //$NON-NLS-1$
}
return channel.register(selector, SelectionKey.OP_CONNECT | SelectionKey.OP_READ, listener);
@@ -145,7 +145,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Accepting " + TCPUtil.toString(ssChannel)); //$NON-NLS-1$
+ TRACER.trace(this, "Accepting " + TCPUtil.toString(ssChannel)); //$NON-NLS-1$
}
listener.handleAccept(this, ssChannel);
@@ -160,7 +160,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Connecting " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
+ TRACER.trace(this, "Connecting " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
}
listener.handleConnect(this, sChannel);
@@ -170,7 +170,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Reading " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
+ TRACER.trace(this, "Reading " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
}
listener.handleRead(this, sChannel);
@@ -180,7 +180,7 @@ public class TCPSelectorImpl extends AbstractLifecycle implements TCPSelector, R
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Writing " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
+ TRACER.trace(this, "Writing " + TCPUtil.toString(sChannel)); //$NON-NLS-1$
}
listener.handleWrite(this, sChannel);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPUtil.java
index 74ec0be..3ad736a 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/tcp/TCPUtil.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.internal.net4j.transport.tcp;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -82,7 +82,7 @@ public final class TCPUtil
{
if (TRACER.isEnabled())
{
- TRACER.trace(selectionKey.channel().toString() + ": Setting interest " //$NON-NLS-1$
+ TRACER.trace(selectionKey, "Setting interest " //$NON-NLS-1$
+ formatInterestOps(newOps) + " (was " + formatInterestOps(oldOps).toLowerCase() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
index eea8b83..55c8505 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Indication.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.BufferOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -36,7 +36,7 @@ public abstract class Indication extends SignalReactor
{
if (TRACER.isEnabled())
{
- TRACER.trace("================ Indicating " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Indicating"); //$NON-NLS-1$
}
indicating(new ExtendedDataInputStream(in));
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
index ce38b9e..e217bb0 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithResponse.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.BufferOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -37,13 +37,13 @@ public abstract class IndicationWithResponse extends SignalReactor
{
if (TRACER.isEnabled())
{
- TRACER.trace("================ Indicating " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Indicating"); //$NON-NLS-1$
}
indicating(new ExtendedDataInputStream(in));
if (TRACER.isEnabled())
{
- TRACER.trace("================ Responding " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Responding"); //$NON-NLS-1$
}
responding(new ExtendedDataOutputStream(out));
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
index 88b7441..5e55493 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Request.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.transport.Channel;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.BufferOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -37,7 +37,7 @@ public abstract class Request extends SignalActor
{
if (TRACER.isEnabled())
{
- TRACER.trace("================ Requesting " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Requesting"); //$NON-NLS-1$
}
requesting(new ExtendedDataOutputStream(out));
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
index 67cd9f6..8f4e6e4 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/RequestWithConfirmation.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.transport.Channel;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.BufferOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.stream.ExtendedDataInputStream;
import org.eclipse.net4j.util.stream.ExtendedDataOutputStream;
@@ -39,14 +39,14 @@ public abstract class RequestWithConfirmation<RESULT> extends SignalActor<RESULT
{
if (TRACER.isEnabled())
{
- TRACER.trace("================ Requesting " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Requesting"); //$NON-NLS-1$
}
requesting(new ExtendedDataOutputStream(out));
out.flush();
if (TRACER.isEnabled())
{
- TRACER.trace("================ Confirming " + this); //$NON-NLS-1$
+ TRACER.trace(this, "================ Confirming"); //$NON-NLS-1$
}
setResult(confirming(new ExtendedDataInputStream(in)));
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
index 0704374..4146d66 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.BufferOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -65,7 +65,7 @@ public abstract class Signal implements Runnable
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
finally
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
index 5c0252e..170f48a 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
@@ -15,7 +15,7 @@ import org.eclipse.net4j.transport.BufferProvider;
import org.eclipse.net4j.transport.Channel;
import org.eclipse.net4j.transport.util.BufferInputStream;
import org.eclipse.net4j.transport.util.ChannelOutputStream;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
import org.eclipse.internal.net4j.transport.AbstractProtocol;
@@ -41,6 +41,9 @@ public abstract class SignalProtocol extends AbstractProtocol
private static final ContextTracer TRACER = new ContextTracer(Net4j.DEBUG_SIGNAL,
SignalProtocol.class);
+ private static final ContextTracer STREAM_TRACER = new ContextTracer(Net4j.DEBUG_BUFFER_STREAM,
+ SignalOutputStream.class);
+
private ExecutorService executorService;
private Map<Integer, Signal> signals = new ConcurrentHashMap(0);
@@ -70,7 +73,7 @@ public abstract class SignalProtocol extends AbstractProtocol
int correlationID = byteBuffer.getInt();
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Received buffer for correlation " + correlationID); //$NON-NLS-1$
+ TRACER.trace(this, "Received buffer for correlation " + correlationID); //$NON-NLS-1$
}
Signal signal;
@@ -83,7 +86,7 @@ public abstract class SignalProtocol extends AbstractProtocol
short signalID = byteBuffer.getShort();
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Got signal id " + signalID); //$NON-NLS-1$
+ TRACER.trace(this, "Got signal id " + signalID); //$NON-NLS-1$
}
signal = createSignalReactor(signalID);
@@ -103,7 +106,7 @@ public abstract class SignalProtocol extends AbstractProtocol
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Discarding buffer"); //$NON-NLS-1$
+ TRACER.trace(this, "Discarding buffer"); //$NON-NLS-1$
}
buffer.release();
@@ -155,7 +158,7 @@ public abstract class SignalProtocol extends AbstractProtocol
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Correlation wrap around"); //$NON-NLS-1$
+ TRACER.trace(this, "Correlation wrap around"); //$NON-NLS-1$
}
nextCorrelationID = MIN_CORRELATION_ID;
@@ -210,9 +213,9 @@ public abstract class SignalProtocol extends AbstractProtocol
{
Buffer buffer = delegate.provideBuffer();
ByteBuffer byteBuffer = buffer.startPutting(getChannel().getChannelIndex());
- if (SignalProtocol.TRACER.isEnabled())
+ if (STREAM_TRACER.isEnabled())
{
- SignalProtocol.TRACER.trace("Providing buffer for correlation " + correlationID); //$NON-NLS-1$
+ STREAM_TRACER.trace(this, "Providing buffer for correlation " + correlationID); //$NON-NLS-1$
}
byteBuffer.putInt(correlationID);
@@ -220,8 +223,7 @@ public abstract class SignalProtocol extends AbstractProtocol
{
if (SignalProtocol.TRACER.isEnabled())
{
- SignalProtocol.TRACER.trace(SignalProtocol.this.toString()
- + ": Put signal id " + signalID); //$NON-NLS-1$
+ STREAM_TRACER.trace(this, "Put signal id " + signalID); //$NON-NLS-1$
}
byteBuffer.putShort(signalID);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferInputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferInputStream.java
index 0435510..36ab72a 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferInputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferInputStream.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.transport.util;
import org.eclipse.net4j.transport.Buffer;
import org.eclipse.net4j.transport.BufferHandler;
import org.eclipse.net4j.util.HexUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -71,7 +71,7 @@ public class BufferInputStream extends InputStream implements BufferHandler
final int result = b < 0 ? ~b : b;
if (TRACER.isEnabled())
{
- TRACER.trace("<-- " + HexUtil.toHex(result) //$NON-NLS-1$
+ TRACER.trace(this, "<-- " + HexUtil.toHex(result) //$NON-NLS-1$
+ (result >= 32 ? " " + Character.toString((char)result) : "")); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferOutputStream.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferOutputStream.java
index 9beebff..bbe5bad 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferOutputStream.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/util/BufferOutputStream.java
@@ -15,7 +15,7 @@ import org.eclipse.net4j.transport.BufferHandler;
import org.eclipse.net4j.transport.BufferProvider;
import org.eclipse.net4j.util.HexUtil;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -70,7 +70,7 @@ public class BufferOutputStream extends OutputStream
ensureBuffer();
if (TRACER.isEnabled())
{
- TRACER.trace("--> " + HexUtil.toHex(b) //$NON-NLS-1$
+ TRACER.trace(this, "--> " + HexUtil.toHex(b) //$NON-NLS-1$
+ (b >= 32 ? " " + Character.toString((char)b) : "")); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/ReflectUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/ReflectUtil.java
index b4fa20a..ad33239 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/ReflectUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/ReflectUtil.java
@@ -72,11 +72,21 @@ public final class ReflectUtil
public static String getPackageName(Class<? extends Object> c)
{
+ if (c == null)
+ {
+ return null;
+ }
+
return getPackageName(c.getName());
}
public static String getPackageName(String className)
{
+ if (className == null)
+ {
+ return null;
+ }
+
int lastDot = className.lastIndexOf('.');
if (lastDot != -1)
{
@@ -88,11 +98,21 @@ public final class ReflectUtil
public static String getSimpleName(Class<? extends Object> c)
{
+ if (c == null)
+ {
+ return null;
+ }
+
return getSimpleClassName(c.getName());
}
public static String getSimpleClassName(String name)
{
+ if (name == null)
+ {
+ return null;
+ }
+
int lastDot = name.lastIndexOf('.');
if (lastDot != -1)
{
@@ -104,11 +124,21 @@ public final class ReflectUtil
public static String getSimpleClassName(Object object)
{
+ if (object == null)
+ {
+ return null;
+ }
+
return getSimpleName(object.getClass());
}
public static String getLabel(Object object)
{
+ if (object == null)
+ {
+ return null;
+ }
+
return getSimpleClassName(object) + "@" + getID(object); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/concurrent/AsynchronousWorkSerializer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/concurrent/AsynchronousWorkSerializer.java
index 847de1d..f37b208 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/concurrent/AsynchronousWorkSerializer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/concurrent/AsynchronousWorkSerializer.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.util.concurrent;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -67,7 +67,7 @@ public class AsynchronousWorkSerializer implements WorkSerializer, Runnable
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Notifying executor service"); //$NON-NLS-1$
+ TRACER.trace(this, "Notifying executor service"); //$NON-NLS-1$
}
executorService.execute(this);
@@ -94,7 +94,7 @@ public class AsynchronousWorkSerializer implements WorkSerializer, Runnable
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/AbstractLifecycle.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/AbstractLifecycle.java
index 2c4a988..d9b5660 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/AbstractLifecycle.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/AbstractLifecycle.java
@@ -11,7 +11,7 @@
package org.eclipse.net4j.util.lifecycle;
import org.eclipse.net4j.util.ReflectUtil;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -58,14 +58,14 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Activating");//$NON-NLS-1$
+ TRACER.trace(this, "Activating");//$NON-NLS-1$
}
onAboutToActivate();
fireLifecycleAboutToActivate();
if (DUMPER.isEnabled())
{
- DUMPER.trace("DUMP " + ReflectUtil.toString(this)); //$NON-NLS-1$
+ DUMPER.trace(this, "DUMP " + ReflectUtil.toString(this)); //$NON-NLS-1$
}
onActivate();
@@ -81,7 +81,7 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(toString() + ": Deactivating");//$NON-NLS-1$
+ TRACER.trace(this, "Deactivating");//$NON-NLS-1$
}
fireLifecycleDeactivating();
@@ -94,7 +94,7 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
return ex;
@@ -138,7 +138,7 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
@@ -156,7 +156,7 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
@@ -174,7 +174,7 @@ public abstract class AbstractLifecycle implements Lifecycle, LifecycleNotifier
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
index 8473506..2cae5bd 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.util.lifecycle;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTraceHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTraceHandler.java
index c5c5517..bb69330 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTraceHandler.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTraceHandler.java
@@ -15,5 +15,5 @@ package org.eclipse.net4j.util.om;
*/
public interface OMTraceHandler
{
- public void traced(OMTracer tracer, Class context, String msg, Throwable t);
+ public void traced(OMTracer tracer, Class context, Object instance, String msg, Throwable t);
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTracer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTracer.java
index 800c8ad..bd6ddb4 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTracer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OMTracer.java
@@ -15,6 +15,8 @@ package org.eclipse.net4j.util.om;
*/
public interface OMTracer
{
+ public static final Object NO_INSTANCE = null;
+
public OMBundle getBundle();
public OMTracer getParent();
@@ -27,6 +29,16 @@ public interface OMTracer
public void setEnabled(boolean enabled);
+ public void trace(Class context, Object instance, String pattern, Object... args);
+
+ public void trace(Class context, Object instance, String pattern, Throwable t, Object... args);
+
+ public void trace(Class context, Object instance, String msg, Throwable t);
+
+ public void trace(Class context, Object instance, String msg);
+
+ public void trace(Class context, Object instance, Throwable t);
+
public void trace(Class context, String pattern, Object... args);
public void trace(Class context, String pattern, Throwable t, Object... args);
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/EclipseLoggingBridge.java
index d662a28..a2c479f 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/EclipseLoggingBridge.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/EclipseLoggingBridge.java
@@ -8,9 +8,12 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om;
+package org.eclipse.net4j.util.om.log;
+import org.eclipse.net4j.util.om.OMLogHandler;
+import org.eclipse.net4j.util.om.OMLogger;
import org.eclipse.net4j.util.om.OMLogger.Level;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
@@ -45,7 +48,7 @@ public class EclipseLoggingBridge implements OMLogHandler
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/OSGiLoggingBridge.java
index 9c51652..fcd09a3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/OSGiLoggingBridge.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/OSGiLoggingBridge.java
@@ -8,9 +8,12 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om;
+package org.eclipse.net4j.util.om.log;
+import org.eclipse.net4j.util.om.OMLogHandler;
+import org.eclipse.net4j.util.om.OMLogger;
import org.eclipse.net4j.util.om.OMLogger.Level;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.internal.net4j.bundle.Net4j;
import org.eclipse.internal.net4j.bundle.OSGiBundle;
@@ -44,7 +47,7 @@ public class OSGiLoggingBridge implements OMLogHandler
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/PrintLogHandler.java
index bb949be..6de0136 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamLogHandler.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/log/PrintLogHandler.java
@@ -8,9 +8,11 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om;
+package org.eclipse.net4j.util.om.log;
import org.eclipse.net4j.util.IOUtil;
+import org.eclipse.net4j.util.om.OMLogHandler;
+import org.eclipse.net4j.util.om.OMLogger;
import org.eclipse.net4j.util.om.OMLogger.Level;
import java.io.PrintStream;
@@ -18,21 +20,21 @@ import java.io.PrintStream;
/**
* @author Eike Stepper
*/
-public class PrintStreamLogHandler implements OMLogHandler
+public class PrintLogHandler implements OMLogHandler
{
- public static final PrintStreamLogHandler CONSOLE = new PrintStreamLogHandler();
+ public static final PrintLogHandler CONSOLE = new PrintLogHandler();
private PrintStream out;
private PrintStream err;
- public PrintStreamLogHandler(PrintStream out, PrintStream err)
+ public PrintLogHandler(PrintStream out, PrintStream err)
{
this.out = out;
this.err = err;
}
- protected PrintStreamLogHandler()
+ protected PrintLogHandler()
{
this(IOUtil.OUT(), IOUtil.ERR());
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/ContextTracer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/ContextTracer.java
new file mode 100644
index 0000000..fa627b4
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/ContextTracer.java
@@ -0,0 +1,110 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.om.trace;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMTracer;
+
+/**
+ * @author Eike Stepper
+ */
+public class ContextTracer
+{
+ private OMTracer delegate;
+
+ private Class context;
+
+ public ContextTracer(OMTracer delegate, Class context)
+ {
+ this.delegate = delegate;
+ this.context = context;
+ }
+
+ public OMBundle getBundle()
+ {
+ return delegate.getBundle();
+ }
+
+ public String getFullName()
+ {
+ return delegate.getFullName();
+ }
+
+ public String getName()
+ {
+ return delegate.getName();
+ }
+
+ public OMTracer getParent()
+ {
+ return delegate.getParent();
+ }
+
+ public boolean isEnabled()
+ {
+ return delegate.isEnabled();
+ }
+
+ public void setEnabled(boolean enabled)
+ {
+ delegate.setEnabled(enabled);
+ }
+
+ public void trace(Object instance, String pattern, Object... args)
+ {
+ delegate.trace(context, instance, pattern, args);
+ }
+
+ public void trace(Object instance, String pattern, Throwable t, Object... args)
+ {
+ delegate.trace(context, instance, pattern, t, args);
+ }
+
+ public void trace(Object instance, String msg, Throwable t)
+ {
+ delegate.trace(context, instance, msg, t);
+ }
+
+ public void trace(Object instance, String msg)
+ {
+ delegate.trace(context, instance, msg);
+ }
+
+ public void trace(Object instance, Throwable t)
+ {
+ delegate.trace(context, instance, t);
+ }
+
+ public void trace(String pattern, Object... args)
+ {
+ delegate.trace(context, pattern, args);
+ }
+
+ public void trace(String pattern, Throwable t, Object... args)
+ {
+ delegate.trace(context, pattern, t, args);
+ }
+
+ public void trace(String msg, Throwable t)
+ {
+ delegate.trace(context, msg, t);
+ }
+
+ public void trace(String msg)
+ {
+ delegate.trace(context, msg);
+ }
+
+ public void trace(Throwable t)
+ {
+ delegate.trace(context, t);
+ }
+}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/ContextTracer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/InstanceTracer.java
index e0df7dc..3d53b80 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/ContextTracer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/InstanceTracer.java
@@ -8,21 +8,27 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om;
+package org.eclipse.net4j.util.om.trace;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMTracer;
/**
* @author Eike Stepper
*/
-public class ContextTracer
+public class InstanceTracer
{
private OMTracer delegate;
private Class context;
- public ContextTracer(OMTracer delegate, Class context)
+ private Object instance;
+
+ public InstanceTracer(OMTracer delegate, Class context, Object instance)
{
this.delegate = delegate;
this.context = context;
+ this.instance = instance;
}
public OMBundle getBundle()
@@ -55,18 +61,28 @@ public class ContextTracer
delegate.setEnabled(enabled);
}
+ public void trace(String pattern, Object... args)
+ {
+ delegate.trace(context, instance, pattern, args);
+ }
+
+ public void trace(String pattern, Throwable t, Object... args)
+ {
+ delegate.trace(context, instance, pattern, t, args);
+ }
+
public void trace(String msg, Throwable t)
{
- delegate.trace(context, msg, t);
+ delegate.trace(context, instance, msg, t);
}
public void trace(String msg)
{
- delegate.trace(context, msg);
+ delegate.trace(context, instance, msg);
}
public void trace(Throwable t)
{
- delegate.trace(context, t);
+ delegate.trace(context, instance, t);
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/PrintTraceHandler.java
index acb0bb5..ea0feac 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/PrintStreamTraceHandler.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/PrintTraceHandler.java
@@ -8,32 +8,34 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om;
+package org.eclipse.net4j.util.om.trace;
import org.eclipse.net4j.util.IOUtil;
+import org.eclipse.net4j.util.om.OMTraceHandler;
+import org.eclipse.net4j.util.om.OMTracer;
import java.io.PrintStream;
/**
* @author Eike Stepper
*/
-public class PrintStreamTraceHandler implements OMTraceHandler
+public class PrintTraceHandler implements OMTraceHandler
{
- public static final PrintStreamTraceHandler CONSOLE = new PrintStreamTraceHandler();
+ public static final PrintTraceHandler CONSOLE = new PrintTraceHandler();
private PrintStream stream;
- public PrintStreamTraceHandler(PrintStream stream)
+ public PrintTraceHandler(PrintStream stream)
{
this.stream = stream;
}
- protected PrintStreamTraceHandler()
+ protected PrintTraceHandler()
{
this(IOUtil.OUT());
}
- public void traced(OMTracer tracer, Class context, String msg, Throwable t)
+ public void traced(OMTracer tracer, Class context, Object instance, String msg, Throwable t)
{
stream.println("[TRACE] " + msg); //$NON-NLS-1$
if (t != null)
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceHandler.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceHandler.java
new file mode 100644
index 0000000..06617ed
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceHandler.java
@@ -0,0 +1,158 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.om.trace;
+
+import org.eclipse.net4j.util.IOUtil;
+import org.eclipse.net4j.util.ReflectUtil;
+import org.eclipse.net4j.util.om.OMTraceHandler;
+import org.eclipse.net4j.util.om.OMTracer;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.UUID;
+
+/**
+ * @author Eike Stepper
+ */
+public class RemoteTraceHandler implements OMTraceHandler
+{
+ public static final String DEFAULT_HOST = "localhost"; //$NON-NLS-1$
+
+ public static final int DEFAULT_PORT = RemoteTraceServer.DEFAULT_PORT;
+
+ private static int uniqueCounter;
+
+ private String agentID;
+
+ private String host;
+
+ private int port;
+
+ private Socket socket;
+
+ public RemoteTraceHandler() throws IOException
+ {
+ this(uniqueAgentID());
+ }
+
+ public RemoteTraceHandler(String agentID) throws IOException
+ {
+ this(agentID, DEFAULT_HOST);
+ }
+
+ public RemoteTraceHandler(String agentID, String host) throws IOException
+ {
+ this(agentID, host, DEFAULT_PORT);
+ }
+
+ public RemoteTraceHandler(String agentID, String host, int port) throws IOException
+ {
+ this.agentID = agentID;
+ this.host = host;
+ this.port = port;
+ socket = connect();
+ }
+
+ public Exception close()
+ {
+ try
+ {
+ socket.close();
+ return null;
+ }
+ catch (IOException ex)
+ {
+ return ex;
+ }
+ }
+
+ public void traced(OMTracer tracer, Class context, Object instance, String msg, Throwable t)
+ {
+ try
+ {
+ OutputStream outputStream = socket.getOutputStream();
+ DataOutputStream out = new DataOutputStream(outputStream);
+
+ writeUTF(out, agentID);
+ writeUTF(out, tracer.getBundle().getBundleID());
+ writeUTF(out, tracer.getFullName());
+ writeUTF(out, context);
+ writeUTF(out, ReflectUtil.getLabel(instance));
+ writeUTF(out, msg);
+ if (t == null)
+ {
+ out.writeBoolean(false);
+ }
+ else
+ {
+ out.writeBoolean(true);
+ String message = t.getMessage();
+ writeUTF(out, message);
+
+ StackTraceElement[] stackTrace = t.getStackTrace();
+ int size = stackTrace == null ? 0 : stackTrace.length;
+ out.writeInt(size);
+
+ for (int i = 0; i < size; i++)
+ {
+ StackTraceElement element = stackTrace[i];
+ writeUTF(out, element.getClassName());
+ writeUTF(out, element.getMethodName());
+ writeUTF(out, element.getFileName());
+ out.writeInt(element.getLineNumber());
+ }
+ }
+
+ out.flush();
+ }
+ catch (IOException ex)
+ {
+ IOUtil.print(ex);
+ }
+ }
+
+ protected Socket connect() throws IOException
+ {
+ return new Socket(host, port);
+ }
+
+ protected void writeUTF(DataOutputStream out, String str) throws IOException
+ {
+ out.writeUTF(str == null ? "" : str);
+ }
+
+ private void writeUTF(DataOutputStream out, Object object) throws IOException
+ {
+ writeUTF(out, object == null ? "" : object.toString());
+ }
+
+ private void writeUTF(DataOutputStream out, Class clazz) throws IOException
+ {
+ writeUTF(out, clazz == null ? "" : clazz.getName());
+ }
+
+ public static String uniqueAgentID()
+ {
+ try
+ {
+ InetAddress localMachine = InetAddress.getLocalHost();
+ return localMachine.getHostName() + "#" + (++uniqueCounter);
+ }
+ catch (Exception ex)
+ {
+ UUID uuid = UUID.randomUUID();
+ return uuid.toString();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceServer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceServer.java
new file mode 100644
index 0000000..2d0633f
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/om/trace/RemoteTraceServer.java
@@ -0,0 +1,344 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.om.trace;
+
+import org.eclipse.net4j.util.IOUtil;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.EventObject;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * @author Eike Stepper
+ */
+public class RemoteTraceServer
+{
+ public static final String DEFAULT_ADDRESS = "0.0.0.0"; //$NON-NLS-1$
+
+ public static final int DEFAULT_PORT = 2037;
+
+ public static final int ANY_PORT = 0;
+
+ private int port;
+
+ private String address;
+
+ private ServerSocket serverSocket;
+
+ private Queue<Listener> listeners = new ConcurrentLinkedQueue();
+
+ public RemoteTraceServer() throws IOException
+ {
+ this(DEFAULT_PORT);
+ }
+
+ public RemoteTraceServer(int port) throws IOException
+ {
+ this(port, DEFAULT_ADDRESS);
+ }
+
+ public RemoteTraceServer(int port, String address) throws IOException
+ {
+ this.port = port;
+ this.address = address;
+ serverSocket = bind();
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ handleConnections();
+ }
+ }.start();
+ }
+
+ public void addListener(Listener listener)
+ {
+ if (!listeners.contains(listener))
+ {
+ listeners.add(listener);
+ }
+ }
+
+ public void removeListener(Listener listener)
+ {
+ listeners.remove(listener);
+ }
+
+ public Exception close()
+ {
+ try
+ {
+ serverSocket.close();
+ return null;
+ }
+ catch (IOException ex)
+ {
+ return ex;
+ }
+ }
+
+ protected ServerSocket bind() throws IOException
+ {
+ InetAddress addr = InetAddress.getByName(this.address);
+ return new ServerSocket(port, 5, addr);
+ }
+
+ protected void handleConnections()
+ {
+ for (;;)
+ {
+ try
+ {
+ final Socket socket = serverSocket.accept();
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ handleSession(socket);
+ }
+ }.start();
+ }
+ catch (IOException ex)
+ {
+ IOUtil.print(ex);
+ }
+ }
+ }
+
+ protected void handleSession(Socket socket)
+ {
+ try
+ {
+ InputStream inputStream = socket.getInputStream();
+ DataInputStream in = new DataInputStream(inputStream);
+
+ for (;;)
+ {
+ handleTrace(in);
+ }
+ }
+ catch (IOException ex)
+ {
+ IOUtil.print(ex);
+ }
+ }
+
+ protected void handleTrace(DataInputStream in) throws IOException
+ {
+ Event event = new Event(this);
+ event.agentID = in.readUTF();
+ event.bundleID = in.readUTF();
+ event.tracerName = in.readUTF();
+ event.context = in.readUTF();
+ event.instance = in.readUTF();
+ event.msg = in.readUTF();
+ if (in.readBoolean())
+ {
+ event.throwable = in.readUTF();
+ int size = in.readInt();
+ event.stackTrace = new StackTraceElement[size];
+ for (int i = 0; i < size; i++)
+ {
+ String className = in.readUTF();
+ String methodName = in.readUTF();
+ String fileName = in.readUTF();
+ int lineNumber = in.readInt();
+ event.stackTrace[i] = new StackTraceElement(className, methodName, fileName, lineNumber);
+ }
+ }
+
+ fireEvent(event);
+ }
+
+ protected void fireEvent(Event event)
+ {
+ for (Listener listener : listeners)
+ {
+ try
+ {
+ listener.notifyRemoteTrace(event);
+ }
+ catch (RuntimeException ex)
+ {
+ IOUtil.print(ex);
+ }
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public class Event extends EventObject
+ {
+ private static final long serialVersionUID = 1L;
+
+ String agentID;
+
+ String bundleID;
+
+ String tracerName;
+
+ String context;
+
+ String instance;
+
+ String msg;
+
+ String throwable;
+
+ StackTraceElement[] stackTrace;
+
+ Event(RemoteTraceServer source)
+ {
+ super(source);
+ }
+
+ public RemoteTraceServer getRemoteTraceServer()
+ {
+ return (RemoteTraceServer)source;
+ }
+
+ public String getAgentID()
+ {
+ return agentID;
+ }
+
+ public String getBundleID()
+ {
+ return bundleID;
+ }
+
+ public String getContext()
+ {
+ return context;
+ }
+
+ public String getInstance()
+ {
+ return instance;
+ }
+
+ public String getMsg()
+ {
+ return msg;
+ }
+
+ public StackTraceElement[] getStackTrace()
+ {
+ return stackTrace;
+ }
+
+ public String getThrowable()
+ {
+ return throwable;
+ }
+
+ public String getTracerName()
+ {
+ return tracerName;
+ }
+
+ @Override
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("TraceEvent[agentID=");
+ builder.append(agentID);
+
+ builder.append(", bundleID=");
+ builder.append(bundleID);
+
+ builder.append(", tracerName=");
+ builder.append(tracerName);
+
+ builder.append(", context=");
+ builder.append(context);
+
+ builder.append(", instance=");
+ builder.append(instance);
+
+ builder.append(", msg=");
+ builder.append(msg);
+
+ builder.append(", throwable=");
+ builder.append(throwable);
+
+ builder.append(", stackTrace=");
+ builder.append(stackTrace);
+
+ builder.append("]");
+ return builder.toString();
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface Listener
+ {
+ public void notifyRemoteTrace(Event event);
+ }
+
+ public static class PrintListener implements Listener
+ {
+ public static final PrintListener CONSOLE = new PrintListener();
+
+ private PrintStream stream;
+
+ public PrintListener(PrintStream stream)
+ {
+ this.stream = stream;
+ }
+
+ protected PrintListener()
+ {
+ this(IOUtil.OUT());
+ }
+
+ public void notifyRemoteTrace(Event event)
+ {
+ stream.println("[TRACE] " + event.getAgentID());
+ stream.println(event.getBundleID());
+ stream.println(event.getTracerName());
+ stream.println(event.getContext());
+ stream.println(event.getInstance());
+ stream.println(event.getMsg());
+
+ String throwable = event.getThrowable();
+ if (throwable != null && throwable.length() != 0)
+ {
+ stream.println(throwable);
+ }
+
+ StackTraceElement[] stackTrace = event.getStackTrace();
+ if (stackTrace != null)
+ for (StackTraceElement element : stackTrace)
+ {
+ stream.print(element.getClassName());
+ stream.print("." + element.getMethodName());
+ stream.print("(" + element.getFileName());
+ stream.print(":" + element.getLineNumber());
+ stream.println(")");
+ }
+
+ stream.println();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
index f67d10c..b212bd1 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/registry/AbstractRegistry.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.util.registry;
-import org.eclipse.net4j.util.om.ContextTracer;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.registry.IRegistry.Listener.EventType;
import org.eclipse.net4j.util.registry.IRegistryElement.Descriptor;
@@ -129,7 +129,7 @@ public abstract class AbstractRegistry<ID, E extends IRegistryElement<ID>> imple
{
if (TRACER.isEnabled())
{
- TRACER.trace(ex);
+ TRACER.trace(this, ex);
}
}
}