maxThreads does not adequately propagate to HttpClient in HttpRouter, SOAPClient and
SOAPProxy
----------------------------------------------------------------------------------------------
Key: JBESB-3356
URL:
https://jira.jboss.org/browse/JBESB-3356
Project: JBoss ESB
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Configuration, Web Services
Affects Versions: 4.8
Reporter: David Ward
Assignee: David Ward
Fix For: 4.9
First, some background:
If one is trying to set the maxThreads for INVM invocation of a Service (where
invmScope="GLOBAL"), then one would do it like so:
<service .... invmScope="GLOBAL">
<property name="maxThreads" value="#"/>
....
If one is trying to set the maxThreads for an ESB *aware* Listener's invocation of a
Service, then one would do it like so:
<service ...>
<listeners>
<xxx-listener ...>
<property name="maxThreads" value="#"/>
In each of these cases, an action can look for the maxThreads via it's passed in
ConfigTree's parent:
config.getParent().getAttribute(ListenerTagNames.MAX_THREADS_TAG).
The HttpRouter takes advantage of this and *defaults* the max-total-connections property
it hands to HttpClient to the value of the parent ConfigTree's maxThreads.
Now, the problems:
1) HttpRouter only defaults HttpClient's max-total-connections property to the value
of maxThreads. It should also default max-connections-per-host.
2) SOAPClient similarly only defaults HttpClient's max-total-connections property to
the value of maxThreads. It should also default max-connections-per-host.
3) The SOAPProxy class "HttpSOAPProxyTransport" wraps HttpRouter, and creates it
with a ConfigTree. However, this ConfigTree is a *clone* of the ConfigTree passed into
the SOAPProxy, which does *not* have a parent ConfigTree. Thus, there is no parent to get
the maxThreads from. Because of that, if someone wants to set the max-total-connections
and max-connections-per-host, one has to do this:
<action class="...SOAPProxy" ...>
...
<property name="http-client-properties">
<http-client-property name="max-total-connections"
value="#"/>
<http-client-property name="max-connections-per-host"
value="#"/>
</property>
or this:
<action class="...SOAPProxy" ...>
...
<property name="file"
value="/file-containing-those-props.properties>
In problems 1 and 2, the user needs to know to set the
"max-connections-per-host" property. In problem 3, the user needs to know to
set both the "max-total-connections" and "max-connections-per-host"
properties. If the user doesn't know to do this, they might wonder "why am I
getting such bad out-of-the-box performance?"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira