|
@@ -50,10 +50,10 @@ public class DynamicDataSourceProxy implements DynamicDataSource {
|
|
public DatabaseType getType() {
|
|
public DatabaseType getType() {
|
|
if (databaseType == null) {
|
|
if (databaseType == null) {
|
|
lock.lock();
|
|
lock.lock();
|
|
- if (databaseType != null) {
|
|
|
|
- return databaseType;
|
|
|
|
- }
|
|
|
|
try {
|
|
try {
|
|
|
|
+ if (databaseType != null) {
|
|
|
|
+ return databaseType;
|
|
|
|
+ }
|
|
try (Connection connection = proxy.getConnection()) {
|
|
try (Connection connection = proxy.getConnection()) {
|
|
databaseType = DatabaseType.fromJdbcUrl(connection.getMetaData().getURL());
|
|
databaseType = DatabaseType.fromJdbcUrl(connection.getMetaData().getURL());
|
|
}
|
|
}
|