[jboss-jira] [JBoss JIRA] (WFCORE-533) Add blocking option to reload command for standalone server
Alexey Loubyansky (JIRA)
issues at jboss.org
Thu Feb 5 14:00:50 EST 2015
[ https://issues.jboss.org/browse/WFCORE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038079#comment-13038079 ]
Alexey Loubyansky commented on WFCORE-533:
------------------------------------------
reload handler impl relies upon CLIModelControllClient that implements the blocking logic, which explains the exception. We could come up with an interface for the blocking API and let people interested implement it or just build this functionality into the default ModelControllerClient impl.
But even if it was able to use any ModelControllerClient impl, it wouldn't be enough to solve your original problem. The body of the if is a CLI batch. reload command in the batch mode will translate to a simple :reload. And we are back.
So, for this to work, we need to:
1) stop treating the bodies of if-else (and try-catch-finally for consistency) as batches. Which will be easy to do with the latest revision of the control flow in CLI. This may break the existing scripts though.
2) do something about the ModelControllerClient impl.
> Add blocking option to reload command for standalone server
> -----------------------------------------------------------
>
> Key: WFCORE-533
> URL: https://issues.jboss.org/browse/WFCORE-533
> Project: WildFly Core
> Issue Type: Enhancement
> Components: CLI
> Reporter: Tomas Rohovsky
> Assignee: Alexey Loubyansky
>
> reload command is non-blocking which causes problems in CLI scripts. Let's take this as an example:
> {code}
> if (outcome == failed) of /subsystem=resource-adapters/resource-adapter=activemq-ra:read-resource
> /subsystem=resource-adapters/resource-adapter=activemq-ra:add(archive=activemq-ra.rar)
> :reload
> end-if
> {code}
> I use jboss-as-maven-plugin for its execution and sometimes I get: {{Command execution failed for command 'end-if'. if request failed: java.util.concurrent.ExecutionException: Operation failed: Channel closed}}
> This functionality has already been asked in WFLY-208, but for some reason it was implemented only for domain-related commands but not standalone-related (reload and shutdown).
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list