[jbosstools-issues] [JBoss JIRA] (JBIDE-15880) openshift-java-client: provide its own lib specific timeout that may be set via system properties

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Thu Nov 7 10:52:04 EST 2013


    [ https://issues.jboss.org/browse/JBIDE-15880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921425#comment-12921425 ] 

Andre Dietisheim commented on JBIDE-15880:
------------------------------------------

I introduced 2 new client-lib specific timeouts

{code}
	public static final String SYSPROP_OPENSHIFT_CONNECT_TIMEOUT = "com.openshift.httpclient.connect.timeout";
	public static final String SYSPROP_OPENSHIFT_READ_TIMEOUT = "com.openshift.httpclient.read.timeout";
{code}

there are now 4 timeouts which override one each other:

1) operation specific timeout (used in JBT only when creating applications so far)
2) openshift-java-client specific system property
3) jdk-wide HttpUrlConnection timeout
4) safe default of 2  Minutes

{code:title=UrlConnectionHttpClient}
	private int getTimeout(int timeout, int openShiftTimeout, int systemPropertyTimeout, int defaultTimeout) {
		if (timeout == NO_TIMEOUT) {
			timeout = openShiftTimeout;
			if (timeout == NO_TIMEOUT) {
				timeout = systemPropertyTimeout;
				if (timeout == NO_TIMEOUT) {
					timeout = defaultTimeout;
				}
			}
		}
		return timeout;
	}
{code}
                
> openshift-java-client: provide its own lib specific timeout that may be set via system properties
> -------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-15880
>                 URL: https://issues.jboss.org/browse/JBIDE-15880
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: openshift
>    Affects Versions: 4.1.1.Beta1
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 4.1.1.CR1
>
>
> client timeouts when talking to OpenShift are unfortunaltey still a topic and cause errors (JBIDE-15835, JBIDE-15831) when OpenShift is installed on systems with poor performance. We should thus provide a client-lib specific default timeout that a user may override by setting it in the system properties.
> The timeout-setting order would thus then be:
> 1) specific operation timeout (ex. JBT is currently using a specific creation timeout)
> 2) client-lib default timeout (which may be set by a system property)
> 3) HttpUrlConnection default timeout (jdk timeout: -Dsun.net.client.defaultConnectTimeout=600000)

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


More information about the jbosstools-issues mailing list