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

Hontvari Jozsef commented on DAEMON-97:
---------------------------------------

The Java specification says that the JRE will exit when there is no running 
non-daemon thread. It is not only the specification, but all software I have 
seen worked this way, even GUI apps. They create their Thread descendant or 
Runnable, and start it. Nothing else happens in main, it just returns. I don't 
see the benefit of having a main function and thread which calls a blocking 
method when the program starts and does nothing, just waits, until the program 
stops. 
Anyway, considering that nobody else had been interested in this issue for 
three years, it does not worth your time.

> service stops after main method return on JDK 1.6u1 
> ----------------------------------------------------
>
>                 Key: DAEMON-97
>                 URL: https://issues.apache.org/jira/browse/DAEMON-97
>             Project: Commons Daemon
>          Issue Type: Bug
>    Affects Versions: 1.0.1
>         Environment: Windows 2003, Sun JDK1.6u1
>            Reporter: Hontvari Jozsef
>            Priority: Critical
>
> The installed service immediately stops in this environment when the main 
> method returns even if there is a non-daemon thread (created and started by 
> the main method). The same code runs well on JavaService.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to