if (Debug.DEBUG && MONITOR_BUNDLES) framework.adaptor.getBundleStats().endActivation(getGlobalName());
if (Debug.DEBUG && Debug.DEBUG_MONITOR_BUNDLES) { IBundleStats bundleStats = framework.adaptor.getBundleStats(); if (bundleStats != null) bundleStats.endActivation(getGlobalName()); }
	protected void startWorker(boolean persistent) throws BundleException	{		if (framework.active) {			if ((state & (STARTING | ACTIVE)) != 0) {				return;			}			//STARTUP TIMING Start here			if (Debug.DEBUG && MONITOR_BUNDLES)				framework.adaptor.getBundleStats().startActivation(getGlobalName());			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.startLevelImpl.getStartLevel() + "; Bundle " + id + " sl = " + this.startLevel);				}				if (this.startLevel <= framework.startLevelImpl.getStartLevel()) {					state = STARTING;					context = createContext();					try {						context.start();						if (framework.active) {							state = ACTIVE;							if (Debug.DEBUG && Debug.DEBUG_GENERAL) {								Debug.println("->started " + this);							}							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"));					}				}			} finally {				if (Debug.DEBUG && MONITOR_BUNDLES)					framework.adaptor.getBundleStats().endActivation(getGlobalName());			}		}        		if (persistent)		{			setStatus(Constants.BUNDLE_STARTED, true);		}	}