DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
transactionManager.setDataSource(datasource);
context.getBeanFactory().registerSingleton("statsTransactionManager", transactionManager);
RunStatsManager rsm = new RunStatsManager(template);
context.getBeanFactory().registerSingleton("runStatsManager", rsm);
}
catch (NamingException e) {
log.error("Cannot initiate statsdb connection: " + e.getMessage());
e.printStackTrace();