[ 
http://jira.codehaus.org/browse/MEXEC-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86488
 ] 

Jerome Lacoste commented on MEXEC-15:
-------------------------------------

Hei David,

> By changing the default timeout to never, no warning message will ever be 
> printed and it will hang (on a misbehaving program). 
> By using a timeout, the developer eventually sees a warning message.  Maybe 
> the default timeout should be something much longer,
> like say 30 seconds -- enough to be annoying not to leave it alone if it is a 
> problem.
> This is the last I'll speak on the matter; I've voiced my opinion enough.

Thing is that I don't trust the user to see the warning message... I like the 
idea of using a long time out though. Other solutions might have been to detect 
the hang or always print a preventive warning, but I like none of them.

The decision is not cast in stone, at least not until the code is released. 
Thanks a lot for your input.

BTW, now that I look at the code, can't

                if ( daemonThreadJoinTimeout <= 0 )
                {
                    joinThread( thread, 0 );
                    continue;
                }
                long timeout = daemonThreadJoinTimeout 
                               - ( System.currentTimeMillis() - startTime );
                if ( timeout > 0 )
                {
                    joinThread( thread, timeout );
                }
                if ( ! thread.isAlive() )
                {
                    continue;
                }

be rewritten as

                long timeout = Math.max( 0, daemonThreadJoinTimeout 
                               - ( System.currentTimeMillis() - startTime ) );

                joinThread( thread, timeout );

                if ( ! thread.isAlive() )
                {
                    continue;
                }

J

> exec:java plugin never shuts down
> ---------------------------------
>
>                 Key: MEXEC-15
>                 URL: http://jira.codehaus.org/browse/MEXEC-15
>             Project: Mojo Exec Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Ryan Sonnek
>         Assigned To: Jerome Lacoste
>            Priority: Critical
>             Fix For: 1.1
>
>         Attachments: dsmiley-MEXEC-15.patch
>
>
> I've debugged that my main method has finished running, but the exec:java 
> plugin never exits.  Here's the last output I see before it hangs 
> indeffinately.
> T10 2007-01-15 10:34:59.959 
> com.digitalriver.logging.BatchPersistentRecordHandler <FINE> Persisting 1 
> LogRecords
> [DEBUG] interrupting thread 
> Thread[Thread-1,1,com.digitalriver.schedule.JobRunner]
> [DEBUG] joining on thread 
> Thread[Thread-1,1,com.digitalriver.schedule.JobRunner]
> My plugin configuration is pretty simple:
>       <!-- support exec:java to run application -->
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>exec-maven-plugin</artifactId>
>         <configuration>
>                 <systemProperties>
>                       <systemProperty>
>               <key>com.digitalriver.system.configName</key>
>               <value>client</value>
>                       </systemProperty>
>                       <systemProperty>
>               <key>com.digitalriver.system.home</key>
>               <value>${runtimeRoot}</value>
>                       </systemProperty>
>                 </systemProperties>
>           <mainClass>com.digitalriver.schedule.JobRunner</mainClass>
>           <keepAlive>false</keepAlive>
>         </configuration>
>       </plugin>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to