db_check 로직 개선
This commit is contained in:
@@ -63,6 +63,7 @@ public class PortalDatasourceConfiguration extends BaseDatasourceConfiguration {
|
||||
// JNDI 이용
|
||||
if (StringUtils.isNotEmpty(emsProp.getJndiName())) {
|
||||
try {
|
||||
log.debug("Try get JNDI datasource : {}", emsProp.getJndiName());
|
||||
dataSource = this.jndiLookup(emsProp.getJndiName());
|
||||
} catch (NamingException e) {
|
||||
log.warn("JNDI lookup failed.", e);
|
||||
@@ -81,6 +82,7 @@ public class PortalDatasourceConfiguration extends BaseDatasourceConfiguration {
|
||||
}
|
||||
|
||||
if (dataSource != null && env.matchesProfiles("db_check")) {
|
||||
log.debug("Activated 'db_check' profile.");
|
||||
DatabaseSessionVerifier verifier = new DatabaseSessionVerifier(dataSource);
|
||||
verifier.afterSingletonsInstantiated();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user