if (Debug.DEBUG && Debug.DEBUG_MONITOR_BUNDLES) { BundleWatcher bundleStats = framework.adaptor.getBundleStats();
if (Debug.DEBUG && Debug.MONITOR_ACTIVATION) { BundleWatcher bundleStats = framework.adaptor.getBundleWatcher();
	protected void startWorker(boolean persistent) throws BundleException {		if (framework.active) {			if ((state & (STARTING | ACTIVE)) != 0) {				return;			}			//STARTUP TIMING Start here			if (Debug.DEBUG && Debug.DEBUG_MONITOR_BUNDLES) {				BundleWatcher bundleStats = framework.adaptor.getBundleStats();				if (bundleStats != null)					bundleStats.startActivation(this);			}			try {				if (state == INSTALLED) {					framework.packageAdmin.resolveBundles();					if (state != RESOLVED) {						throw new BundleException(getResolutionFailureMessage());					}				}				if (Debug.DEBUG && Debug.DEBUG_GENERAL) {					Debug.println("Bundle: Active sl = " + framework.startLevelManager.getStartLevel() + "; Bundle " + getBundleId() + " sl = " + getStartLevel()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$				}				if (getStartLevel() <= framework.startLevelManager.getStartLevel()) {					state = STARTING;					context = createContext();					try {						context.start();						if (framework.active) {							state = ACTIVE;							if (Debug.DEBUG && Debug.DEBUG_GENERAL) {								Debug.println("->started " + this); //$NON-NLS-1$							}							framework.publishBundleEvent(BundleEvent.STARTED, this);						}					} catch (BundleException e) {						context.close();						context = null;						state = RESOLVED;						throw e;					}					if (state == UNINSTALLED) {						context.close();						context = null;						throw new BundleException(Msg.formatter.getString("BUNDLE_UNINSTALLED_EXCEPTION", getLocation())); //$NON-NLS-1$					}				}			} finally {				if (Debug.DEBUG && Debug.DEBUG_MONITOR_BUNDLES) {					BundleWatcher bundleStats = framework.adaptor.getBundleStats();					if (bundleStats != null)						bundleStats.endActivation(this);				}			}		}		if (persistent) {			setStatus(Constants.BUNDLE_STARTED, true);		}	}