JDBC Registry & Components
Apiman components for JDBC (SQL).
These components are presently optimised for Servlet editions of the gateway, whilst they will work with Vert.x the experience will likely be less performant than normal. |
We ship a range of sample DDLs to get you started for all major databases. In your distribution, look in the apiman/ddls directory, or refer to the Apiman Repo.
|
A gateway registry and components that uses JDBC (i.e. SQL databases, such as PostgreSQL, MySQL, Oracle, etc).
Registry
To set your registry, assign your chosen implementation to:
apiman-gateway.registry=<IMPLEMENTATION>
Implementation | Notes |
---|---|
|
Recommended. Works well in multi-node setups. |
|
Works only in single node setups. |
|
Only recommended for very low volume or test setups; causes database calls to be issued on every request. |
Database Initializer
Of course, there is a database schema that must be installed in your database, which creates the tables and indexes needed.
This schema can be automatically created by apiman the first time it is used.
To enable this feature, you must configure the API Gateway JDBC initializer in apiman.properties
, like so:
Required Parameters
Name | Type | Description |
---|---|---|
|
String |
Initializer type (always JDBC for this use-case)
|
|
String |
Use JDBC initialiser (always for this use-case)
|
|
String |
JNDI location for your data source |
|
String |
Datasource type:
Note, your particular DB version may work successfully with one of these variants. |
Example:
# Initializer for the Gateway JDBC
# ################################
apiman.jdbc.datasource.jndi-location=java:/apiman/datasources/apiman-gateway
apiman-gateway.initializers=jdbc
apiman-gateway.initializers.jdbc=io.apiman.gateway.engine.jdbc.JdbcInitializer
apiman-gateway.initializers.jdbc.datasource.jndi-location=${apiman.jdbc.datasource.jndi-location}
apiman-gateway.initializers.jdbc.datasource.type=postgresql11