use of org.olat.admin.sysinfo.model.DatabaseConnectionVO in project OpenOLAT by OpenOLAT.
the class DatabaseStatsManager method getConnectionInfos.
public DatabaseConnectionVO getConnectionInfos() {
DatabaseConnectionVO vo = new DatabaseConnectionVO();
vo.setActiveConnectionCount(0);
vo.setCurrentConnectionCount(0);
try {
JMXManager jmxManager = CoreSpringFactory.getImpl(JMXManager.class);
MBeanServer mBeanServer = jmxManager.getMBeanServer();
boolean found = searchHikariDataSources(mBeanServer, vo) || searchTomcatDataSources(mBeanServer, vo) || searchC3P0DataSources(mBeanServer, vo);
if (log.isDebug()) {
log.debug("MBean for datasource found: " + found);
}
} catch (Exception e) {
log.error("", e);
}
return vo;
}
use of org.olat.admin.sysinfo.model.DatabaseConnectionVO in project openolat by klemens.
the class MonitoringService method getStatistics.
public Statistics getStatistics() {
Statistics statistics = new Statistics();
SessionsVO sessionsVo = new OpenOLATStatisticsWebService().getSessionsVO();
statistics.setSessionsVo(sessionsVo);
SearchServiceStatus status = SearchServiceFactory.getService().getStatus();
if (status instanceof SearchServiceStatusImpl) {
SearchServiceStatusImpl statusImpl = (SearchServiceStatusImpl) status;
FullIndexerStatus fStatus = statusImpl.getFullIndexerStatus();
statistics.setLastFullIndexTime(fStatus.getLastFullIndexDateString());
}
// activeUserCount="88" // registered and activated identities, same as in GUI
if (start < 1 || (System.currentTimeMillis() - start) > RENEW_RATE) {
start = System.currentTimeMillis();
activeUserCount = securityManager.countIdentitiesByPowerSearch(null, null, false, null, null, null, null, null, null, null, Constants.USERSTATUS_ACTIVE);
totalGroupCount = businessGroupService.countBusinessGroups(null, null);
publishedCourses = repositoryManager.countPublished(CourseModule.ORES_TYPE_COURSE);
}
statistics.setActiveUserCount(activeUserCount);
statistics.setTotalGroupCount(totalGroupCount);
statistics.setPublishedCourses(publishedCourses);
DatabaseConnectionVO connections = databaseStatsManager.getConnectionInfos();
if (connections != null) {
statistics.setActiveConnectionCount(connections.getActiveConnectionCount());
statistics.setCurrentConnectionCount(connections.getCurrentConnectionCount());
}
return statistics;
}
use of org.olat.admin.sysinfo.model.DatabaseConnectionVO in project openolat by klemens.
the class DatabaseStatsManager method getConnectionInfos.
public DatabaseConnectionVO getConnectionInfos() {
DatabaseConnectionVO vo = new DatabaseConnectionVO();
vo.setActiveConnectionCount(0);
vo.setCurrentConnectionCount(0);
try {
JMXManager jmxManager = CoreSpringFactory.getImpl(JMXManager.class);
MBeanServer mBeanServer = jmxManager.getMBeanServer();
boolean found = searchHikariDataSources(mBeanServer, vo) || searchTomcatDataSources(mBeanServer, vo) || searchC3P0DataSources(mBeanServer, vo);
if (log.isDebug()) {
log.debug("MBean for datasource found: " + found);
}
} catch (Exception e) {
log.error("", e);
}
return vo;
}
Aggregations