diff --git a/src/org/redkale/source/PoolJdbcSource.java b/src/org/redkale/source/PoolJdbcSource.java index e61202449..a664b657e 100644 --- a/src/org/redkale/source/PoolJdbcSource.java +++ b/src/org/redkale/source/PoolJdbcSource.java @@ -223,7 +223,7 @@ public class PoolJdbcSource extends PoolSource { String newurl = property.getProperty(JDBC_URL); String newuser = property.getProperty(JDBC_USER); String newpassword = property.getProperty(JDBC_PWD); - if (this.url.equals(newurl) && this.user.equals(newuser) && this.password.equals(newpassword)) return; + if (this.url.equals(newurl) && this.username.equals(newuser) && this.password.equals(newpassword)) return; try { try { seturlm = clazz.getMethod("setUrl", String.class); @@ -234,7 +234,7 @@ public class PoolJdbcSource extends PoolSource { clazz.getMethod("setUser", String.class).invoke(source, newuser); clazz.getMethod("setPassword", String.class).invoke(source, newpassword); this.url = newurl; - this.user = newuser; + this.username = newuser; this.password = newpassword; dataSource.logger.log(Level.INFO, DataSource.class.getSimpleName() + "(" + dataSource.name + "." + rwtype + ") change (" + property + ")"); } catch (Exception e) { diff --git a/src/org/redkale/source/PoolSource.java b/src/org/redkale/source/PoolSource.java index 387a1eb9b..35f5cca9e 100644 --- a/src/org/redkale/source/PoolSource.java +++ b/src/org/redkale/source/PoolSource.java @@ -49,11 +49,11 @@ public abstract class PoolSource { protected InetSocketAddress servaddr; - protected String user; + protected String username; protected String password; - protected String defdb; + protected String database; protected Properties props; @@ -65,7 +65,7 @@ public abstract class PoolSource { this.rwtype = rwtype; this.props = prop; this.url = prop.getProperty(JDBC_URL); - this.user = prop.getProperty(JDBC_USER, ""); + this.username = prop.getProperty(JDBC_USER, ""); this.password = prop.getProperty(JDBC_PWD, ""); this.connectTimeoutSeconds = Integer.decode(prop.getProperty(JDBC_CONNECTTIMEOUT_SECONDS, "6")); this.readTimeoutSeconds = Integer.decode(prop.getProperty(JDBC_READTIMEOUT_SECONDS, "6")); @@ -113,7 +113,7 @@ public abstract class PoolSource { } pos = url0.indexOf('/'); //127.0.0.1:5432/db if (pos > 0) { - this.defdb = url0.substring(pos + 1); + this.database = url0.substring(pos + 1); url0 = url0.substring(0, pos); } pos = url0.indexOf(':'); @@ -185,16 +185,16 @@ public abstract class PoolSource { return servaddr; } - public final String getUser() { - return user; + public final String getUsername() { + return username; } public final String getPassword() { return password; } - public final String getDefdb() { - return defdb; + public final String getDatabase() { + return database; } }