Create a JDBC provider
To create a JDBC provider...
- Expand...
Resources | JDBC Providers | Scope
The data source scope level is inherited from the JDBC provider. For example, if we create a JDBC provider at the node level and then create a data source using that JDBC provider, the data source will inherit:
- JDBC provider settings, such as classpath, implementation class, and so on
- JDBC provider scope level
If the scope were set to node-level
- Appservers running on the node would register the data source in their name space.
- The resources.xml file would get updated at the node and appserver level.
- Select New to create a new JDBC provider.
- Use the list boxes to select the type of provider you want to create.
Database type Vendor-specific database type. If the database type is not in the list, select User-defined and consult the vendor documentation for the specific properties that will be required.
Provider type Predefined list of supported provider types, based on the database type you select. Implementation type Implementation types for the provider type you selected. Name Name for this driver. - Click Next.
The settings page for your JDBC database class path appears.
Enter the JDBC provider properties.
Classpath List of paths or JAR file names that together form the location for the resource provider classes. For example, c:\sqllib\java\db2java.zip is the path if the data source connects to DB2. Separate the entries by pressing Enter between each one. Library path Values for the global variable DB2UNIVERSAL_JDBC_DRIVER_PATH, which indicates the classpath jar's location. Native Library Path Optional path to any native libraries. Entries are required if the JBDC provider chosen uses non-Java, or native, libraries. The global variable for this is... DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH
The default settings use environment variables in the path names for the classpath and native library path settings. After you complete the process of defining the data source, if you did not during this process, make sure to update the environment variables used to reflect the proper locations of these files on your system. You can set variables by selecting Environment | WebSphere Variables in the navigation menu.
Refer to 4.1.10, Using variables for more information about WebSphere environment variables.
- After verifying the settings, click Finish. This enables the links to create data sources under the Additional Properties section.
To create one or more data sources for this provider, proceed to 6.2.5, Creating JDBC data source. If you are not ready to create the data source yet, click OK and then save your changes.
To make a data source available on multiple nodes using different directory structures, complete the following steps using the console:
- Define the JDBC provider at the cell scope. Use WebSphere environment variables for the classpath and native path.
- Create the data source that uses this JDBC provider at the cell scope. All files defined at the cell scope are replicated to every node in the cell.
- For the paths to the driver on each node to be unique, use a variable to specify the driver location and have that variable be defined differently on each node.
For example, ${DRIVER_PATH} can be used for the classpath in the provider definition. You can then define a variable called ${DRIVER_PATH} at the cell scope to act as a default driver location. Then you can override that variable on any node by defining ${DRIVER_PATH} at the node scope. The node-level definition takes precedence over the cell-level definition.