db_check 로직 개선

This commit is contained in:
Rinjae
2025-10-28 19:14:54 +09:00
parent 1ed0da8b76
commit 5082fc4f99
@@ -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();
}