(zos)Use a DB2 database to hold custom user registry data
A custom user registry can use a DB2 database to maintain the user and password information.
However, to maintain the user and password information, you must adhere to the following configuration requirements and restrictions:
- We must use the DB2 Universal Java database connectivity (JDBC) Driver to access the DB2 database used by the custom user registry. Also, the driver must be a type 4 driver.
We cannot use the legacy DB2 for z/OS JDBC Driver or a type 2 DB2 Universal JDBC Driver because both of these drivers use Resource Recovery Services (RRS). If we use these drivers, the custom user registry DB2 server requests interfere with the user application processing under the same thread.
- Because use the DB2 Universal JDBC Driver, do not define any JDBC resources under the server that require the legacy DB2 for z/OS JDBC Driver.
For example, do not define a DB2 for z/OS JDBC Provider (RRS) because the legacy DB2 for z/OS JDBC Driver cannot coexist with the DB2 Universal JDBC Driver.
- We must have an unmanaged DB2 data source or connection used by the custom user registry.
The data source or connection must not rely on any WebSphere Application Server resource management. For example, the data source or connection cannot rely on JNDI lookup, pooling, datastore helpers, XA resource or transaction processing, connection management, and so on.
- To connect a custom user registry to a DB2 database, we can use one of the following approaches:
- Use the Java Platform DriverManager to register an instance of the com.ibm.db2.jcc.DB2Driver class, which is packaged in the DB2 Universal JDBC Driver. Then, invoke the DriverManager to get a DB2 connection using a DB2 Type 4 URL that defines the target DB2 database.
- Use the com.ibm.db2.jcc.DB2DataSource class, which that is packaged in the DB2 Universal JDBC Driver, to set up a data source. Set the data source properties to specify the target DB2 database and other options. Then, get a connection from the data source.
Important: For more information on how to use these approaches, see DB2 UDB for z/OS Version 8 Application Programming Guide and Reference for Java.
Complete the following steps to define the JDBC driver for WebSphere Application Server. Set up the following DB2 JDBC Universal Driver configuration before you define the custom user registry for the WAS for z/OS security component.
- Define the DB2 Universal JDBC Driver in the ws.ext.dirs class path for the servant. To define the driver...in the console:
- Click Servers > Application servers > server_name.
- Under Server Infrastructure, click Java and Process Management > Process definition > Servant.
- Under Additional properties, click Java Virtual Machine.
- Under Additional properties, click Custom properties .
- Click New and define the driver. Create the new property using the following information:
- Property name
- ws.ext.dirs
- Property value
- db2jcc.jar_directory_path/db2jcc.jar:license_jar_directory_path/db2jcc_license_cisuz.jar
- Define the DB2 Universal JDBC Driver in the ext.dirs class path for the controller. To define the driver...in the console:
- Click Servers > Application servers > server_name.
- Under Server Infrastructure, click Java and Process Management > Process definition > Controller.
- Under Additional properties, click Java Virtual Machine.
- Under Additional properties, click Custom properties .
- Click New and define the driver. Create the new property using the following information:
- Property name
- ws.ext.dirs
- Property value
- db2jcc.jar_directory_path/db2jcc.jar:license_jar_directory_path/db2jcc_license_cisuz.jar
- Recycle the server.
Related tasks
Configure stand-alone custom registries Develop stand-alone custom registries