public synchronized void useBundles(List<FileReference> newFileReferences) {
        if (! readyForNewBundles)
            throw new IllegalStateException("Bundles must be committed or reverted before using new bundles.");

        obsoleteBundles = removeObsoleteReferences(newFileReferences);
        osgi.allowDuplicateBundles(obsoleteBundles.values());

        bundlesFromNewGeneration = installBundles(newFileReferences);
        BundleStarter.startBundles(activeBundles.values());

        if (obsoleteBundles.size() > 0 || newFileReferences.size() > 0) log.info(installedBundlesMessage());

        readyForNewBundles = false;
    }
Installs the given set of bundles and updates state for which bundles and file references
that are active or should be uninstalled in case of success or failure.
container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java