private ServerReloadHandler() {
}
/** {@inheritDoc} */
public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) throws OperationFailedException {
RuntimeOperationContext runtimeContext = context.getRuntimeContext();
if (runtimeContext != null) {
runtimeContext.setRuntimeTask(new RuntimeTask() {
public void execute(final RuntimeTaskContext context) throws OperationFailedException {
ServiceController<?> service = context.getServiceRegistry().getRequiredService(Services.JBOSS_AS);
service.addListener(new AbstractServiceListener<Object>() {
public void listenerAdded(final ServiceController<?> controller) {
controller.setMode(ServiceController.Mode.NEVER);