Skip to content

Commit

Permalink
Anticipate WFCORE-6894
Browse files Browse the repository at this point in the history
  • Loading branch information
pferraro committed Jul 17, 2024
1 parent 2475c08 commit 631398f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUCCESS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUSPEND_STATE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE;
import static org.jboss.as.server.suspend.SuspendController.State.RUNNING;

import java.util.List;

import org.jboss.as.controller.LocalModelControllerClient;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.server.suspend.SuspendController;
import org.jboss.dmr.ModelNode;

class ServerProbes {
Expand Down Expand Up @@ -125,7 +125,7 @@ public Outcome getOutcome() {
String value = result.asString();
ModelNode data = new ModelNode();
data.add(VALUE, value);
return new Outcome(RUNNING.toString().equals(value), data);
return new Outcome(SuspendController.State.RUNNING.toString().equals(value), data);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import org.jboss.as.server.suspend.ServerActivity;
import org.jboss.as.server.suspend.ServerActivityCallback;
import org.jboss.as.server.suspend.SuspendController.State;
import org.jboss.as.server.suspend.SuspendController;
import org.jboss.logging.Logger;
import org.jboss.modcluster.container.Connector;
import org.jboss.modcluster.container.ContainerEventHandler;
Expand Down Expand Up @@ -105,9 +105,9 @@ private Context createContext(String contextPath, Host host) {
private synchronized void onStart(Context context) {
ContainerEventHandler handler = this.configuration.getContainerEventHandler();

State state = this.configuration.getSuspendController().getState();
SuspendController.State state = this.configuration.getSuspendController().getState();

if (state == State.RUNNING) {
if (state == SuspendController.State.RUNNING) {
// Normal operation - trigger ENABLE-APP
handler.start(context);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ protected void addExtraServices(ServiceTarget target) {
try {
SSLContext sslContext = SSLContext.getDefault();

target.addService(ServiceName.parse(Capabilities.REF_SUSPEND_CONTROLLER)).setInstance(new SuspendController()).install();
ServiceBuilder<?> builder = target.addService();
builder.setInstance(Service.newInstance(builder.provides(ServiceName.parse(Capabilities.REF_SUSPEND_CONTROLLER)), new SuspendController())).install();
target.addService(Services.JBOSS_SERVICE_MODULE_LOADER).setInstance(new ServiceModuleLoader(null)).install();
target.addService(ContextNames.JAVA_CONTEXT_SERVICE_NAME).setInstance(new NamingStoreService()).install();
target.addService(ContextNames.JBOSS_CONTEXT_SERVICE_NAME).setInstance(new NamingStoreService()).install();
Expand Down

0 comments on commit 631398f

Please sign in to comment.