Affects Version/s: 4.0
Fix Version/s: None
Operating System: All
Maximum-pool-size in pool settings is described on GlassFish Server Administration Console Reference below.
However this functionality always sets an upper limit to the number of connections regardless of the pooling attribute value which is enabled or disabled although almost any other attributes such as initial-and-minimum-pool-size has no effect on unpooled connections.
I think this spec may confuse users and can be a frequent cause of incorrect use. It is because the more likely scenario where unpooled mode will be selected is the case a user would like to use connections pooled by a JDBC driver. In this case, not only a JDBC driver but also an application server redundantly restricts the connection size by default due to the default value of maximum-pool-size(32).
I would like to confirm the reason why maximum-pool-size is effective on even unpooled mode. Besides, I believe we should avoid adopting an option which lets users change maximum-pool-size manually so that they can make sure maximum-pool-size is greater than the upper limit set on the JDBC driver. I think it difficult for users to understand the relationship between maximum-pool-size and unpooled mode.
Therefore I would suggest either one of the following improvements if it is acceptable.
1. Remove the corresponding codes controlling the maximum size of connections when the pooling attribute is specified as disabled.
2. Prepare a value of maximum-pool-size which allows users to create unlimited connections and switch to this special value automatically when the pooling attribute is specified as disabled. They can also specify another value as maximum-pool-size consciously afterwards if needed.