framework.listeners.frameworkError(ib, be);
framework.listeners.frameworkError(bi[bx], be);
	      public Object run() {		ArrayList startList = new ArrayList();		synchronized (framework.packages) {		  // NYI! Order bundles so that they are stopped in a smart order		  // Stop affected bundles and remove classloaders.		  for (Iterator i = affected.iterator(); i.hasNext();) {		    BundleImpl ib = (BundleImpl)i.next();		    synchronized (ib) {		      if ((ib.state & (Bundle.STARTING|Bundle.ACTIVE)) != 0) {			try {			  int ix = 0;			  if(Framework.R3_TESTCOMPLIANT) {			    // Make sure start list is in original bundle			    // start order by using insertion sort			    Iterator it = startList.iterator();			    while(it.hasNext()) {			      BundleImpl bi = (BundleImpl)it.next();			      if(ib.getBundleId() < bi.getBundleId()) {				break;			      }			      ix++;			    }			  }			  startList.add(ix,ib);			  ib.stop();			} catch(BundleException be) {			  framework.listeners.frameworkError(ib, be);			}		      }		    }		  }		  for (Iterator i = affected.iterator(); i.hasNext();) {		    BundleImpl ib = (BundleImpl)i.next();		    synchronized (ib) {		      switch (ib.state) {		      case Bundle.STARTING:		      case Bundle.ACTIVE:			try {			  ib.stop();			} catch(BundleException be) {			  framework.listeners.frameworkError(ib, be);			}		      case Bundle.STOPPING:		      case Bundle.RESOLVED:			ib.setStateInstalled();		      case Bundle.INSTALLED:		      case Bundle.UNINSTALLED:			break;		      }		      ib.purge();		    }		  }		  framework.bundles.startBundles(startList);                  framework.listeners.frameworkEvent(new FrameworkEvent(FrameworkEvent.PACKAGES_REFRESHED, this));		  return null;		}	      }