mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Remove unwanted connection
This commit is contained in:
parent
70f5a99e60
commit
a2b8b8bda2
@ -1177,7 +1177,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
public double generateCost(List<Device> allDevices, Timestamp startDate, Timestamp endDate, Cost tenantCost, List<Device> deviceStatusNotAvailable, double totalCost) throws DeviceManagementException {
|
public double generateCost(List<Device> allDevices, Timestamp startDate, Timestamp endDate, Cost tenantCost, List<Device> deviceStatusNotAvailable, double totalCost) throws DeviceManagementException {
|
||||||
List<DeviceStatus> deviceStatus;
|
List<DeviceStatus> deviceStatus;
|
||||||
try {
|
try {
|
||||||
DeviceManagementDAOFactory.getConnection();
|
|
||||||
for (Device device : allDevices) {
|
for (Device device : allDevices) {
|
||||||
long dateDiff = 0;
|
long dateDiff = 0;
|
||||||
int tenantId = this.getTenantId();
|
int tenantId = this.getTenantId();
|
||||||
@ -1228,10 +1227,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
String msg = "Error occurred in retrieving status history for a device in billing.";
|
String msg = "Error occurred in retrieving status history for a device in billing.";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
throw new DeviceManagementException(msg, e);
|
throw new DeviceManagementException(msg, e);
|
||||||
} catch (SQLException e) {
|
|
||||||
String msg = "Error occurred while opening a connection to the data source";
|
|
||||||
log.info(msg, e);
|
|
||||||
throw new DeviceManagementException(msg, e);
|
|
||||||
}
|
}
|
||||||
return totalCost;
|
return totalCost;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user