[jboss-as7-dev] restart operation?

John Mazzitelli mazz at redhat.com
Mon Aug 27 13:35:45 EDT 2012


Doh! I did NOT see that. I'm an idiot. I looked for a "restart" operation - totally didn't occur to me to look for "shutdown" :-)

This looks like what I need.

Side note: the help description for that operation says it uses System.exit(0) (for example, look at the tooltip of the jboss-cli.sh --gui swing app). In the standalone.sh it shows that it really looks for exit code 10 (and, btw, had I bothered to look in here before I would have seen this and would have known the feature was somewhere :-)

   if [ "$JBOSS_STATUS" -eq 10 ]; then
      echo "Restarting JBoss..."
   else
      exit $JBOSS_STATUS
   fi

So, as a nitpick - that help description should not specifically mention exit code of 0, unless you also want to mention that "the exit code will be 10 if the restart option is selected" or something like that.

Thanks,
John Mazz

----- Original Message -----
> Did you see the :shutdown(restart=true) - which basically should do
> what
> you described.
> 
> On 08/27/2012 06:19 PM, John Mazzitelli wrote:
> > I have a question on the reload-required and restart-required
> > states.
> >
> > I see in the root resource, if you know you need to reload to pick
> > up config changes, you can invoke the reload op ("/:reload)").
> >
> > In the case of restart required, obviously the JVM needs to be
> > restarted.
> >
> > Has anyone given any thought of providing some sort of restart
> > operation on the root resource, like "/:restart", in which the AS7
> > will actually exit the VM with a specific exit code (say,
> > something odd like 155 or whatever - e.g. System.exit(155)) which
> > can then be interpreted by the parent process (standalone.sh) to
> > say "oh, the JVM exited, but the server wants me to restart it
> > immediately". So standalone.sh script could then turn around and
> > immediately restart the vm again.
> >
> > This would help things such as customized installers that want to
> > re-configure AS7 to run with a particular set of config settings
> > that are needed for a particular app to run but will not require
> > the user to perform manual restarting of the VM after the
> > installer does its thing (as is the case for what I'm doing with
> > RHQ/JON).
> > _______________________________________________
> > jboss-as7-dev mailing list
> > jboss-as7-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> >
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 


More information about the jboss-as7-dev mailing list