return jdbcURL1.compareToIgnoreCase(jdbcURL2);
}
});
// group datasources by JDBC URL and calculate aggregated totals
DataSourceInfoGroup dsGroup = null;
for (Iterator i = dataSources.iterator(); i.hasNext();) {
DataSourceInfo ds = (DataSourceInfo) i.next();
if (dsGroup == null || !dsGroup.getJdbcURL().equalsIgnoreCase(ds.getJdbcURL())) {
dsGroup = new DataSourceInfoGroup(ds);
dataSourceGroups.add(dsGroup);
} else {
dsGroup.addDataSourceInfo(ds);
}
}
return new ModelAndView(getViewName(), "dataSourceGroups", dataSourceGroups);
}