Issue #1802: Eliminated a call to new on StatsDao in AggregateManager

Change-Id: I2c52a222746df7e7a0c8f91682268e25e97ae0ce

Former-commit-id: e9e7f34e87f18120232ed5cc8e00da6cb8bda5d5
This commit is contained in:
Benjamin Phillippe 2013-03-28 12:08:57 -05:00
parent 9a321b6ac8
commit ed9cb5f8f6
2 changed files with 8 additions and 3 deletions

View file

@ -13,6 +13,7 @@
<bean id="aggregateManager" class="com.raytheon.uf.edex.stats.AggregateManager"> <bean id="aggregateManager" class="com.raytheon.uf.edex.stats.AggregateManager">
<constructor-arg value="${stats.period}"/> <constructor-arg value="${stats.period}"/>
<property name="aggregateDao" ref="aggregateRecordDao"/> <property name="aggregateDao" ref="aggregateRecordDao"/>
<property name="statsRecordDao" ref="statsDao"/>
<property name="jaxbManager" ref="statsGroupingColumnJaxbManager"/> <property name="jaxbManager" ref="statsGroupingColumnJaxbManager"/>
</bean> </bean>

View file

@ -88,6 +88,8 @@ public class AggregateManager {
private AggregateRecordDao aggregateDao; private AggregateRecordDao aggregateDao;
private StatsDao statsRecordDao;
private static final Object[] EMPTY_OBJ_ARR = new Object[0]; private static final Object[] EMPTY_OBJ_ARR = new Object[0];
private static JAXBManager jaxbManager; private static JAXBManager jaxbManager;
@ -223,7 +225,6 @@ public class AggregateManager {
public void scan() throws Exception { public void scan() throws Exception {
long t0 = System.currentTimeMillis(); long t0 = System.currentTimeMillis();
ConfigLoader configLoader = ConfigLoader.getInstance(); ConfigLoader configLoader = ConfigLoader.getInstance();
StatsDao statsRecordDao = new StatsDao();
Map<String, StatisticsEvent> statsMap = configLoader.getTypeView(); Map<String, StatisticsEvent> statsMap = configLoader.getTypeView();
@ -372,8 +373,11 @@ public class AggregateManager {
this.aggregateDao = aggregateDao; this.aggregateDao = aggregateDao;
} }
public void setJaxbManager(JAXBManager jaxbManager) { public void setStatsRecordDao(StatsDao statsRecordDao) {
this.jaxbManager = jaxbManager; this.statsRecordDao = statsRecordDao;
} }
public void setJaxbManager(JAXBManager jaxbManager) {
AggregateManager.jaxbManager = jaxbManager;
}
} }