RESOLVED - bug 271378: UDC "Recording" bundle not starting with workbench
https://bugs.eclipse.org/bugs/show_bug.cgi?id=271378
diff --git a/plugins/org.eclipse.epp.usagedata.recording/plugin.xml b/plugins/org.eclipse.epp.usagedata.recording/plugin.xml
index b2ee1e4..6b93e04 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/plugin.xml
+++ b/plugins/org.eclipse.epp.usagedata.recording/plugin.xml
@@ -16,7 +16,7 @@
    </extension>
    <extension
          point="org.eclipse.ui.startup">
-      <startup></startup>
+      <startup
+            class="org.eclipse.epp.usagedata.internal.recording.Startup"></startup>
    </extension>
-
 </plugin>
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/Startup.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/Startup.java
new file mode 100644
index 0000000..7295995
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/Startup.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009 The Eclipse Foundation.
+ * 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:
+ *    The Eclipse Foundation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.epp.usagedata.internal.recording;
+
+import org.eclipse.ui.IStartup;
+
+public class Startup implements IStartup {
+	public void earlyStartup() {
+		// Nothing to do. Just want to make sure the bundle is running.
+	}
+}
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
index afb41c8..480a088 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
@@ -52,6 +52,15 @@
 		usageDataRecorder = new UsageDataRecorder();
 		usageDataRecorder.start();
 		
+		/*
+		 * Our relationship with the service is wrong. We have a very hard dependency on the
+		 * UsageDataService *class* so there really is no benefit to using an OSGi service here,
+		 * other than as a convenient way to avoid having a singleton (which is honourable enough).
+		 * Perhaps at some future point, we can leverage the EventAdmin service or something.
+		 * More immediately since we have a Bundle-Require dependency on the 
+		 * org.eclipse.epp.usagedata.capture bundle, we can be sure that the UsageDataService
+		 * has been created before we attempt to acquire it from the tracker.
+		 */
 		usageDataServiceTracker = new ServiceTracker(context, UsageDataService.class.getName(), null);
 		usageDataServiceTracker.open();