The JBossWeb Connector resource component attempted to determine the value for "Max Connections" if the underlying JBoss EAP server indicated the value was undefined. This caused an incorrect value to be set for the property if the underlying connector implementation was not the default JIO connector type. The JBossWeb Connector resource no longer sets a calculated "Max Connections" value, and defers to JBoss EAP and its connector subsystem to determine the default based on the connector implementation. When "Max Connections" is "unset", it no longer overrides the connector's default implementation for maximum connections.

Description of problem:
The configuration for a web connector reports incorrect "Max Connections" if the default is used. For example, when using an APR connector, the default should be 32 * <cpu-cores>. In an 8 core system the value should then be 256, however, JBoss ON is reporting it as 4096.
Version-Release number of selected component (if applicable):
3.2.0.GA
How reproducible:
Always
Steps to Reproduce:
1. Install EAP 6.2 and configure it to use APR (native) connectors.
2. Install JBoss ON 3.2 system.
3. Import EAP 6 into inventory.
4. Configure the EAP resource's connection settings.
5. Navigate to the EAP resources _Web / Connectors / ajp_ resource's configuration page.
Actual results:
Max Connections value is (512 * <num-cpu-cores>)
Expected results:
Max Connections value is (32 * <num-cpu-cores>)
Additional info:
As seen in [1], if the max-connection property is null--in other words, undefined--a call is made to computeMaxConnections[2]. It is there in which this artificial default value is calculated. This calculation appears to be way off.
In computeMaxConnections the schema is being used to determine the calculation. However, default values are based on the JIO connector and APR connectors (native) and have nothing to do with the schema.
This has also been reported as a bug in the "description" of the "Max Connections" as seen in bug 1091235.
[1]: https://github.com/rhq-project/rhq/blob/master/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebConnectorComponent.java#L80
if (maxConnProp.getStringValue() == null) {
maxConnProp.setIntegerValue(computeMaxConnections());
}
[2]: https://github.com/rhq-project/rhq/blob/master/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebConnectorComponent.java#L102
...
op = new ReadAttribute(getAddress(), "scheme");
res = getASConnection().execute(op);
if (res.isSuccess()) {
scheme = (String) res.getResult();
}
...
if ("http".equals(scheme))
val = cores * 512;
else if ("https".equals(scheme)) {
val = cores * 512;
} else if ("ajp".equals(scheme))
val = 32 * cores;
return val;