You are on page 1of 5

Creating a JDBC Provider

Start the Websphere server and open its admin console:


http://localhost:<port>/ibm/console/. On Admin Console, expand the Resources ->
JDBC section.

Click on JDBC Provider link and a list of current JDBC providers will appears for you.
By default, WAS 6.1 brings only Derby JDBC Provider already setup. We are going to
create a new one for DB2. Select the Scope from Dropdown list and then click on New.

On the new screen, select DB2 in Database type field, DB2 UDB for iSeries (Toolbox)
in Provider Type field and Connection pool data source in Implementation Type field.
After that, click on Next button. On next screen, you must inform the ClassPath of the
JARs files. In my case, I copied the file jt400.jar path C:\Program Files\IBM\Client
Access\jt400\lib directory.
Click on Next and on the next screen click on Finish. The first screen will come up and
then you must click on Save link to commit the information to Websphere.

Creating the DataSource


Go to Data Sources section. Select the Scope from Dropdown list and then click on New.
On the new screen, insert the Data source name & JNDI name.

Data source name : DB2 UDB for iSeries (Toolbox XA) DataSource

The JNDI name is jdbc/testjndi.

On the next screen, select the JDBC Provider previously created.


On the next screen, just enter AS400 server name.

On the next screen, just click on Next and then Finish. To commit the changes, click on
Save link.

To setup a library parameter, click on your Data Source and onto the new screen, click on
Custom properties link.

On Custom properties, click libraries


you must change the value of library to eg: hkdata.

After the changes are done, it is time to test the DataSource. Back to the Data sources
section, check the datasource you want and click on Test connection button. A message
should appears.

The test connection operation for data source DB2 UDB for iSeries (Toolbox XA)
DataSource on server server1 at node PG13Node02 was successful.