Install the JDBC Interface

This topic describes how to configure the to work with JDBC (Java Database Connectivity).
gateway
This topic describes how to configure the
API Gateway
to work with JDBC (Java Database Connectivity).
Prerequisites
  • Ensure you have the necessary JDBC client libraries
  • Access to the Gateway as the
    ssgconfig
    and
    root
    users
Installing the Client Libraries
To install the client libraries:
  1. Using SCP or SFTP, copy the appropriate client libraries to the
    API Gateway
    as the
    ssgconfig
    user.
  2. Log in to the Gateway appliance as the
    root
    user.
  3. Change the permissions of the client libraries with the following command:
    # chmod 444 /home/ssgconfig/*.jar
  4. Change the ownership of the client libraries with the following command:
    # chown layer7.layer7 /home/ssgconfig/*.jar
  5. Move the client libraries from:
    /home/ssgconfig
    to:
    /opt/SecureSpan/Gateway/runtime/lib/ext
When this is done, follow the steps mentioned in the white-list the client libraries topic.
White-listing the Client libraries
To white-list the client libraries:
  1. Open the following file in a text editor:
    /opt/SecureSpan/Gateway/node/default/etc/conf/system.properties
  2. Add the following line to the end of the file (these are the supported JDBC drivers by default):
    com.l7tech.server.jdbcDriver=com.mysql.jdbc.Driver\ncom.l7tech.jdbc.mysql.MySQLDriver\ncom.l7tech.jdbc.db2.DB2Driver\ncom.l7tech.jdbc.oracle.OracleDriver\ncom.l7tech.jdbc.sqlserver.SQLServerDriver
  3. Append the following to the end of the previous line:
    \n
    <JDBC driver class>
    Where
    "<JDBC driver class>"
    is the class name string.
  4. Save and exit the file.
  5. Restart the
    API Gateway
    . Enable the client libraries.
Enabling the Client Libraries
To enable the client libraries:
  1. Start the Policy Manager and connect to your Gateway.
  2. Click [
    Add
    ] and then choose
    jdbcConnection.driverClass.defaultList
    from the Key drop-down list.
  3. Review the list of driver classes in the Value box. If yours is not listed, add it as a new line.
  4. Save and exit all the dialogs.
The JDBC interface is enabled when the Gateway is restarted. You can now create JDBC connections and perform JDBC queries. For details, refer to: