Acquiring a connection using the JDBC DriverManager interface

The JDBC DriverManager interface is supported by the JDBC 1.2 driver, the JDBC 2.0 driver, and the DB2 Universal JDBC Driver.

To use this method of acquiring a connection, your Java™ application needs to invoke the DriverManager.getConnection method to specify a default URL or an explicit URL, to connect to a DB2® subsystem. (For more information about default and explicit URLs, see Acquiring a connection to a database.) In a CICS® DB2 environment, you do not need to specify a userid and password on the DriverManager.getConnection request. If you do specify these, they are ignored for DB2 Version 6, but cause an error for DB2 Version 7. The existing CICS DB2 security procedures are used instead.

For more information on using the JDBC DriverManager interface to acquire a connection, and sample code that you can use in your application, see the DB2 Universal Database™ for OS/390® and z/OS® Application Programming Guide and Reference for Java which is appropriate for your version of DB2.

Related tasks
Programming with JDBC and SQLJ in the CICS DB2 environment
Acquiring a connection to a database
Acquiring a connection using the DataSource interface
Committing a unit of work
CICS abends during JDBC or SQLJ requests
Using JDBC and SQLJ in enterprise beans: special considerations
[[ Contents Previous Page | Next Page Index ]]