-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFCORE-6753] Make ServerEnvironment.setStability() package protected
- Loading branch information
Showing
3 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
server/src/main/java/org/jboss/as/server/ServerEnvironmentAwareProcessReloadHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright The WildFly Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.jboss.as.server; | ||
|
||
import org.jboss.as.controller.ControlledProcessState; | ||
import org.jboss.as.controller.RunningModeControl; | ||
import org.jboss.as.controller.operations.common.ProcessReloadHandler; | ||
import org.jboss.as.version.Stability; | ||
import org.jboss.msc.service.ServiceName; | ||
|
||
public abstract class ServerEnvironmentAwareProcessReloadHandler extends ProcessReloadHandler<RunningModeControl> { | ||
protected final ServerEnvironment environment; | ||
|
||
public ServerEnvironmentAwareProcessReloadHandler(ServiceName rootService, RunningModeControl runningModeControl, ControlledProcessState processState, ServerEnvironment environment) { | ||
super(rootService, runningModeControl, processState); | ||
this.environment = environment; | ||
} | ||
|
||
protected void updateServerEnvironmentStability(Stability stability) { | ||
environment.setStability(stability); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
import org.jboss.as.controller.registry.ManagementResourceRegistration; | ||
import org.jboss.as.controller.persistence.ExtensibleConfigurationPersister; | ||
import org.jboss.as.server.ServerEnvironment; | ||
import org.jboss.as.server.ServerEnvironmentAwareProcessReloadHandler; | ||
import org.jboss.as.server.Services; | ||
import org.jboss.as.server.controller.descriptions.ServerDescriptions; | ||
import org.jboss.as.server.logging.ServerLogger; | ||
|
@@ -39,7 +40,7 @@ | |
* | ||
* @author <a href="[email protected]">Kabir Khan</a> | ||
*/ | ||
public class ServerProcessReloadHandler extends ProcessReloadHandler<RunningModeControl> { | ||
public class ServerProcessReloadHandler extends ServerEnvironmentAwareProcessReloadHandler { | ||
|
||
private static final AttributeDefinition USE_CURRENT_SERVER_CONFIG = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.USE_CURRENT_SERVER_CONFIG, ModelType.BOOLEAN, true) | ||
.setAlternatives(ModelDescriptionConstants.SERVER_CONFIG) | ||
|
@@ -84,14 +85,12 @@ public class ServerProcessReloadHandler extends ProcessReloadHandler<RunningMode | |
.build(); | ||
|
||
private final Set<String> additionalAttributes; | ||
private final ServerEnvironment environment; | ||
private ExtensibleConfigurationPersister extensibleConfigurationPersister; | ||
|
||
public ServerProcessReloadHandler(ServiceName rootService, RunningModeControl runningModeControl, | ||
ControlledProcessState processState, ServerEnvironment environment, Set<String> additionalAttributes, ExtensibleConfigurationPersister extensibleConfigurationPersister) { | ||
super(rootService, runningModeControl, processState); | ||
super(rootService, runningModeControl, processState, environment); | ||
this.additionalAttributes = additionalAttributes == null ? Collections.emptySet() : additionalAttributes; | ||
this.environment = environment; | ||
this.extensibleConfigurationPersister = extensibleConfigurationPersister; | ||
} | ||
|
||
|
@@ -178,7 +177,7 @@ public void doReload(RunningModeControl runningModeControl) { | |
runningModeControl.setNewBootFileName(serverConfig); | ||
runningModeControl.setSuspend(finalSuspend); | ||
if (stability != null) { | ||
environment.setStability(stability); | ||
updateServerEnvironmentStability(stability); | ||
} | ||
runningModeControl.setApplyConfigurationExtension(applyConfigurationExtension); | ||
} | ||
|