@Override public void initialize(ExtensionContext context) { boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); subsystem.registerSubsystemModel(new OSGiRootResource(registerRuntimeOnly)); subsystem.registerXMLElementWriter(OSGiSubsystemWriter.INSTANCE); if (context.isRegisterTransformers()) { registerTransformers1_0_0(subsystem); } }
@Override @SuppressWarnings("deprecation") public void initialize(ExtensionContext context) { boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION); subsystem.registerSubsystemModel(new OSGiRootResource(registerRuntimeOnly)); subsystem.registerXMLElementWriter(OSGiSubsystemWriter.INSTANCE); if (context.isRegisterTransformers()) { registerTransformers1_0_0(subsystem); } }