From a4d1156d08dd89f4ea14d258b3b15b84b5880dac Mon Sep 17 00:00:00 2001 From: Brett Wooldridge Date: Fri, 31 Jul 2015 23:13:16 +0900 Subject: [PATCH] Fixed #359 allow altering the username/password through JMX at runtime. See javadoc for HikariConfigMXBean. --- .../com/zaxxer/hikari/HikariConfigMXBean.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java b/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java index eeb4b76a..734302c0 100644 --- a/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java +++ b/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java @@ -152,6 +152,25 @@ public interface HikariConfigMXBean */ void setMaximumPoolSize(int maxPoolSize); + /** + * Set the password used for authentication. Changing this at runtime will apply to new connections only. + * Altering this at runtime only works for DataSource-based connections, not Driver-class or JDBC URL-based + * connections. + * + * @param username the database password + */ + void setPassword(String password); + + /** + * Set the username used for authentication. Changing this at runtime will apply to new connections only. + * Altering this at runtime only works for DataSource-based connections, not Driver-class or JDBC URL-based + * connections. + * + * @param username the database username + */ + void setUsername(String username); + + /** * The name of the connection pool. *