You can use SQLJ instead of JDBC to make calls to a DB2® database when
deploying 2.x CMP beans. SQLJ is a standard set of programming extensions,
which allows the use of Java™ classes to define SQL types, which
can then be used as columns in tables. It allows you to embed SQL database
statements in a Java program.
To run the SQLJ-based enterprise beans in the WebSphere
® test environment, follow
these instructions:
- Edit the server configuration, and add DB2_install/java/db2jcc.jar to
the class path of the DB2 JDBC provider that you are using.
- Ensure that the data source is configured to use com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper as
the data source helper class
- For DB2 Version
8, fix pack 2 and above, make sure you have the license file.
Follow these tasks in sequence to prepare your EJB applications
to use SQLJ: