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