From 2fe3f14b55430ba2fcf7231ab4605b5cde12433d Mon Sep 17 00:00:00 2001 From: charithag Date: Sat, 12 Sep 2015 02:21:14 +0530 Subject: [PATCH] Fix for new exception occured with latest CDMF changes --- .../src/repository/jaggeryapps/iotserver/modules/device.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js index ae25e845..195bba88 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js @@ -138,7 +138,9 @@ deviceModule = function () { * @returns {Array} */ publicMethods.listDeviceTypes = function () { + deviceManagementDAOFactory.openConnection(); var deviceTypes = deviceManagementDAOFactory.getDeviceTypeDAO().getDeviceTypes(); + deviceManagementDAOFactory.closeConnection(); var deviceTypesList = []; var i, deviceType, deviceTypeObject; for (i = 0; i < deviceTypes.size(); i++) {