LOGGER.infoActivatingSubsystem();
final Activation activation = Activation.valueOf(OSGiRootResource.ACTIVATION.resolveModelAttribute(context, model).asString().toUpperCase(Locale.ENGLISH));
final ServiceTarget serviceTarget = context.getServiceTarget();
final InitialDeploymentTracker deploymentTracker = new InitialDeploymentTracker(context, verificationHandler);
final ModuleRegistrationTracker registrationTracker = new ModuleRegistrationTracker();
// Collect the subsystem extensions
final List<SubsystemExtension> extensions = new ArrayList<SubsystemExtension>();
final Iterator<SubsystemExtension> services = ServiceLoader.load(SubsystemExtension.class, getClass().getClassLoader()).iterator();
while(services.hasNext()) {
extensions.add(services.next());
}
context.addStep(new OperationStepHandler() {
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
newControllers.add(FrameworkBootstrapService.addService(serviceTarget, resource, deploymentTracker, extensions, verificationHandler));
newControllers.add(registrationTracker.install(serviceTarget, verificationHandler));
context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
}
}, OperationContext.Stage.RUNTIME);
context.addStep(new AbstractDeploymentChainStep() {