commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DAEMON-258) prunsrv to block until start method returns
Date Mon, 11 Mar 2013 15:29:14 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598893#comment-13598893
] 

Mladen Turk commented on DAEMON-258:
------------------------------------

Well, you presume that each service is faulty, which is not the case.
>From Commons Daemon perspective service is successful if its Java part is started.
True it can later fail, but any other service can do that as well, and I presume
you have to hit refresh in such situations.
Since the same application MUST be able to run both in-process and as detached application
using java.exe we have no way to report something back to procrun so it can report that
to service control manager. For that we would need some IPC via socket channel and I just
don't think that's worth the effort.
In case your service functionality depends on some external resource which can be unavailable
the standard way is to have a dependent service that will either check or start that resource.


                
> prunsrv to block until start method returns
> -------------------------------------------
>
>                 Key: DAEMON-258
>                 URL: https://issues.apache.org/jira/browse/DAEMON-258
>             Project: Commons Daemon
>          Issue Type: Improvement
>          Components: Procrun
>    Affects Versions: 1.0.10
>         Environment: Windows all versions
>            Reporter: Ian Beaumont
>            Assignee: Mladen Turk
>            Priority: Minor
>             Fix For: 1.0.11
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Currently, when starting a windows service from the service control panel based on prunsrv
using the JVM.dll the start method is called in a separate thread.  Upon calling this thread,
the service is marked as "started" in the service control panel.  This is confusing, as if
something goes wrong in the program start-up sequence (e.g. a database connection is unavailable)
then the program will fail to start successfully but the user will not get any indication
of this (they have to press "refresh" in the windows services window to see the service failed
to start).
> It would be better to have an option to report the "service" as "starting" while the
"start" method is running and only when the method returns, mark the service as "started"
or "stopped" depending on a return code from the "start" method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message