Generic Server External Launcher requierements [message #228532] |
Mon, 02 March 2009 15:33 |
Anders Olsson Messages: 21 Registered: July 2009 |
Junior Member |
|
|
Hi,
I wonder what is required for a external launcher defined in a ServerDef
for JST/WST.
I have a a start and stop element defined in my ServerDef, and serverType
defined with:
class: org.eclipse.jst.server.generic.core.internal.GenericServer
behaviourClass:
org.eclipse.jst.server.generic.core.internal.ExternalServerB ehaviour
launchConfigId:
org.eclipse.jst.server.generic.core.ExternalLaunchConfigurat ionType
The start script I use for my server start a VM which starts loading the
OS with the AS. As soon as the VM is starting up the script exits. This
seems to confuse Generic Server, which shows an error dialog as soon as
the script exits (way before the timeout is reached). If I wrap the script
with another one that sleeps forever after starting the VM, things seem to
work fine. Could there not an attribute in ServerDef, which specifies if
if the startup program is async, and that Generic Server should not fail
before timeout is reached, or the return value is != 0?
What I cannot get around is the stopping of the Server. When the script
just shuts down the VM, stops the running start script and exits with 0 an
Error Dialog is shown saying the that shutdown failed. This happens almost
instantly, and does not give much explanation as to why this happened.
Funny thing is that the execution continues, and prints to the console,
exits the VM, and sets the Server status to Stopped in Eclipse. Does
anyone know where the problem can originate from ? What is really expected
from a start/stop script? I've got the "Eclipse Web Tools Platform" book,
but haven't found any answers.
Thanks in advance,
Anders Olsson
|
|
|
Re: Generic Server External Launcher requierements [message #228687 is a reply to message #228532] |
Fri, 06 March 2009 17:59 |
Eclipse User |
|
|
|
Originally posted by: gercan.NO_SPAM_acm.org
External Generic Server also tries to hang on to the Process it has
started assuming that it is the Process that is running the server. The
reason for that is to be able to kill the process when it is killed from
the debug view.
There is a not so active request[1] for start scripts that exit quickly.
I was actually thinking about closing it because the reporter has not
responded.
[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=187136
--
Gorkem
Anders Olsson wrote:
> Hi,
>
> I wonder what is required for a external launcher defined in a ServerDef
> for JST/WST.
>
> I have a a start and stop element defined in my ServerDef, and
> serverType defined with:
> class: org.eclipse.jst.server.generic.core.internal.GenericServer
> behaviourClass:
> org.eclipse.jst.server.generic.core.internal.ExternalServerB ehaviour
> launchConfigId:
> org.eclipse.jst.server.generic.core.ExternalLaunchConfigurat ionType
>
> The start script I use for my server start a VM which starts loading the
> OS with the AS. As soon as the VM is starting up the script exits. This
> seems to confuse Generic Server, which shows an error dialog as soon as
> the script exits (way before the timeout is reached). If I wrap the
> script with another one that sleeps forever after starting the VM,
> things seem to work fine. Could there not an attribute in ServerDef,
> which specifies if if the startup program is async, and that Generic
> Server should not fail before timeout is reached, or the return value is
> != 0?
>
> What I cannot get around is the stopping of the Server. When the script
> just shuts down the VM, stops the running start script and exits with 0
> an Error Dialog is shown saying the that shutdown failed. This happens
> almost instantly, and does not give much explanation as to why this
> happened. Funny thing is that the execution continues, and prints to the
> console, exits the VM, and sets the Server status to Stopped in Eclipse.
> Does anyone know where the problem can originate from ? What is really
> expected from a start/stop script? I've got the "Eclipse Web Tools
> Platform" book, but haven't found any answers.
>
> Thanks in advance,
>
> Anders Olsson
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05025 seconds