You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2007/06/24 13:59:26 UTC
[jira] Created: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
--------------------------------------------------------------------------------------
Key: HTTPCORE-86
URL: https://issues.apache.org/jira/browse/HTTPCORE-86
Project: HttpComponents Core
Issue Type: Improvement
Components: HttpCore NIO
Reporter: Oleg Kalnichevski
Fix For: 4.0-beta1
Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Andrea Selva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514464 ]
Andrea Selva commented on HTTPCORE-86:
--------------------------------------
Hi Oleg,
i think that Executors.newFixedThreadPool (jdk api) could be used to this scope.
Best regards
Andrea
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Assigned: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski reassigned HTTPCORE-86:
-----------------------------------------
Assignee: Oleg Kalnichevski
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Assignee: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Resolved: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-86.
---------------------------------------
Resolution: Fixed
Fix Version/s: (was: 4.0-beta1)
4.0-alpha6
I solved the problem somewhat differently. Instead of restarting failed I/O dispatch threads I/O reactors now catch all runtime exceptions thrown by protocol handlers and delegate their handling to an optional exception handler. The dispatch thread will terminate only if the exception handler is unable to handle a particular exception.
Oleg
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Assignee: Oleg Kalnichevski
> Fix For: 4.0-alpha6
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516758 ]
Roland Weber commented on HTTPCORE-86:
--------------------------------------
Hello Andrea,
core will not have any external dependencies.
cheers,
Roland
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Andrea Selva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516514 ]
Andrea Selva commented on HTTPCORE-86:
--------------------------------------
Why not using original Doug Lea's concurrent package with this small static method inspired by http://mail-archives.apache.org/mod_mbox/geronimo-dev/200407.mbox/%3c6.1.2.0.0.20040711112952.01e83af8@michaelmcgrady.com%3e
public static PooledExecutor newFixedThreadPool(int numTh) {
PooledExecutor fixedExecutor = new PooledExecutor(new LinkedQueue());
fixedExecutor.setKeepAliveTime(0L);
fixedExecutor.setMaximumPoolSize(int numTh);
fixedExecutor.setMinimumPoolSize(int numTh);
return fixedExecutor;
}
I hope this could help
Andrea
PS
The price to pay is to add a library depedency, alternatively from Lea's concurrent packages should me taken only the necessary classes
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516920 ]
Oleg Kalnichevski commented on HTTPCORE-86:
-------------------------------------------
Andrea,
I do not think adding an extra dependency is justified in this case. All threading code is already in place. We just have to extend the existing framework with an additional safeguard to restart failed worker threads.
Oleg
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCORE-86) Provide mechanism to re-start I/O
worker threads terminated due to a runtime exception
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCORE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514466 ]
Oleg Kalnichevski commented on HTTPCORE-86:
-------------------------------------------
Hi Andrea,
Executors.newFixedThreadPool would probably be the easiest choice, but it is a java 1.5 feature and therefore cannot be used in HttpCore NIO, which we would like to keep java 1.4 compatible.
Oleg
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception
> --------------------------------------------------------------------------------------
>
> Key: HTTPCORE-86
> URL: https://issues.apache.org/jira/browse/HTTPCORE-86
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Reporter: Oleg Kalnichevski
> Fix For: 4.0-beta1
>
>
> Provide mechanism to re-start I/O worker threads terminated due to a runtime exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org