Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine JMX ObjectName #1681

Merged
merged 1 commit into from Jan 9, 2021
Merged

Refine JMX ObjectName #1681

merged 1 commit into from Jan 9, 2021

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Nov 2, 2020

fix #1678

@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #1681 (1738aaf) into dev (d9983b3) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1681      +/-   ##
============================================
+ Coverage     70.28%   70.33%   +0.04%     
- Complexity      564      565       +1     
============================================
  Files            26       26              
  Lines          2117     2120       +3     
  Branches        296      297       +1     
============================================
+ Hits           1488     1491       +3     
  Misses          484      484              
  Partials        145      145              
Impacted Files Coverage Δ Complexity Δ
src/main/java/com/zaxxer/hikari/pool/PoolBase.java 70.58% <100.00%> (+0.32%) 55.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9983b3...1738aaf. Read the comment docs.

@brettwooldridge
Copy link
Owner

@bo0ts I like this change, however, in its current form it will break existing users. I suggest enabling the new behavior via a system property, hikaricp.jmx.register2.0 (eg. -Dhikaricp.jmx.register2.0=true).

@quaff
Copy link
Contributor Author

quaff commented Jan 8, 2021

@bo0ts I like this change, however, in its current form it will break existing users. I suggest enabling the new behavior via a system property, hikaricp.jmx.register2.0 (eg. -Dhikaricp.jmx.register2.0=true).

It's too conservative, I don't think it will break any critical function.

@brettwooldridge
Copy link
Owner

brettwooldridge commented Jan 8, 2021

@quaff Wouldn't this change break how lookups are performed?

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName poolName = new ObjectName("com.zaxxer.hikari:type=Pool (foo)");
HikariPoolMXBean poolProxy = JMX.newMXBeanProxy(mBeanServer, poolName, HikariPoolMXBean.class);

Any existing code performing programatic lookups seems like it would surely be broken.

@quaff
Copy link
Contributor Author

quaff commented Jan 8, 2021

@quaff Wouldn't this change break how lookups are performed?

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName poolName = new ObjectName("com.zaxxer.hikari:type=Pool (foo)");
HikariPoolMXBean poolProxy = JMX.newMXBeanProxy(mBeanServer, poolName, HikariPoolMXBean.class);

Any existing code performing programatic lookups seems like it would surely be broken.

I mean rare projects will lookup it directly by code.

@brettwooldridge
Copy link
Owner

@quaff HikariCP has millions of users, literally. "Rare" in this case could be thousands of users. One of those "users" could easily be Spring Boot, the Play framework, or Oracle Cloud, all of which use HikariCP and in turn have millions of users of their own.

@quaff
Copy link
Contributor Author

quaff commented Jan 8, 2021

@quaff HikariCP has millions of users, literally. "Rare" in this case could be thousands of users. One of those "users" could easily be Spring Boot, the Play framework, or Oracle Cloud, all of which use HikariCP and in turn have millions of users of their own.

Updated according to your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JMX key property "type" is overly specific and property "name" is missing
2 participants