Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Generic Server External Launcher requierements
Generic Server External Launcher requierements [message #228532] Mon, 02 March 2009 15:33 Go to next message
Anders Olsson is currently offline 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 Go to previous messageGo to next message
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
>
Re: Generic Server External Launcher requierements [message #229391 is a reply to message #228687] Mon, 23 March 2009 09:50 Go to previous message
Anders Olsson is currently offline Anders Olsson
Messages: 21
Registered: July 2009
Junior Member
OK, I see that there is valid reason for the start script to be expected
to be running during the lifecycle of the AS. I have no particular
interest of keeping the bug report alive.

What I'm rather wondering is how a shutdown script is supposed to work.
Since the start script is supposed to be running, is the shutdown script
supposed to signal the script to shutdown properly, or is it alright to
kill the other process? Having tried both methods, where both result in an
error dialog in Eclipse, I feel a bit lost.
Previous Topic:Re: Ident, not Format, in XML files
Next Topic:Turn off validation...
Goto Forum:
  


Current Time: Mon Sep 22 10:25:00 GMT 2014

Powered by FUDForum. Page generated in 0.11187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software