framework.publishBundleEvent(BundleEvent.UNRESOLVED, this);
	protected boolean unload() {		if (Debug.DEBUG && Debug.DEBUG_GENERAL) {			if ((state & (UNINSTALLED | INSTALLED | RESOLVED)) == 0) {				Debug.println("Bundle.unload called when state != UNINSTALLED | INSTALLED | RESOLVED: " + this); //$NON-NLS-1$				Debug.printStackTrace(new Exception("Stack trace")); //$NON-NLS-1$			}		}		boolean exporting = false;		if (framework.isActive()) {			if (state == RESOLVED) {				BundleLoaderProxy curProxy = getLoaderProxy();				exporting = curProxy.inUse();				if (exporting) {					// make sure the BundleLoader is created so it can					// be added to the removalPending list.					curProxy.getBundleLoader();					framework.packageAdmin.addRemovalPending(curProxy);				} else {					framework.packageAdmin.unexportResources(curProxy);					if (loader != null) {						loader.clear();						loader.close();					}					framework.bundles.unMarkDependancies(curProxy);				}				state = INSTALLED;				// publish UNRESOLVED event here				framework.publishBundleEvent(BundleEvent.UNRESOLVED, this);				loader = null;				proxy = null;				unresolveFragments();				fragments = null;				domain = null;			}		} else {			try {				this.bundledata.close();			} catch (IOException e) { // Do Nothing.			}		}		return (exporting);	}