Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-05-04 03:11:24 -0400
committerGlyn Normington2011-05-04 03:11:24 -0400
commit6d0d41e010e1e1151797e7e29204b20ea5f58c4e (patch)
treeb956fe66316555050da1ca9bb57273997125a759 /org.eclipse.virgo.kernel.userregionfactory
parent423ef94c7e0882e9b5584010f0692e02b15cf479 (diff)
downloadorg.eclipse.virgo.kernel-6d0d41e010e1e1151797e7e29204b20ea5f58c4e.tar.gz
org.eclipse.virgo.kernel-6d0d41e010e1e1151797e7e29204b20ea5f58c4e.tar.xz
org.eclipse.virgo.kernel-6d0d41e010e1e1151797e7e29204b20ea5f58c4e.zip
bug 342719: take dump if a user region bundle fails to start
Diffstat (limited to 'org.eclipse.virgo.kernel.userregionfactory')
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
index 46d56cfd..59d5889e 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
+++ b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
@@ -32,6 +32,7 @@ import org.eclipse.virgo.kernel.osgi.region.Region;
import org.eclipse.virgo.kernel.osgi.region.RegionDigraph;
import org.eclipse.virgo.kernel.osgi.region.RegionFilter;
import org.eclipse.virgo.kernel.osgi.region.RegionFilterBuilder;
+import org.eclipse.virgo.medic.dump.DumpGenerator;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.osgi.launcher.parser.ArgumentParser;
import org.eclipse.virgo.osgi.launcher.parser.BundleEntry;
@@ -111,12 +112,15 @@ public final class Activator implements BundleActivator {
private final ServiceRegistrationTracker tracker = new ServiceRegistrationTracker();
+ private DumpGenerator dumpGenerator;
+
/**
* {@inheritDoc}
*/
@Override
public void start(BundleContext bundleContext) throws Exception {
this.bundleContext = bundleContext;
+ this.dumpGenerator = getPotentiallyDelayedService(bundleContext, DumpGenerator.class);
RegionDigraph regionDigraph = getPotentiallyDelayedService(bundleContext, RegionDigraph.class);
this.eventAdmin = getPotentiallyDelayedService(bundleContext, EventAdmin.class);
ConfigurationAdmin configAdmin = getPotentiallyDelayedService(bundleContext, ConfigurationAdmin.class);
@@ -338,6 +342,8 @@ public final class Activator implements BundleActivator {
try {
bundle.start();
} catch (BundleException e) {
+ // Take state dump for diagnosis of resolution failures
+ this.dumpGenerator.generateDump("User region bundle failed to start", e);
throw new BundleException("Failed to start bundle " + bundle.getSymbolicName() + " " + bundle.getVersion(), e);
}
}

Back to the top