public void execute(DeploymentSessionImpl session) throws DeploymentException {
   AbstractDeploymentPackage target = session.getTargetAbstractDeploymentPackage();
   BundleInfo[] bundleInfos = target.getOrderedBundleInfos();
   for (int i = 0; i < bundleInfos.length; i++) {
     if (isCancelled()) {
       throw new DeploymentException(DeploymentException.CODE_CANCELLED);
     }
     String symbolicName = bundleInfos[i].getSymbolicName();
     Bundle bundle = target.getBundle(symbolicName);
     if (bundle != null) {
       String stopUnaffectedBundle =
           session.getBundleContext().getProperty(DeploymentAdminImpl.STOP_UNAFFECTED_BUNDLE_PROP);
       if (stopUnaffectedBundle != null
           && stopUnaffectedBundle.equalsIgnoreCase("false")
           && omitBundleStop(session, symbolicName)) {
         continue;
       }
       addRollback(new StartBundleRunnable(bundle));
       try {
         bundle.stop();
       } catch (BundleException e) {
         session
             .getLog()
             .log(
                 LogService.LOG_WARNING,
                 "Could not stop bundle '" + bundle.getSymbolicName() + "'",
                 e);
       }
     } else {
       session
           .getLog()
           .log(
               LogService.LOG_WARNING,
               "Could not stop bundle '"
                   + symbolicName
                   + "' because it was not defined int he framework");
     }
   }
 }