From 800694de977d86d4033a1de997f5a1b04445a039 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Sat, 18 Mar 2023 08:51:24 +0530 Subject: [PATCH] introduce new datasource for events --- .../conf/datasources/cdm-datasources.xml | 20 ++++++++++++ .../conf/datasources/cdm-datasources.xml.j2 | 31 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml index 78db49688e9..4494b4fcd64 100755 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf/datasources/cdm-datasources.xml @@ -61,5 +61,25 @@ + + EVENT_DB + The datasource used for event storing + + jdbc/EVENT_DB + + + + jdbc:h2:./repository/database/EVENT_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 index e9105a8d3e4..81e6ed97147 100755 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 @@ -83,5 +83,36 @@ + + EVENT_DB + The datasource used for event storing + + jdbc/EVENT_DB + + + + {% if database.device_mgt_event_db is defined %} + {{database.device_mgt_event_db.url}} + {{database.device_mgt_event_db.username}} + {{database.device_mgt_event_db.password}} + {{database.device_mgt_event_db.driver}} + {{database.device_mgt_event_db.validationQuery}} + {% for property_name,property_value in database.device_mgt_event_db.pool_options.items() %} + <{{property_name}}>{{property_value}} + {% endfor %} + {% else %} + jdbc:h2:./repository/database/EVENT_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + {% endif %} + + +