Configuring a Data Source Connection in the Application Configuration File

To configure a data source configuration for your application using the Delinea JDBC Proxy Driver, you must provide the following information in the application configuration file in WebSphere Application Server:

  • The JNDI name of the Delinea JDBC Proxy Driver

  • The JNDI name of the native driver for your database server.

  • The ID of the secret in Secret Server that stores the database credentials.

The following procedure describes how to provide this information in the application configuration file.

To configure a data source connection in the application configuration file:

  1. Go to the folder where your installation application is located in WebSphere Application Server, for example, C:\ProgramFiles\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\WebSphereServerNode01Cell.
  2. Open the application configuration file.

    The application configuration file name extension can vary. It can be a file with the * .txt, *.xml, *. properties, or *.config extension.

  3. Do one of the following in the configuration file depending on whether your application uses a JTA or non-JTA data source:

    Make the following changes for a non-JTA data source:

    • non-jta-data-source: Replace the current data source value with the JNDI name of the Deline JDBC Proxy Driver jdbc/delinea.

    • jdbc.user: Add this property to the configuration file and set it to the JNDI name of the native driver.

    • jdbc.password: Add this property to the configuration file and set it to the secret ID in Secret Server.

    See Example: Configuring a Non-JTA Data Source Connection for an example of how to modify the configuration file to configure a non-JTA data source connection.

    Make the following changes for a JTA data source:

    • jta-data-source: Replace the current data source value with the JNDI name of the Deline JDBC Proxy Driver jdbc/delinea.

    • jdbc.user: Add this property to the configuration file and set it to the JNDI name of the native driver.

    • jbc.password: Add this property to the configuration file and set it to the secret ID in Secret Server.

    See Example: Configuring a JTA Data Source Connection for an example of how to modify the configuration file to configure a JTA data source connection.

  4. Save the changes in the file and restart your application.

Example: Configuring a Non-JTA Data Source Connection

This section contains an example of the application configuration file (persistence.xml) that defines two native non-JTA data sources: dbc/book and jdbc/student. This example shows how to modify the configuration file to configure a non-JTA data-source connection, using the Delinea JDBC Proxy Driver. 

The configuration file looks like the following:

alt

Modify the configuration file so that it looks like the following:

alt

  • non-jta-data-source: Replace jdbc/book and jdbc/student with jdbc/delinea.
  • javax.persistence.jdbc.user: Add this property to the configuration file for each data source and set it to the native driver JNDI name jdbc/book or jdbc/student respectively.
  • javax.persistence.jdbc.password: Add this property to the configuration file for each data source and set it to secret ID 5469 for jdbc/book and to secret ID 3862 for jdbc/student.

Example: Configuring a JTA Data Source Connection

This section contains an example of the application configuration file (persistence.xml) that defines two native JTA data sources: jdbc/mysqlstudentbookjsp and jdbc/mysqlstudentbookjpa. This example shows how to modify the configuration file to configure a JTA data-source connection, using the Delinea JDBC Proxy Driver.

The configuration file looks like the following:

Modify the configuration file so that it looks like the following:

  • jta-data-source: Replace jdbc/mysqlstudentbookjsp and jdbc/mysqlstudentbookjpa with jdbc/delinea.
  • javax.persistence.jdbc.user: Add this property to the configuration file for each data source and set it to the native driver JNDI name jdbc/mysqlstudentbookjsp or jdbc/mysqlstudentbookjpa respectively.
  • javax.persistence.jdbc.password: Add this property to the configuration file for each data source and set it to secret ID 10382 for jdbc/mysqlstudentbookjsp and to secret ID 5843 for jdbc/mysqlstudentbookjpa.