From 48d1bf3b52af0b4f85a90d5f8c15ca3eb8787553 Mon Sep 17 00:00:00 2001 From: Paul Ferraro Date: Wed, 20 Dec 2023 13:11:10 -0500 Subject: [PATCH] WFCORE-6650 Expose server stability and allow feature filtering from a DeploymentUnit. --- .../java/org/jboss/as/server/deployment/DeploymentUnit.java | 3 ++- .../org/jboss/as/server/deployment/DeploymentUnitImpl.java | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnit.java b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnit.java index b3c9f6e52ef..c54d396ab38 100644 --- a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnit.java +++ b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnit.java @@ -5,6 +5,7 @@ package org.jboss.as.server.deployment; +import org.jboss.as.controller.FeatureRegistry; import org.jboss.msc.service.ServiceName; import org.jboss.msc.service.ServiceRegistry; @@ -12,7 +13,7 @@ * The deployment unit. This object retains data which is persistent for the life of the * deployment. */ -public interface DeploymentUnit extends Attachable { +public interface DeploymentUnit extends Attachable, FeatureRegistry { /** * Get the service name of the root deployment unit service. diff --git a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitImpl.java b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitImpl.java index 4a183e9ca3f..b9960edf0e2 100644 --- a/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitImpl.java +++ b/server/src/main/java/org/jboss/as/server/deployment/DeploymentUnitImpl.java @@ -5,6 +5,7 @@ package org.jboss.as.server.deployment; +import org.jboss.as.version.Stability; import org.jboss.msc.service.ServiceName; import org.jboss.msc.service.ServiceRegistry; @@ -62,4 +63,9 @@ public String toString() { return String.format("deployment \"%s\"", name); } } + + @Override + public Stability getStability() { + return this.getAttachment(DeploymentResourceSupport.REGISTRATION_ATTACHMENT).getStability(); + } }