camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Jørgen Walstrøm (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6196) setting DefaultShutdownStrategy.setTimeout(0L) may cause infinite timeout
Date Fri, 22 Mar 2013 06:27:17 GMT

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

Per Jørgen Walstrøm commented on CAMEL-6196:
--------------------------------------------

I would love to submit a patch, how do I do that?

I suggest the following solution
1) if timeout == 0, the shutdown will be forced immediately
2) if timeout < 0, throw new IllegalArgumentException

you could argue in 2) that negative values should be treated as 0 (which probably would be
the easiest solution), but I think this would be confusing. The user sets a negative number
for some strange reason. He doesn't expect it silently to be substituted with a 0

                
> setting DefaultShutdownStrategy.setTimeout(0L) may cause infinite timeout
> -------------------------------------------------------------------------
>
>                 Key: CAMEL-6196
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6196
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.4
>            Reporter: Per Jørgen Walstrøm
>            Priority: Trivial
>              Labels: shutdown
>
> defaultShutdownStrategy.setTimeout(0L);
> may give the following when shutting down and inflight exchanges do not complete
> [Camel (camel) thread #2 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy
- Waiting as there are still 2 inflight and pending exchanges to complete, timeout in 0 seconds.
> [Camel (camel) thread #2 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy
- Waiting as there are still 2 inflight and pending exchanges to complete, timeout in -1 seconds.
> [Camel (camel) thread #2 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy
- Waiting as there are still 2 inflight and pending exchanges to complete, timeout in -2 seconds.
> [...]
> [Camel (camel) thread #2 - ShutdownTask] INFO org.apache.camel.impl.DefaultShutdownStrategy
- Waiting as there are still 2 inflight and pending exchanges to complete, timeout in -323
seconds.

--
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