diff options
author | gjoranv <gv@verizonmedia.com> | 2020-07-17 14:50:58 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-07-17 14:50:58 +0200 |
commit | d15dd71dfcbe78ba2ca5a0332e256dd4f274bcb9 (patch) | |
tree | 81fd8b4ad9a9d04ed43cddb70aa6300e7e8ada15 | |
parent | 5627a766d1d34159ee126b4980dc817654bc7508 (diff) |
Temporarily allow 'config-model-fat-amended' to preinstall bundles
- The bundle (jdisc_http_filters) will not be started, but that
should be ok, as we don't use any classes from that bundle.
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java index 5236daf0302..4b728c166f4 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java @@ -107,10 +107,13 @@ public class ApplicationBundleLoader { log.info("Installing bundle with reference '" + reference.value() + "'"); List<Bundle> bundles = bundleInstaller.installBundles(reference, osgi); - // Throw if more than one bundle was installed, which means that the X-JDisc-Preinstall-Bundle header was used. - // However, if the OSGi framework is only a test framework, this rule does not apply. + // If more than one bundle was installed, and the OSGi framework is the real Felix one, + // it means that the X-JDisc-Preinstall-Bundle header was used. + // However, test osgi frameworks may return multiple bundles when installing a single bundle. if (bundles.size() > 1 && osgi.hasFelixFramework()) { - throw new RuntimeException("Bundle '" + bundles.get(0).getSymbolicName() + "' tried to pre-install other bundles."); + // TODO: remove if-statement below when the last model with preinstall has rolled out of hosted + if (! bundles.get(0).getSymbolicName().equals("config-model-fat-amended")) + throw new RuntimeException("Bundle '" + bundles.get(0).getSymbolicName() + "' tried to pre-install other bundles."); } reference2Bundle.put(reference, bundles.get(0)); } |