Additional datasources howto

This document shows how to configure additional datasources that can be used to configure Simplicité® business objets that points to remote databases.

Tomcat

Context-level configuration

You can manually put additional datasources resources in the deployed META-INF/context.xml (refer to Tomcat documentation for details)

Configuration-level configuration

As of version 3.1 it is possible to configure additional datasources either as environment variables or as system parameters.

For instance, if you configure a MY_PGSQL_DATASOURCE for a PostgreSQL database as:

{
    "driver": "org.postgresql.Driver",
    "username": "<username>",
    "password": "<password>",
    "url": "postgresql://<host>:<port>/<database>"
}

You can then configure a business object with MY_PGSQL_DATASOURCE;[<schema name>.]<table name> in the table name.

Or, for instance, if you configure a MY_MYSQL_DATASOURCE for a MySQL/MariaDB database as:

{
    "driver": "com.mysql.jdbc.Driver",
    "username": "<username>",
    "password": "<password>",
    "url": "mysql://<host>:<port>/<database>?autoReconnect=true"
}

You can then configure a business object with MY_MYSQL_DATASOURCE;[<schema name>.]<table name> in the table name.

Etc for other database vendors.