[ 
https://issues.apache.org/jira/browse/DAEMON-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Thomas resolved DAEMON-306.
--------------------------------
    Resolution: Not A Problem

In Java mode (or exe mode) you need to configure Windows to enable recovery 
options for non-zero exit codes. There is a checkbox (Server 2008 onwards) on 
the recovery configuration tab to do this.

> Service is not restarted when the exit code is non-zero
> -------------------------------------------------------
>
>                 Key: DAEMON-306
>                 URL: https://issues.apache.org/jira/browse/DAEMON-306
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.15
>         Environment: Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
> Windows Server 2008 R2 Standard
> service created and configurated with automatic restart service as:
> {code}
> sc failure %SERVICE_NAME% reset= 30 actions= 
> restart/5000/restart/10000/restart/60000
> {code}
>            Reporter: antonio castellón
>         Attachments: my-daemon-example.zip
>
>
> I have a Java application that internally contains a throws, whe it success 
> it trace and ends the application using:
> {code} System.exit(-1); {code}
> or
> {code} System.exit(1); {code}
> The service is not automatically restarted, I suppose that the procrun 
> application catch correctly the exit from the java application, but it looks 
> that not inform correctly to the Services Manager from the O.S.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to