public static void traceStarted(ModulesRegistry registry, long bundleId, String bundleName, Loader loader) { traceState(registry, "started", bundleId, bundleName, loader); }
public void bundleChanged(final BundleEvent event) { switch (event.getType()) { case BundleEvent.RESOLVED: TracingUtilities.traceResolution(mr, event.getBundle().getBundleId(), event.getBundle().getSymbolicName(), new TracingUtilities.Loader() { @Override public Class loadClass(String type) throws ClassNotFoundException { return event.getBundle().loadClass(type); } }); break; case BundleEvent.STARTED: TracingUtilities.traceStarted(mr, event.getBundle().getBundleId(), event.getBundle().getSymbolicName(), new TracingUtilities.Loader() { @Override public Class loadClass(String type) throws ClassNotFoundException { return event.getBundle().loadClass(type); } }); break; } } });
public void start(BundleContext context) throws Exception { this.ctx = context; logger.entering("HK2Main", "start", new Object[]{context}); // ctx.addBundleListener(this); // used for debugging purpose OSGiFactoryImpl.initialize(ctx); ModulesRegistry mr = createModulesRegistry(); if (TracingUtilities.isEnabled()) registerBundleDumper(mr); ctx.registerService(Main.class.getName(), this, null); }
public static void traceState(ModulesRegistry registry, String state, long bundleId, String bundleName, Loader loader) { File out = new File(getLocation(), state + "-" + bundleId+".log"); Writer w = null; try {
public void bundleChanged(final BundleEvent event) { switch (event.getType()) { case BundleEvent.RESOLVED: TracingUtilities.traceResolution(mr, event.getBundle().getBundleId(), event.getBundle().getSymbolicName(), new TracingUtilities.Loader() { @Override public Class loadClass(String type) throws ClassNotFoundException { return event.getBundle().loadClass(type); } }); break; case BundleEvent.STARTED: TracingUtilities.traceStarted(mr, event.getBundle().getBundleId(), event.getBundle().getSymbolicName(), new TracingUtilities.Loader() { @Override public Class loadClass(String type) throws ClassNotFoundException { return event.getBundle().loadClass(type); } }); break; } } });
public void start(BundleContext context) throws Exception { this.ctx = context; logger.entering("HK2Main", "start", new Object[]{context}); // ctx.addBundleListener(this); // used for debugging purpose OSGiFactoryImpl.initialize(ctx); ModulesRegistry mr = createModulesRegistry(); if (TracingUtilities.isEnabled()) registerBundleDumper(mr); ctx.registerService(Main.class.getName(), this, null); }
public static void traceState(ModulesRegistry registry, String state, long bundleId, String bundleName, Loader loader) { File out = new File(getLocation(), state + "-" + bundleId+".log"); Writer w = null; try {
public static void traceStarted(ModulesRegistry registry, long bundleId, String bundleName, Loader loader) { traceState(registry, "started", bundleId, bundleName, loader); }
public static void traceResolution(ModulesRegistry registry, long bundleId, String bundleName, Loader loader) { traceState(registry, "resolved", bundleId, bundleName, loader); }
public static void traceResolution(ModulesRegistry registry, long bundleId, String bundleName, Loader loader) { traceState(registry, "resolved", bundleId, bundleName, loader); }