[
https://issues.jboss.org/browse/AS7-5929?page=com.atlassian.jira.plugin.s...
]
Bartosz Baranowski commented on AS7-5929:
-----------------------------------------
[~brian.stansberry] Well, that will work. I got a bit stuck on this(since
Service.addListener is deprecated - this would simplify everything)
{noformat}
public Object setRestartRequired() {
//....
for (;;) {
State was = stateRef.get(receiver);
if (was == State.STARTING || was == State.STOPPING) {
break;
}
//...
}
return Integer.valueOf(newStamp);
};
{noformat}
Since 'was' is equal to "STARTING" cause the process is in this state
according to transition, change to ReloadHandler like:
{noformat}
//...
final State initialProcessState = processState.getState();
//...
if(initialProcessState == State.RESTART_REQUIRED)
service.addListener(new AbstractServiceListener<Object>() {
public void listenerAdded(final ServiceController<?> controller) {}
public void transition(final ServiceController<? extends Object>
controller, final ServiceController.Transition transition) {
if(transition == Transition.STARTING_to_UP){
controller.removeListener(this);
processState.setRestartRequired();
}
}
});
{noformat}
Does not work. If what you propse is fine, I can commit that. It looks a bit like hack to
me :)
:reload operation clears up the restart-required process-state
--------------------------------------------------------------
Key: AS7-5929
URL:
https://issues.jboss.org/browse/AS7-5929
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.3.Final (EAP)
Reporter: Jeff Mesnil
Assignee: Bartosz Baranowski
For the patching service, the patch command leaves the server in a restart-required
state
{noformat}
[standalone@localhost:9999 /] patch
/home/jmesnil/Developer/jboss-as/build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/patch.zip
{
"outcome" : "success",
"response-headers" : {
"operation-requires-restart" : true,
"process-state" : "restart-required"
}
}
{noformat}
If I try to change the AS7 configuration, the CLI warns me that a restart is required,
for example:
{noformat}
[standalone@localhost:9999 hornetq-server=default] ./queue=foo:add(queue-address=foo)
{
"outcome" => "success",
"response-headers" => {"process-state" =>
"restart-required"}
}
{noformat}
However, when I reload the server using the /:reload command, the process-state header is
cleared out:
{noformat}
[standalone@localhost:9999 hornetq-server=default] /:reload
{"outcome" => "success"}
[standalone@localhost:9999 hornetq-server=default] ./queue=bar:add(queue-address=bar)
{"outcome" => "success"}
{noformat}
This is not correct: until the server is restarted (not reloaded), the result of my patch
operation will not be taken into account (eg changing the AS7 module path).
Reloading the server should not clear its process-state if it is set to
"restart-required"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira