Configuring the WebSphere application Server data source
Version WebSphere Application Server 7.0.0.x WebSphere Application Server 8.0.0.x
Installed applications use data sources as resources to obtain connection to relational databases. To create these connections between an application and a relational database, WebSphere application Server uses the driver Implementation classes that's encapsulated by the JDBC provider, which is a object that represents Vendor-specific JDB C driver classes to WebSphere application Server. For access to a relational databases, applications with the JDBC drivers and data sources that you configure for WebSphere Application Server.
Procedure
Start the WebSphere Application Server Administrative Console.
Click Security, Global security.
On the Configuration panel, expand Java Authentication and Authorization Service and click j2c authentication Data.
Click New and enter the Alias, User ID and Password.
Click Ok.
On the WebSphere application Server Administrative Console, expand Resources. Expand jdbc then click jdbc Providers.
In the Scope section, choose the Node level from the Drop-down list.
Click New to create a new JDBC driver.
Select, in this order, the Database type, Provider type, implementation type and Name. The Name automatically fills based on the implementation type of you choose.
Click Next and configure the database class path. Click Next.
On the Summary page, click Finish.
Click Save to save your selections. The JDBC Providers page then appears.
On the WebSphere application Server Administrative Console, click Data sources.
Click New to create a new data source. Enter the Data source name and the JNDI name, and choose the authentication alias from the Drop-down list in Component-man Aged authentication alias. The JNDI name should match the DataSourceName value set in wimconfig.xml. By default, it is jdbc/wimds.
Note: For Apache Derby v10.2 embedded databases, leave the Component-managed authentication alias field set to NONE.
Click Next.
Enter the Database name and deselect the checkbox, use this data source in container managed persistence (CMP). Click Next.
On the Summary page, click Finish.
The Data sources page displays. Click Save, and then select the check box for the authentication alias previously created. Click Test Connection. The message should indicate the connection is successful. Ignore any warnings, and then click Next.
Click Environment > WebSphere Variables.
In the Scope section, select cells from the Drop-down list.
Click New to create a variable.
In the Name field, enter VMM_JDBC_CLASSPATH .
In the Value field, enter the complete path to the JDBC driver library files separated by a colon (:) fo R UNIX or Linux or a semicolon (;) for Windows. For example, the path to Linux or UNIX is as follows: /opt/ibm/sqllib/java/db2jcc.jar:/opt/ibm/sqllib/java/db2jcc_lic Ense_cu.jar.
Click OK. Additionally, copy the specified JDBC driver library files in the ${was_home}/lib directory of each installed Web Sphere Application Server node.
Save the configurations, and restart WebSphere application Server.
Configuring the WebSphere application Server data source