Creating and deploying custom database drivers
Custom database drivers provide JDBC connectivity for database vendors that are not supported by default in Infor ION.
This section describes how to create and deploy a custom database driver for use with Infor ION when the required database vendor is not supported by default.
Custom database drivers are deployed using the Custom Database Driver Wrapper.
The wrapper packages the database driver as an OSGi bundle that can be uploaded to ION.
Before you deploy a custom database driver, ensure that these requirements are met:
- The database supports JDBC connectivity.
- A JDBC driver JAR file is available.
- Multiple JAR files are not supported. If the driver consists of multiple JAR files, merge the files into one flattened JAR file.
- A supported Java Development Kit (JDK) is installed on the system where you run the wrapper.
- A Java Runtime Environment (JRE) is not sufficient.
- You have access to ION Desk with permissions to configure ION Service.
Understanding custom database drivers
A custom database driver extends ION database connectivity for a database type that is not supported by default in ION.
The custom database driver is based on a JDBC driver JAR file and is deployed as an OSGi bundle.
The Custom Database Driver Wrapper creates the deployment bundle that is uploaded to ION.
After deployment, the custom database driver is available for supported JDBC application connection points and database connection points.
Preparing a single (flattened) database driver JAR
To create a flattened database driver JAR:
Use this flattened JAR file in the subsequent steps.
Downloading the Custom Database Driver Wrapper
To download the wrapper:
- Navigate to Enterprise Connector management pages.
- Open Custom Database Drivers.
- Click .
- Save the file as BundleWrapper.zip.
Extracting the Bundle Wrapper
To extract the wrapper:
- Extract the contents of BundleWrapper.zip.
- Extract the file to C:\temp\BundleWrapper.
- If a different location is used, this location must be reflected in the
InstallPathproperty.
Adding the database driver JAR
To add the driver:
- Copy the database driver JAR file to BundleWrapper\OriginalJar.
- Ensure that only one JAR file is present in this directory.
Configuring driver properties
The behavior and identification of the custom database driver are defined in the properties.txt file.
To configure the properties:
Required properties
These properties must be specified:
-
InstallPathAbsolute path where the BundleWrapper directory is extracted.
- This path must match the
localRepositoryproperty in BundleWrapper\build\settings.xml.
- This path must match the
-
OriginalJarName of the database driver JAR file located in the OriginalJar directory.
-
BundleSymbolicNameUnique identifier for the bundle, following the reverse domain name convention.
-
BundleVersionVersion of the OSGi bundle.
- Use the database driver version.
-
BundleNameHuman-readable name of the bundle.
-
BundleDescriptionDescription of the database driver.
-
SpringDriverClassNameFully qualified class name of the database driver.
-
SpringTypeNameName of the database type as it appears in ION Desk.
- This name must not match any standard database type that is supported by ION.
- For Oracle custom drivers used with AnySQL Modeler, the name must start with
ORACLE_.
Advanced properties
-
SpringReturnAutoGeneratedKeysSet this value to true if the database does not permit explicit selection of columns to be returned for insert statements.
In this case, the database automatically determines which generated key to return.
The default value is false.
-
SpringWrapAsLobSet this value to true if the database driver requires explicit Blob or Clob wrapping, such as PostgreSQL.
The default value is false.
-
SpringStreamAsLobSet this value to true for JDBC 4.0 operations.
The default value is false.
-
SpringOracleLobHandlerThis handler is used by Oracle drivers only.
The default value is false.
-
SpringUrlRegularExpressionOptionally specify a regular expression if the URL used to connect to the database must meet specific requirements.
-
SpringDataDefinitionInLowerCaseOptionally set to true if the DDL (data definition language) is lowercase or for a case-sensitive database.
- If the DDL is lowercase and
SpringReturnAutoGeneratedKeysis false, the auto index for columnC_IDusesc_id.
- If the DDL is lowercase and
&, <, >, ', and " in SQL statements. Use escaped equivalents instead.
Polling query properties
-
SpringJdbcUnprocessedPollingEntriesSqlIf the database type is configured for an application connection point, specify the query that selects new messages from the outbox.
- For database connection points, the query is not used.
- Use these placeholders in the query:
?1replaces the placeholder with the state:0= unprocessed1= processed
?2replaces the placeholder with the number of rows to retrieve.
- The
*character in the SELECT clause is replaced with theC_WAS_PROCESSEDcolumn name when status information is retrieved. - The
?1placeholder is replaced by0. - The
?2placeholder is replaced by1. - The query must always contain the
*character in the SELECT clause.
-
SpringJdbcUnprocessedEntriesByTenantSqlIf the database type is configured for an application connection point, specify the query that selects new messages from the outbox based on the tenant.
- For database connection points, the query is not used.
- Use these placeholders in the query:
?1replaces the placeholder with the state:0= unprocessed1= processed
?2replaces the placeholder with the number of rows to retrieve.
- The
*character in the SELECT clause is replaced with theC_WAS_PROCESSEDcolumn name when status information is retrieved. - The
?1placeholder is replaced by0. - The
?2placeholder is replaced by1. - The query must always contain the
*character in the SELECT clause.
-
SpringJdbcUnprocessedEntriesByTenantAndLogicalIdSqlIf the database type is configured for an application connection point, specify the query that selects new messages from the outbox based on the tenant and Logical ID.
- For database connection points, the query is not used.
- Use these placeholders in the query:
?1replaces the placeholder with the state:0= unprocessed1= processed
?2replaces the placeholder with the number of rows to retrieve.
- The
*character in the SELECT clause is replaced with theC_WAS_PROCESSEDcolumn name when status information is retrieved. - The
?1placeholder is replaced by0. - The
?2placeholder is replaced by1. - The query must always contain the
*character in the SELECT clause.
Connection test properties
-
SpringJdbcConnectionTestSqlSpecify the query that tests the connection to the required inbox and outbox tables in the database through an application connection point.
- Use these placeholders in the query:
?1replaces the placeholder with the required column names.?2replaces the placeholder with the required table names.?3replaces the placeholder with the number of rows to retrieve.
- Use these placeholders in the query:
-
SpringDatabaseConnectionTestSqlSpecify the query that tests a database connection point.
The query validates whether ION can connect to the database.
Building the custom database driver bundle
After you configure the properties, generate the deployment bundle.
This ZIP file contains the OSGi bundle that is required by ION.
Uploading the custom database driver to ION
To upload the custom database driver:
- Navigate to Enterprise Connector management pages.
- Open Custom Database Drivers.
- Click .
- Upload the generated ZIP file.
- Confirm that the driver appears in the list of custom database drivers.
Using the custom database driver in a connection point
After the driver is uploaded, it can be used in these connection points:
- Application connection points of type JDBC
- Database connection points
To use the custom driver:
If ION Desk was open when the driver was deployed, refresh the browser to make the new database type visible.
Limitations
- Database connection points of type AnySQL Modeler support Oracle custom drivers only.
- Multiple database driver JAR files are not supported unless merged into one flattened JAR.