Here are the steps for creating a Data Source on Tomcat:
- In Tomcat's context.xml file (/conf/context.xml), add a line similar to the following:
- In Tomcat's server.xml file (/conf/server.xml, add the following XML snippet to the node:
validationQuery="select * from qauser.employee"
- In Tomcat's common/lib directory, add the JDBC driver JARs (for DB2 v8.x or 9.x, these are db2jcc.jar, db2jcc_license_cu.jar, and
db2jcc_license_cisuz.jar). If connecting to DB2 v7, use the db2java.jar driver instead.
You actually only need one of those license JARs. The "cu" JAR is for windows, the "cisuz" JAR is for UNIX, etc.