in cdi-extender/src/main/java/org/apache/aries/cdi/container/internal/Activator.java [193:238]
protected Extension doCreateExtension(Bundle bundle) throws Exception {
if (!requiresCDIExtender(bundle)) {
return null;
}
ServiceTracker<ConfigurationAdmin, ConfigurationAdmin> caTracker = new ServiceTracker<>(
bundle.getBundleContext(), ConfigurationAdmin.class, null);
caTracker.open();
ServiceTracker<LoggerFactory, LoggerFactory> loggerTracker = new ServiceTracker<>(
bundle.getBundleContext(), LoggerFactory.class, null);
loggerTracker.open();
ContainerState containerState = new ContainerState(
bundle, _bundleContext.getBundle(), _ccrChangeCount, _promiseFactory, caTracker, _logs);
// the CDI bundle
return new CDIBundle(_ccr, containerState,
// handle extensions
new ExtensionPhase(containerState,
// listen for configurations of the container component
new ConfigurationListener.Builder(containerState).component(
// the container component
new ContainerComponent.Builder(containerState,
// when dependencies are satisfied activate the container
new ContainerActivator.Builder(containerState,
// when the active container bootstraps CDI
new ContainerBootstrap(
containerState, _containerTracker,
// when CDI is bootstrapping is complete and is up and running
// activate the configuration listeners for single and factory components
new ConfigurationListener.Builder(containerState),
new SingleComponent.Builder(containerState,
new SingleActivator.Builder(containerState)),
new FactoryComponent.Builder(containerState,
new FactoryActivator.Builder(containerState)),
_containerListeners
)
)
).build()
).build()
)
);
}