要在WAS中配JDBC Driver 和 datasource.
JDBC driver path
Select Environment (left side) and Managed WebSphere Variables.
Select DB2 JDBC DRIVER PATH.
Verify or enter the directory of the db2java.zip file (c:\SQLLIB\java).
Click OK.
Chapter 18. Deploying enterprise applications 619
JDBC driver
Select Resources (left side) and select JDBC Providers.
Select Node (should be preselected)
Click New (under JDBC Providers):
– Select DB2 JDBC Provider from the pull-down and click Apply.
– All the defaults should be fine. Check that the implementation class is
COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource. Note that the classpath
entry points to ${DB2_JDBC_DRIVER_PATH}/db2java.zip (Figure 18-11).
– Click Apply.
Data source
Under Additional Properties select Data Sources.
– Click New (Figure 18-12).
– Enter EJBBANK as name and jdbc/ejbbank as JNDI name (to match what
we defined in the EJB deployment descriptor).
620 WebSphere Studio Application Developer Version 5 Programming Guide
– Select Use this Data Source in container-managed persistence (CMP).
– The data source helper class should be filled in as
com.ibm.websphere.rsadapter.DB2DataStoreHelper.
– Click Apply.