In MMC versions 3.4.1 and earlier, the configuration for persisting transaction data (Business Events) on an external database is stored in the following files:
-
<MMC_HOME>/WEB-INF/classes/META-INF/persistence.xml
-
<MMC_HOME>/WEB-INF/classes/mmc-persistence.properties
(if present on your installation)
-
<MMC_HOME>/WEB-INF/classes/META-INF/applicationContext-tracking.xml
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.6.0, enter your MMC 3.6.0 home directory 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 tracking data, complete these steps:
-
In your old MMC installation, open the file applicationContext-tracking.xml
, then locate the bean dataSource
, shown below.
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:xe" />
<property name="username" value="TRACKER" />
<property name="password" value="tracker" />
</bean>
You will migrate the values in the code above to the database config files in MMC 3.6.0.
|
Depending on the configuration in your old MMC installation, some of the values displayed in the code above may actually reside in persistence.xml or mmc-persistence.properties .
. In MMC 3.6.0, locate the relevant tracking-persistence-<database>.properties file according to the database you wish to connect to, and open it for editing.
. Using the parameters and values from your old MMC installation, modify the relevant mmc-<database>.properties file in MMC 3.6.0, migrating the values to the new config format according to the table below.
|
Parameter name in old MMC versions |
Parameter name in 3.6.0 |
Notes |
username
|
mmc.tracking.db.username
|
|
password
|
mmc.tracking.db.password
|
|
url
|
mmc.tracking.db.host
|
From the value of url , extract the host where your database server resides, and assign it as the value of mmc.tracking.db.host in the database config file in 3.6.0.
For example, if your database resides at host dbserver , from datasource.url=jdbc:mysql://dbserver/mmc_persistency_status extract dbserver to mmc.tracking.db.host=dbserver in the 3.6.0 config file.
|
url
|
mmc.tracking.db.port
|
From the value of url , extract the port on which your database server is listening, and assign it as the value of mmc.tracking.db.port in the database config file in 3.6.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 mmc.tracking.db.port=9155 in the 3.6.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.
|
url
|
mmc.tracking.db.servicename
|
From the value of url , extract the Oracle service name for your connection, and assign it as the value of mmc.tracking.db.servicename in the database config file in 3.6.0
For example, if the value of url in your 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 MMC 3.6.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 tracking-h2
with tracking-<database_name>
. For example, if persisting data on postgres, replace it with tracking-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.6.0 connects properly to the database.
|
The exact configuration details in your old MMC installation may vary. Before deleting your old MMC installation, make complete backups of all relevant config files. Bear in mind that aside from the database connection parameters listed in this page, a custom configuration may contain additional parameters not listed here, which you will also need to migrate to the new configuration.
|
After you have completed configuration, start MMC 3.6.0.