diff --git a/src/repository/deliveryreportpersistence.bal b/src/repository/deliveryreportpersistence.bal index 8aefe5f..a749900 100644 --- a/src/repository/deliveryreportpersistence.bal +++ b/src/repository/deliveryreportpersistence.bal @@ -86,6 +86,7 @@ public type DeliveryReportPersistence object { log:printError("Error retreiving failed delivery from subID from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); diff --git a/src/repository/hubpersistenceimpl.bal b/src/repository/hubpersistenceimpl.bal index 9846ff2..663f512 100644 --- a/src/repository/hubpersistenceimpl.bal +++ b/src/repository/hubpersistenceimpl.bal @@ -55,6 +55,7 @@ public type HubPersistenceImpl object { callbackParameter, secret, leaseSeconds, createdAt, createdBy, createdDTimes, updatedBy, updatedDTimes); self.handleUpdate(returned, "insert new subs"); } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -86,6 +87,7 @@ public type HubPersistenceImpl object { subscriptionResult = subscriptionDeletedDetails; } } + dbResult.close(); } jdbc:Parameter id = {sqlType: jdbc:TYPE_VARCHAR, value: subscriptionResult.id}; @@ -170,6 +172,7 @@ public type HubPersistenceImpl object { log:printError("Error retreiving subscription details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -198,6 +201,7 @@ public type HubPersistenceImpl object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); diff --git a/src/repository/msgpersistence.bal b/src/repository/msgpersistence.bal index 7d51155..531d492 100644 --- a/src/repository/msgpersistence.bal +++ b/src/repository/msgpersistence.bal @@ -51,6 +51,7 @@ public type MessagePersistenceImpl object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -77,6 +78,7 @@ public type MessagePersistenceImpl object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -122,6 +124,7 @@ public type MessagePersistenceImpl object { log:printError("Error retreiving failed delivery from subID from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -167,6 +170,7 @@ public type MessagePersistenceImpl object { log:printError("Error retreiving unsend messaged from message store: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); diff --git a/src/repository/subscriptionoperations.bal b/src/repository/subscriptionoperations.bal index 8c0cf38..fe77e79 100644 --- a/src/repository/subscriptionoperations.bal +++ b/src/repository/subscriptionoperations.bal @@ -28,6 +28,7 @@ public type SubsOperations object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -55,6 +56,7 @@ public type SubsOperations object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause); @@ -84,6 +86,7 @@ public type SubsOperations object { log:printError("Error retreiving topic registration details from the database: " + errCause); } } + dbResult.close(); } else { string errCause = dbResult.detail()?.message; log:printError("Error retreiving data from the database: " + errCause);