Skip to content

Commit

Permalink
#2718 mapping path static resources3 - fixed MangoContextListener.ini…
Browse files Browse the repository at this point in the history
…tialized
  • Loading branch information
Limraj committed Nov 17, 2023
1 parent 8028a41 commit 1e03f74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/com/serotonin/mango/MangoContextListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ private void initialized(ServletContextEvent evt) {
// Create all the stuff we need.
constantsInitialize(ctx);
freemarkerInitialize(ctx);
databaseInitialize(ctx);
imageSetInitialize(ctx);
databaseInitialize(ctx);
highestAlarmLevelServiceInitialize();
dataPointsNameToIdMapping(ctx);

Expand Down
5 changes: 3 additions & 2 deletions src/org/scada_lts/dao/DAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.scada_lts.web.beans.ApplicationBeans;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;

Expand All @@ -48,11 +49,11 @@ public class DAO {
private DAO() {
try {
LOG.trace("Create DAO");
DataSource ds = Common.ctx.getDatabaseAccess().getDataSource();
DataSource ds = ApplicationBeans.getBean("databaseSource", DataSource.class);
namedParamJdbcTemplate = new NamedParameterJdbcTemplate(ds);
jdbcTemplate = new JdbcTemplate(ds);
} catch (Exception e) {
LOG.error(e);
LOG.error(e.getMessage(), e);
}
}

Expand Down

0 comments on commit 1e03f74

Please sign in to comment.