Runtime database setup for development mode
IBM MobileFirst™ Platform Foundation uses defaults to access the runtime database, which kind is WRKLGHT by default. When you work in a development environment and use JDBC to connect to a database, you can use a set of property keys to change the settings. You can also use a set of properties to configure Cloudant® as the runtime database.
This method of declaring data sources is deprecated in a production environment and is only suitable when working in a development environment and using JDBC for database connections. To configure data sources when working in a production environment, see Creating and configuring the databases manually.
Property Key | Property Value |
---|---|
wl.db.url | JDBC path to the runtime database. |
wl.db.username | Runtime database user name. Default: Worklight |
wl.db.password | Runtime database password. Default: Worklight |
wl.db.driver | The class that implements a JDBC driver for
each vendor. For example: MySQL: com.mysql.jdbc.Driver Oracle: oracle.jdbc.OracleDriver DB2®: com.ibm.db2.jcc.DB2Driver Derby: org.apache.derby.jdbc.EmbeddedDriver |
wl.reports.db.url(*) | JDBC path to the reports database Default: refers to runtime database. |
wl.reports.db.username(*) | Reports database user name. Default: refers to Worklight database. |
wl.reports.db.password(*) | Reports database password Default: refers to runtime database. |
To configure the MobileFirst project to use Cloudant as the runtime database configure your Cloudant credentials (user name and password). Once these credentials are configured, the server uses Cloudant as the runtime database and not the default JPA.
In addition, you can configure the following properties:
Property Key | Property Value |
---|---|
mfp.db.cloudant.username | The user name of the Cloudant account. |
mfp.db.cloudant.password | The password of the Cloudant account. |
mfp.db.cloudant.url | Optional. The URL of the Cloudant account. |
mfp.db.cloudant.dbNamePrefix | Optional. The prefix that is added to the database name of the MobileFirst runtime. For example, if the value department is assigned to this attribute and the context root of your MobileFirst runtime is /mfp, the database name is department_mfp_runtime_db. Important: This prefix must start with a lowercase letter, and
can contain only lowercase characters (a-z), digits (0-9), and any
of the following characters: _, $ and -.
|
mfp.db.cloudant.connectTimeout | Optional. The timeout to establish a connection, in milliseconds. A value of zero means an infinite timeout. |
mfp.db.cloudant.socketTimeout | Optional. The timeout to wait for a response, in milliseconds. A value of zero means an infinite timeout. |
mfp.db.cloudant.maxConnections | Optional. The maximum number of connections to the database. |
mfp.db.cloudant.proxyHost | Optional. The host name to connect through the proxy. |
mfp.db.cloudant.proxyPort | Optional. The proxy port. |