Class PluginContextFactory
java.lang.Object
com.xebialabs.xlrelease.osgi.spring.PluginContextFactory
Builds a plugin's child
AnnotationConfigApplicationContext from a PluginManifest
+ Bundle, parented to the curated PluginApiParentContext.-
Method Summary
Modifier and TypeMethodDescriptionstatic PluginRuntimebuild(org.osgi.framework.Bundle bundle, PluginManifest manifest, org.springframework.context.support.GenericApplicationContext parent)
-
Method Details
-
build
public static PluginRuntime build(org.osgi.framework.Bundle bundle, PluginManifest manifest, org.springframework.context.support.GenericApplicationContext parent) - Throws:
InvalidPluginManifestException- ifmanifest.pluginContextClassName()cannot be loaded from the bundle's own classloader - thrown before any context exists, so there is nothing to route throughPluginTeardownfor this failure.PluginContextBuildException- if the plugin's@Configurationclass fails to refresh, or extension-point registration itself fails - carries the partially-builtPluginRuntimeso the caller tears it down viaPluginTeardownexactly like a normal removal, instead of this method closing it internally.
-