From 78cc3b00703681c3ea2c612bf7b32e8cd7d1e5e6 Mon Sep 17 00:00:00 2001 From: Geeth Munasinghe Date: Tue, 16 Dec 2014 18:13:06 +0530 Subject: [PATCH] Removing white spaces from the policy management and making data time fileds long --- .../core/internal/PolicyManagementServiceComponent.java | 7 ++----- .../distribution/src/repository/dbscripts/cdm/h2.sql | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java index d349bc362d..6698e3373b 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/internal/PolicyManagementServiceComponent.java @@ -41,17 +41,14 @@ public class PolicyManagementServiceComponent { protected void activate(ComponentContext componentContext) { try { - PolicyConfigurationManager.getInstance().initConfig(); - PolicyManagementConfig config = PolicyConfigurationManager.getInstance().getDeviceManagementConfig(); - DataSourceConfig dsConfig = config.getPolicyManagementRepository().getDataSourceConfig(); PolicyManagementDAOFactory.init(dsConfig); - } catch (Throwable t) { - + String msg = "Error occurred while initializing the Policy management core."; + log.error(msg, t); } } diff --git a/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql b/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql index 94e01ca15c..29f5b3075f 100644 --- a/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql +++ b/product/modules/distribution/src/repository/dbscripts/cdm/h2.sql @@ -10,8 +10,8 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE ID VARCHAR(20) NOT NULL, DESCRIPTION TEXT NULL DEFAULT NULL, NAME VARCHAR(100) NULL DEFAULT NULL, - DATE_OF_ENROLLMENT DATETIME NULL DEFAULT NULL, - DATE_OF_LAST_UPDATE DATETIME NULL DEFAULT NULL, + DATE_OF_ENROLLMENT BIGINT NULL DEFAULT NULL, + DATE_OF_LAST_UPDATE BIGINT NULL DEFAULT NULL, OWNERSHIP VARCHAR(45) NULL DEFAULT NULL, STATUS VARCHAR(15) NULL DEFAULT NULL, DEVICE_TYPE_ID INT(11) NULL DEFAULT NULL,