This commit is contained in:
@@ -116,6 +116,10 @@ public final class DataSources {
|
|||||||
String url0 = url.substring(0, pos);
|
String url0 = url.substring(0, pos);
|
||||||
pos = url0.lastIndexOf(':');
|
pos = url0.lastIndexOf(':');
|
||||||
if (pos > 0) dbtype = url0.substring(pos + 1);
|
if (pos > 0) dbtype = url0.substring(pos + 1);
|
||||||
|
} else { //jdbc:oracle:thin:@localhost:1521
|
||||||
|
String url0 = url.substring(url.indexOf(":") + 1);
|
||||||
|
pos = url0.indexOf(':');
|
||||||
|
if (pos > 0) dbtype = url0.substring(0, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dbtype == null) throw re;
|
if (dbtype == null) throw re;
|
||||||
|
|||||||
@@ -152,22 +152,6 @@ public class PoolJdbcSource extends PoolSource<Connection> {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean isMysql2() {
|
|
||||||
return source != null && source.getClass().getName().contains(".mysql.");
|
|
||||||
}
|
|
||||||
|
|
||||||
final boolean isOracle2() {
|
|
||||||
return source != null && source.getClass().getName().contains("oracle.");
|
|
||||||
}
|
|
||||||
|
|
||||||
final boolean isSqlserver2() {
|
|
||||||
return source != null && source.getClass().getName().contains(".sqlserver.");
|
|
||||||
}
|
|
||||||
|
|
||||||
final boolean isPostgresql2() {
|
|
||||||
return source != null && source.getClass().getName().contains(".postgresql.");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void watch() throws IOException {
|
private void watch() throws IOException {
|
||||||
if (persistxml == null || unitName == null) return;
|
if (persistxml == null || unitName == null) return;
|
||||||
final String file = persistxml.getFile();
|
final String file = persistxml.getFile();
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ public abstract class PoolSource<DBChannel> {
|
|||||||
String url0 = this.url.substring(0, pos);
|
String url0 = this.url.substring(0, pos);
|
||||||
pos = url0.lastIndexOf(':');
|
pos = url0.lastIndexOf(':');
|
||||||
if (pos > 0) dbtype0 = url0.substring(pos + 1);
|
if (pos > 0) dbtype0 = url0.substring(pos + 1);
|
||||||
|
} else { //jdbc:oracle:thin:@localhost:1521
|
||||||
|
String url0 = url.substring(url.indexOf(":") + 1);
|
||||||
|
pos = url0.indexOf(':');
|
||||||
|
if (pos > 0) dbtype0 = url0.substring(0, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.dbtype = dbtype0.toLowerCase();
|
this.dbtype = dbtype0.toLowerCase();
|
||||||
|
|||||||
Reference in New Issue
Block a user