The console currently shuts down the server by calling
kernel.shutdown() followed by System.exit().  There is also some
dormant code that "reboots" the server by calling Daemon.main(new
String[0]) instead of System.exit().  However, that code is commented
out with the following remark:
// Removed until a better mechanism for rebooting the server is created

When I uncommented the reboot code and tried it out it seemed to have
the desired effect (restarting the kernel) although I don't know if
restarting the kernel alone is sufficient for your needs.  Also,
whoever commented it out obviously had a concern with using this
technique so your mileage may vary :-)

Best wishes,
Paul

On 3/31/06, Mario Rübsam <[EMAIL PROTECTED]> wrote:
> Aaron Mulder wrote:
> > If the restart code in the console does what you want, then you can
> > execute the same logic from a servlet.  The best way would be to
> > connect to the local server via JMX (which would require the
> > administrator username and password).  You could also connect directly
> > to the Geronimo kernel in the local JVM, though we're hoping to shift
> > our classloader structure to move the Geronimo stuff out of the
> > application classloader, so in a future release of Geronimo, you might
> > need to manually specify classloader dependencies to get this approach
> > to work.
> >
>
> I try to call the shutdown code like in the console. Is this the one
> connected with Geronimo kernel or is this the JMX based shutdown?
>
>
> Matt Hogstrom wrote:
>  > Another option would be to use Java Service Wrapper to monitor Geronimo
>  > and restart it when it shutdown.
>  >
>
> If the JSW has such an option to monitor this would be great, because
> this will resolve the problem of starting a new VM within a dying VM.
> Because a complete restart is needed if Geronimo is updated.
>
> Thanks,
> Mario
>

Reply via email to