Data Population Core Configurations
Core Configurations
The following configuration resources are included in the data population core module at ep-data-population-core/src/main/resources
:
Database Type | Environments | Database-Reset-SQL/ | Database-URL/ |
---|---|---|---|
h2 | Integration testing | h2.sql | h2.properties |
hsql | Integration testing | hsql.sql | hsql.properties |
mysql | Development, on-premise, Amazon RDS, Amazon Aurora | mysql.sql | mysql.properties |
oracle | Development, on-premise, Amazon RDS (Service Name connections) | oracle.sproc | oracle.properties |
postgresql | Development, on-premise, Amazon RDS, Amazon Aurora | postgresql.sproc | postgresql.properties |
Database-Reset-SQL
These are the corresponding SQL (Structured Query Language) files that will reset the database. Any changes made to the database will be lost.
Database Types
The database type determines the configuration files being used. The database type can be explicitly specified using the data.population.database.type
property in environment-specific database.properties
files. If the type is not specified in the database.properties
file, the name of the JDBC driver class determines the configuration type.
For example, oracle.jdbc.driver.OracleDriver
has a database type of oracle
.
The following resource-location.xml
file at commerce-engine/data-population/ep-data-population-core/src/main/resources/META-INF/spring/
provides details of the supported configurations:
<util:list id="candidateDatabaseTypes" list-class="java.util.ArrayList" value-type="java.lang.String">
<value>mysql</value>
<value>oracle</value>
<value>hsql</value>
<value>h2</value>
<value>postgresql</value>
</util:list>
If an exact match between the database type and configuration files without the file suffix is not found, the database type is truncated on the final -
character and the lookup is attempted again. This is repeated until a match is found or no further truncation is possible. For example,
- A database type of
oracle
returnsoracle.properties
andoracle.sproc
- A database type of
oracle-service
returnsoracle-service.properties
andoracle.sproc