From d8d8bb6f7ee2516ddecb4f9d48e4feaa23311ae1 Mon Sep 17 00:00:00 2001 From: hasuniea Date: Fri, 18 Sep 2015 19:30:21 +0530 Subject: [PATCH] refactored WindowsDAOFactory --- .../device/mgt/mobile/impl/windows/dao/WindowsDAOFactory.java | 4 ---- .../mgt/mobile/impl/windows/util/WindowsPluginConstants.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/WindowsDAOFactory.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/WindowsDAOFactory.java index c3fd864d9c..3c1ba0424b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/WindowsDAOFactory.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/WindowsDAOFactory.java @@ -117,8 +117,6 @@ public class WindowsDAOFactory extends MobileDeviceManagementDAOFactory } } catch (SQLException e) { log.error("Error occurred while committing the transaction", e); - } finally { - closeConnection(); } } @@ -145,8 +143,6 @@ public class WindowsDAOFactory extends MobileDeviceManagementDAOFactory } } catch (SQLException e) { log.warn("Error occurred while roll-backing the transaction", e); - } finally { - closeConnection(); } } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsPluginConstants.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsPluginConstants.java index 05e4f6fe5a..50f8f15c3b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsPluginConstants.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsPluginConstants.java @@ -25,7 +25,7 @@ public class WindowsPluginConstants { //properties related to database table WINDOWS_DEVICE public static final String MOBILE_DEVICE_ID = "MOBILE_DEVICE_ID"; - public static final String CHANNEL_URI = "CHANNEL_URI "; + public static final String CHANNEL_URI = "CHANNEL_URI"; public static final String DEVICE_INFO = "DEVICE_INFO"; public static final String IMEI = "IMEI"; public static final String IMSI = "IMSI";