Do you mean restart the VM or restart the Server inside the same VM?  The 
latter is possible with Server.shutdown(), then Server.start() should work in 
theory... though I have not tested this at all... could be that there is more 
work to be done here to make this work... though I am not sure that is really 
that useful, as there could still be threads running or other cl bloat and 
such.

To make this functional for a VM restart we would need the native scripts to 
handle this, which is possible for sure with /bin/sh, but as for batch I have 
no idea how much trouble it would be to do this...  I really hate batch.  
Batch sucks so much... it is so inconsitent across windows versions... dealth 
by fire and torture is more pallatable and pleasant than it's syntax.

--jason


On Saturday 01 June 2002 11:02 pm, Dain Sundstrom wrote:
> A lot of deployments need to write scripts to restart the server
> everyday to clean up resources captured by poorly written application
> code.  Also it would be nice for a management console to be able to
> restart the server.
>
> At this point my ideas for the testsuite are pure speculation.  I think
> it would be cool to be able to simulate a message queue fault, restart
> the server and recover the messages.  We could also use this technique
> to test the TX manager when we add recovery.
>
> -dain
>
> Jason Dillon wrote:
> > In theory this should work, you can call jboss.system:type=Server exit
> > <code> and the vm should exit and return <code> to the shell, though it
> > may take some time for this to happen depending on how quickly the
> > shutdown hook executes.
> >
> > Can you explain more of why this would be useful, to restart the server
> > that is, and perhaps I have help you descide on the best way to make it a
> > reality... instead of just theory.
> >
> > --jason
> >
> > Quoting Dain Sundstrom <[EMAIL PROTECTED]>:
> >>It would be useful to be able to restart the JBoss server while in our
> >>testsuite, but can we restart a JBoss server from an MBean?  I don't
> >>think we can, but I have an idea on how we can.  We use an MBean to
> >>shutdown the server using the normal hooks, but we make the server exit
> >>with a special exit code that tells our run.sh an run.bat startup
> >>scripts to restart the server.
> >>
> >>Jason, is this as simple as I have proposed?  Should we do it?
> >>
> >>-dain
> >>
> >>
> >>_______________________________________________________________
> >>
> >>Don't miss the 2002 Sprint PCS Application Developer's Conference
> >>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
> >>
> >>_______________________________________________
> >>Jboss-development mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > _______________________________________________________________
> >
> > Don't miss the 2002 Sprint PCS Application Developer's Conference
> > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to