Skip to content

Commit

Permalink
Merge pull request wildfly#13923 from yersan/tasks/WFLY-14006
Browse files Browse the repository at this point in the history
[WFLY-14006] Deprecate the extensions where the root subsystem is alr…
  • Loading branch information
bstansberry committed Feb 18, 2021
2 parents dff8e4a + 4319a04 commit fcfe230
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public CmpExtension() {
@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(final ExtensionContext context) {

final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);

subsystemRegistration.registerXMLElementWriter(new CmpSubsystem11Parser());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class ConfigAdminExtension extends AbstractLegacyExtension {
static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME);

private static final ModelVersion MANAGEMENT_API_VERSION = ModelVersion.create(1, 1, 0);
static final ModelVersion DEPRECATED_SINCE = ModelVersion.create(1, 1, 0);

private static final String RESOURCE_NAME = ConfigAdminExtension.class.getPackage().getName() + ".LocalDescriptions";
public static final String EXTENSION_NAME = "org.jboss.as.configadmin";
Expand All @@ -69,7 +70,7 @@ public void initializeLegacyParsers(ExtensionParsingContext context) {
@Override
public Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {

final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_VERSION, true);
ManagementResourceRegistration subsystemRoot = subsystem.registerSubsystemModel(new ConfigAdminRootResource());

//no need to register transformers as whole extension was deprecated in EAP 6.1 and hasn't changed since, so 1.1.0 in 6.2+ is same as current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ConfigAdminRootResource extends SimpleResourceDefinition {

public ConfigAdminRootResource() {
super(ConfigAdminExtension.SUBSYSTEM_PATH, ConfigAdminExtension.getResourceDescriptionResolver(SUBSYSTEM), ConfigAdminAdd.INSTANCE, new ReloadRequiredRemoveStepHandler());
this.setDeprecated(ConfigAdminExtension.DEPRECATED_SINCE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
subsystem=The ConfigAdmin subsystem configuration.
subsystem.activate=Activate the ConfigAdmin subsystem.
subsystem.deprecated=The ConfigAdmin subsystem is deprecated and may be removed or moved in future versions.

subsystem.add=Add the ConfigAdmin subsystem configuration.
subsystem.remove=Remove the ConfigAdmin subsystem configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static ResourceDescriptionResolver getResourceDescriptionResolver(final String..

@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);
final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(JacORBSubsystemResource.INSTANCE);
subsystem.registerXMLElementWriter(PARSER);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
public class JAXRExtension extends AbstractLegacyExtension {

private static final ModelVersion CURRENT_MODEL_VERSION = ModelVersion.create(1, 2, 0);
static final ModelVersion DEPRECATED_SINCE = ModelVersion.create(1, 2, 0);
static final String SUBSYSTEM_NAME = "jaxr";
static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME);

Expand All @@ -64,7 +65,7 @@ public JAXRExtension() {

@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);

subsystemRegistration.registerXMLElementWriter(JAXRSubsystemWriter.INSTANCE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class JAXRSubsystemRootResource extends ModelOnlyResourceDefinition {
super(JAXRExtension.SUBSYSTEM_PATH,
JAXRExtension.getResolver(),
CONNECTION_FACTORY_ATTRIBUTE, CONNECTION_FACTORY_IMPL_ATTRIBUTE);
this.setDeprecated(JAXRExtension.DEPRECATED_SINCE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
jaxr=The configuration of the JAXR subsystem.
jaxr.add=Adds the JAXR subsystem.
jaxr.deprecated=The JAXR subsystem is deprecated and may be removed or moved in future versions.
jaxr.jndi-name=The JNDI name under which the JAXR ConnectionFactory is bound
jaxr.class=The JAXR ConnectionFactory implementation class
jaxr.remove=Removes the JAXR subsystem.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public MessagingExtension() {

@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);
subsystem.registerXMLElementWriter(MessagingXMLWriter.INSTANCE);

// Root resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static StandardResourceDescriptionResolver getResourceDescriptionResolver(final

@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);

final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(WebDefinition.INSTANCE);
subsystem.registerXMLElementWriter(new WebSubsystemParser());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static ResourceDescriptionResolver getResourceDescriptionResolver(final S

@Override
public void initialize(ExtensionContext context) {
SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);

subsystemRegistration.registerSubsystemModel(new FederationSubsystemRootResourceDefinition(context));
subsystemRegistration.registerXMLElementWriter(FederationSubsystemWriter.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static ResourceDescriptionResolver getResourceDescriptionResolver(final S

@Override
public void initialize(ExtensionContext context) {
SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);

subsystem.registerSubsystemModel(IDMSubsystemRootResourceDefinition.INSTANCE);
subsystem.registerXMLElementWriter(Namespace.CURRENT.getXMLWriter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void initialize(ExtensionContext context) {

final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();

final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(SecuritySubsystemRootResourceDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);

Expand Down
2 changes: 1 addition & 1 deletion xts/src/main/java/org/jboss/as/xts/XTSExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static StandardResourceDescriptionResolver getResourceDescriptionResolver(final

public void initialize(ExtensionContext context) {
XtsAsLogger.ROOT_LOGGER.debug("Initializing XTS Extension");
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION, true);
subsystem.registerSubsystemModel(new XTSSubsystemDefinition());
subsystem.registerXMLElementWriter(new XTSSubsystemParser());
}
Expand Down

0 comments on commit fcfe230

Please sign in to comment.