From 5c94abbb40be6b7caac8822b1f22aa263e3fc242 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Mon, 13 May 2024 13:34:49 +0100 Subject: [PATCH] feat: stabilize Database Initialization - MEED-6794 - Meeds-io/MIPs#132 Prior to this change, Portal database changelogs are processed late in the startup using PortalCotnainer. This change makes sure to initialize the database using RootContainer to make sure that the Database initialization is made before any other service startup. --- .../src/main/resources/conf/configuration.xml | 13 +++- .../src/main/resources/conf/configuration.xml | 59 ++++++++++++++++ .../src/main/resources/conf/configuration.xml | 42 ++++++++++++ .../src/main/resources/conf/configuration.xml | 43 +++++++++++- .../WEB-INF/conf/jdbc/configuration.xml | 68 ------------------- 5 files changed, 153 insertions(+), 72 deletions(-) create mode 100644 component/identity/src/main/resources/conf/configuration.xml create mode 100644 component/portal/src/main/resources/conf/configuration.xml diff --git a/component/common/src/main/resources/conf/configuration.xml b/component/common/src/main/resources/conf/configuration.xml index 924ff7356d..20b21c4a46 100644 --- a/component/common/src/main/resources/conf/configuration.xml +++ b/component/common/src/main/resources/conf/configuration.xml @@ -78,6 +78,17 @@ + + SettingsChangeLogsPlugin + addChangeLogsPlugin + org.exoplatform.commons.persistence.impl.ChangeLogsPlugin + + + changelogs + Change logs of settings + db/changelog/settings.db.changelog-1.0.0.xml + + + - diff --git a/component/identity/src/main/resources/conf/configuration.xml b/component/identity/src/main/resources/conf/configuration.xml new file mode 100644 index 0000000000..791b0607ec --- /dev/null +++ b/component/identity/src/main/resources/conf/configuration.xml @@ -0,0 +1,59 @@ + + + + + org.exoplatform.commons.api.persistence.DataInitializer + + IDMChangeLogsPlugin + addChangeLogsPlugin + org.exoplatform.commons.persistence.impl.ChangeLogsPlugin + + + changelogs + Change logs of idm queue + db/changelog/idm.queue.db.changelog-1.0.0.xml + + + + + IDMChangeLogsPlugin + addChangeLogsPlugin + org.exoplatform.commons.persistence.impl.ChangeLogsPlugin + + + datasource + Change logs of IDM database + ${exo.idm.datasource.name:java:/comp/env/exo-idm_portal} + + + changelogs + Change logs of IDM database + db/changelog/idm.db.changelog-1.0.0.xml + + + + + diff --git a/component/portal/src/main/resources/conf/configuration.xml b/component/portal/src/main/resources/conf/configuration.xml new file mode 100644 index 0000000000..a60d4dd1a8 --- /dev/null +++ b/component/portal/src/main/resources/conf/configuration.xml @@ -0,0 +1,42 @@ + + + + + org.exoplatform.commons.api.persistence.DataInitializer + + PortalRDBMSChangeLogsPlugin + addChangeLogsPlugin + org.exoplatform.commons.persistence.impl.ChangeLogsPlugin + + + changelogs + Change logs of Portal RDBMS + db/changelog/portal-rdbms.db.changelog-1.0.0.xml + + + + + diff --git a/component/web/security/src/main/resources/conf/configuration.xml b/component/web/security/src/main/resources/conf/configuration.xml index cc701cebc5..80e2e14351 100644 --- a/component/web/security/src/main/resources/conf/configuration.xml +++ b/component/web/security/src/main/resources/conf/configuration.xml @@ -1,7 +1,29 @@ + + + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd" + xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"> @@ -9,4 +31,19 @@ org.exoplatform.web.security.security.SecureRandomService + + org.exoplatform.commons.api.persistence.DataInitializer + + PortalRDBMSChangeLogsPlugin + addChangeLogsPlugin + org.exoplatform.commons.persistence.impl.ChangeLogsPlugin + + + changelogs + Change logs of Portal RDBMS + db/changelog/gatein-token.db.changelog-1.0.0.xml + + + + diff --git a/web/portal/src/main/webapp/WEB-INF/conf/jdbc/configuration.xml b/web/portal/src/main/webapp/WEB-INF/conf/jdbc/configuration.xml index 9341b112b3..c2dc6672e7 100644 --- a/web/portal/src/main/webapp/WEB-INF/conf/jdbc/configuration.xml +++ b/web/portal/src/main/webapp/WEB-INF/conf/jdbc/configuration.xml @@ -149,74 +149,6 @@ org.exoplatform.portal.mop.service.DescriptionService org.exoplatform.portal.mop.service.DescriptionServiceImpl - - org.exoplatform.commons.api.persistence.DataInitializer - - PortalRDBMSChangeLogsPlugin - addChangeLogsPlugin - org.exoplatform.commons.persistence.impl.ChangeLogsPlugin - - - changelogs - Change logs of Portal RDBMS - db/changelog/portal-rdbms.db.changelog-1.0.0.xml - - - - - IDMQueueChangeLogsPlugin - addChangeLogsPlugin - org.exoplatform.commons.persistence.impl.ChangeLogsPlugin - - - changelogs - Change logs of idm queue - db/changelog/idm.queue.db.changelog-1.0.0.xml - - - - - IDMChangeLogsPlugin - addChangeLogsPlugin - org.exoplatform.commons.persistence.impl.ChangeLogsPlugin - - - datasource - Change logs of IDM database - ${exo.idm.datasource.name:java:/comp/env/exo-idm_portal} - - - changelogs - Change logs of idm queue - db/changelog/idm.db.changelog-1.0.0.xml - - - - - PortalRDBMSChangeLogsPlugin - addChangeLogsPlugin - org.exoplatform.commons.persistence.impl.ChangeLogsPlugin - - - changelogs - Change logs of Portal RDBMS - db/changelog/gatein-token.db.changelog-1.0.0.xml - - - - - SettingsChangeLogsPlugin - addChangeLogsPlugin - org.exoplatform.commons.persistence.impl.ChangeLogsPlugin - - - changelogs - Change logs of settings - db/changelog/settings.db.changelog-1.0.0.xml - - - - org.exoplatform.services.listener.ListenerService