In MMC versions 3.4.1 and earlier, the configuration for persisting environment data on an external database is stored in the following files:
These files store connection parameters to the external database such as username, password, etc. You will need to adapt these parameters to the new config files, so ensure that you keep a copy of these files before removing your current MMC installation.
Also, for safety, back up your current MMC installation’s mmc-data
directory, which is under the root directory of your Web application server.
After you downloaded and expanded the .war file for 3.5.0, enter your MMC 3.5.0 home directory (the root directory of the expanded .war) and locate the following directory: <MMC_HOME>/WEB-INF/classes/META-INF/databases
. This directory stores configuration files for database persistence. These files are named in the format: <type of data>-<database name>.properties
, where:
-
type of data
= mmc
for environment data, or tracking-persistence
for transaction data
-
database name
= name of the database server to use, for example postgres
For example, the file mmc-oracle.properties
stores properties for connecting to an Oracle database that stores environment data; the file tracking-persistence-postgres.properties
stores properties for connecting to a Postgres database that stores tracking data, etc.
These files define the parameters for connecting to the database: driver, user, password, host, port, and others.
To migrate the configuration for persisting environment data, complete these steps:
-
In MMC 3.5.0, locate the relevant mmc-<database>.properties
file according to the database you wish to connect to, and open it for editing.
-
In old your old MMC installation, open the file mmc.properties
to extract the relevant parameters and values.
-
Using the parameters and values from the old mmc.properties
file, modify the relevant mmc-<database>.properties
file in 3.5.0, migrating the values to the new config format according to the table below.
Parameter name in old MMC version |
Parameter name in MMC 3.5.0 |
Notes |
datasource.username
|
env.username
|
|
datasource.password
|
env.password
|
|
datasource.url
|
env.host
|
From the value of datasource.url , extract the host where your database server resides, and assign it as the value of env.host in the database config file in 3.5.0.
For example, if your database resides at host dbserver , from datasource.url=jdbc:mysql://dbserver/mmc_persistency_status extract dbserver to env.host=dbserver in the 3.5.0 config file.
|
datasource.url
|
env.port
|
From the value of datasource.url , extract the port on which your database server is listening, and assign it as the value of env.port in the database config file in 3.5.0.
For example, if your database resides at host dbserver port 9155, from datasource.url=jdbc:mysql://dbserver:9155/mmc_persistency_status extract 9155 to env.port=9155 in the 3.5.0 config file.
Note that if the port number is not present in the URL, it probably means that the default port for the database server is being used, for example 1521 for Oracle, 3306 for MySQL, etc.
|
datasource.url
|
env.servicename (Oracle only.)
|
From the value of datasource.url , extract the Oracle service name for your connection, and assign it as the value of env.servicename in the database config file in 3.5.0.
For example, if the value of datasource.url in the old MMC installation is jdbc\:oracle\:thin\:MMC_STATUS/mmc123@dbserver \:1521 \:xe , then the service name is xe . Assign it in the new config file with the parameter env.servicename=xe .
|
-
In the jackrabbit-repo.xml
file from your old MMC installation, locate the definitions of the workspace name and the default workspace name. You can find them in the following section:
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="mmcworkspace"/>
<!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
<Workspace name="mmcworkspace">
In the example above, both the workspace name and the default workspace name are mmcworskpace
.
-
In MMC 3.5.0, go to the <MMC_HOME>/WEB-INF/classes/META-INF/jackrabbit
directory, then locate the jackrabbit-repo file relevant for your database, for example jackrabbit-repo-postgres.xml
if persisting data on Postgres. Open the file for editing.
-
Find the workspace name declaration in the 3.5.0 jackrabbit-repo file, and ensure that the workspace name and the default workspace name coincide between your old MMC version and MMC 3.5.0.
-
Check that the values of all schemaObjectPrefix
declarations in the jackrabbit-repo file for MMC 3.5.0 follow the values declared in the jackrabbit-repo file of your old MMC installation. For example, if your old MMC jackrabbit-repo file contains the following:
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="schemaObjectPrefix" value="ws1_"/>
and the relevant declaration in the 3.5.0 jackrabbit-repo file reads:
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="schemaObjectPrefix" value="workspace_"/>
then modify the 3.5.0 jackrabbit-repo file to read exactly as the old jackrabbit-repo file – in this case, in 3.5.0 change the value of schemaObjectPrefix
to ws1_
. Be sure to repeat this operation for all schemaObjectPrefix
declarations in the files.
-
Save and close the 3.5.0 jackrabbit-repo file.
-
In MMC 3.5.0, locate the file <MMC_HOME>/WEB-INF/web.xml
and open it for editing.
-
In the web.xml
file, locate the section shown below.
<context-param>
<param-name>spring.profiles.active</param-name>
<param-value>tracking-h2,env-derby</param-value>
</context-param>
-
Replace the string env-derby
with env-<database_name>
. For example, if persisting data on postgres, replace it with env-postgres
.
-
After completing the above steps, you can remove your old MMC installation by deleting its home directory in the root directory of your Web app server. However, it is recommended that you keep the backup copies of the old database configuration files until you ensure that MMC 3.5.0 connects properly to the database.
|
If needed, ensure that you have copied the Quartz drivers from your older version of the MMC WAR file to the new MMC WAR file. A WAR file is a zip file that you can open with a zip file tool such as 7-Zip in Windows or the Mac’s built in Archive Utility. In the current MMC distribution, the war file is in this tree:
|
mmc-distribution-mule-console-bundle-3.7.0
mmc-3.7.0
apache-tomcat-7.0.52
webapps
mmc-3.7.0.war
The Quartz drivers reside in the unzipped WAR file’s WEB-INF
> classes
> quartz
folder.
After you have completed configuration, start MMC 3.5.0.