|
|
|
@ -289,12 +289,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
|
|
|
|
|
PolicyManagementDAOFactory.closeConnection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!firstTimeComplianceData.isEmpty()) {
|
|
|
|
|
try {
|
|
|
|
|
PolicyManagementDAOFactory.beginTransaction();
|
|
|
|
|
if (!firstTimeComplianceData.isEmpty()) {
|
|
|
|
|
monitoringDAO.addComplianceDetails(firstTimeComplianceData);
|
|
|
|
|
PolicyManagementDAOFactory.commitTransaction();
|
|
|
|
|
}
|
|
|
|
|
} catch (MonitoringDAOException e) {
|
|
|
|
|
PolicyManagementDAOFactory.rollbackTransaction();
|
|
|
|
|
throw new PolicyComplianceException("Error occurred from monitoring dao.", e);
|
|
|
|
@ -304,6 +303,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
|
|
|
|
|
} finally {
|
|
|
|
|
PolicyManagementDAOFactory.closeConnection();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!notifiableDeviceEnrollments.isEmpty()) {
|
|
|
|
|
try {
|
|
|
|
|