kinow commented on a change in pull request #115:
URL: https://github.com/apache/commons-pool/pull/115#discussion_r748775022
##########
File path:
src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
##########
@@ -62,6 +62,9 @@
*/
public abstract class BaseGenericObjectPool<T> extends BaseObject {
+ /** Suffix appended to name of the next pool to be registered with JMX */
+ private static final AtomicLong NEXT_POOL_SUFFIX = new AtomicLong();
Review comment:
At first didn't understand how that'd speed up the process, but the JIRA
issue had the answer, so for others that didn't read the issue before:
>In the code, the ObjectName's postfix always starts with 1, so many
InstanceAlreadyExistsExceptions may be thrown before registered successfully.
Simple solution, thanks for adding a test with a timeout too, +1!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]