Fix usage generation in billing #477

Merged
tcdlpds merged 5 commits from osh.silva/device-mgt-core:usage-11591 into master 2 months ago
Collaborator
fixes https://roadmap.entgra.net/issues/11591
osh.silva added 2 commits 4 months ago
tcdlpds requested changes 4 months ago
String msg = "Error occurred while opening a connection to the data source";
log.info(msg, e);
throw new DeviceManagementException(msg, e);
} finally {
Owner

What's the reason for this?

What's the reason for this?
osh.silva marked this conversation as resolved
osh.silva added 1 commit 4 months ago
tcdlpds requested changes 4 months ago
} catch (SQLException e) {
String msg = "Error occurred while opening a connection to the data source";
log.info(msg, e);
throw new DeviceManagementException(msg, e);
Owner

Shouldn't we close the connection ?

Shouldn't we close the connection ?
Poster
Collaborator

This method is used inside another method where the connection is closed. If we close the connection in this method, the subsequent SQL queries will not execute because the connection will no longer be available.

This method is used inside another method where the connection is closed. If we close the connection in this method, the subsequent SQL queries will not execute because the connection will no longer be available.
Owner

If that is the case, do we need to open the connection here?

In other words, can't we remove "DeviceManagementDAOFactory.getConnection();" line?

If that is the case, do we need to open the connection here? In other words, can't we remove "DeviceManagementDAOFactory.getConnection();" line?
Poster
Collaborator

yes this can be removed

yes this can be removed
osh.silva marked this conversation as resolved
osh.silva added 2 commits 2 months ago
tcdlpds merged commit b40c5a625d into master 2 months ago

Reviewers

tcdlpds requested changes 4 months ago
The pull request has been merged as b40c5a625d.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#477
Loading…
There is no content yet.