Enabling JDBC connections to the databases

Configure connections to a database through a JDBCProvider configurable service.

About this task

Use a JDBC connection from Java™ programs that are associated with a JavaCompute node or a user-defined node that is written in Java.

You must also set up JDBC connections if your message flows include graphical data maps with one or more database transforms to be run from a Mapping node, or if they include DatabaseRetrieve or DatabaseRoute nodes.

If you configure a JDBC type 4 connection from an application running on a Linux®, UNIX, or Windows system, you can configure your integration node and queue manager to include interactions with the databases in globally-coordinated transactions. On z/OS®, JDBC connections can be coordinated only by the integration node.

The information provided in this section is independent of whether your operating systems, integration nodes, integration servers, queue managers, and databases operate in 32-bit or 64-bit mode, except where stated.

When you write Java classes for a JavaCompute node or a user-defined node, your code must comply with the following restrictions:

  • Do not include any code that performs a COMMIT or a ROLLBACK function.
  • Do not close the connection to the database. The integration node manages all connections, and closes a connection if it is idle for approximately one minute, or if the message flow completes.

To configure JDBC type 4 connections:

Procedure

  1. Set up your JDBC provider definition.
  2. Optional: Set up security.
  3. Optional: Configure for global-coordination of transactions.
  4. Optional: If your integration node is running on a Windows system, authorize access to JDBCProvider resources.

What to do next

If you have been following the instructions in Working with databases or Mapping database content, the next task is Setting up a JDBC provider for type 4 connections.

When you have completed configuration of the databases, add or modify Java code in your JavaCompute or user-defined nodes to access the database that is identified in the JDBCProvider configurable service.