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 thessgconfigandrootusers
Installing the Client Libraries
To install the client libraries:
- Using SCP or SFTP, copy the appropriate client libraries to theAPI Gatewayas thessgconfiguser.
- Log in to the Gateway appliance as therootuser.
- Change the permissions of the client libraries with the following command:# chmod 444 /home/ssgconfig/*.jar
- Change the ownership of the client libraries with the following command:# chown layer7.layer7 /home/ssgconfig/*.jar
- Move the client libraries from:/home/ssgconfigto:/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:
- Open the following file in a text editor:/opt/SecureSpan/Gateway/node/default/etc/conf/system.properties
- 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
- Append the following to the end of the previous line:\n<JDBC driver class>Where"<JDBC driver class>"is the class name string.
- Save and exit the file.
- Restart theAPI Gateway. Enable the client libraries.
Enabling the Client Libraries
To enable the client libraries:
- Start the Policy Manager and connect to your Gateway.
- Run the Manage Cluster-Wide Properties task.
- Click [Add] and then choosejdbcConnection.driverClass.defaultListfrom the Key drop-down list.
- Review the list of driver classes in the Value box. If yours is not listed, add it as a new line.
- 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: