As of TdRedux 1.20, IBM WebSphere 4.0 testing is performed as part of release test suite. The tests are based on a modified version of the sample code from the Enterprise JavaBeans, 3rd Ed., Richard Monson-Haefel, O'Reilly & Assoc. TdRedux can support both bean-managed persistence (BMP) and container managed persistence (CMP). The latter poses some important issues for application developers, which will be discussed below.
To setup IBM WebSphere to support the TdRedux JDBC driver, you must first update the server's CLASSPATH to include the path to the Jakarta ORO regular expression package via the Adminstrators Console Nodes-><nodename>->Application Servers->Default Server->Process Definition->JVM Settings form.
You then need to update the server's
resource-provider-templates.xml file, located in the config
directory. With WebSphere stopped, add the following text to the bottom of this XML file:
<!-- TdRedux Driver Templates --> <resources:JDBCDriver xmi:type="resources:JDBCDriver" xmi:id="resprovider_template_TdRedux" name="TdRedux JDBC Driver" description="TdRedux JDBC Driver" implementationClassName="com.presicient.tdredux.ConnectionPoolDataSource"> <factories xmi:type="resources:DataSource" xmi:id="resfactory_template_TdRedux" name="" jndiName="jdbc/{Datasource JNDI Name}" description="a New TdRedux Datasource" category="" jtaEnabled="false" minimumPoolSize="1" maximumPoolSize="10" connectionTimeout="180" idleTimeout="1800" orphanTimeout="1800"> <propertySet xmi:id="J2EEResourcePropertySet_TdRedux.1"> <resourceProperties xmi:id="res_prop_template_TdRedux.1" name="serverName" type="java.lang.String" value="localhost" description="The name of the server where Teradata resides, such as 'localhost'"/> <resourceProperties xmi:id="res_prop_template_TdRedux.2" name="port" type="java.lang.String" value="1025" description="The TCP/IP port Teradata uses for communication. By default, Teradata uses port 1025."/> <resourceProperties xmi:id="res_prop_template_TdRedux.3" name="databaseName" type="java.lang.String" value="" description="Default logon database."/> <resourceProperties xmi:id="res_prop_template_TdRedux.4" name="sessmode" type="java.lang.String" value="ANSI" description="Default logon session mode."/> <resourceProperties xmi:id="res_prop_template_TdRedux.5" name="partition" type="java.lang.String" value="DBC/SQL" description="Default logon partition."/> </propertySet> </factories> <propertySet xmi:id="J2EEResourcePropertySet_TdRedux"/> </resources:JDBCDriver>This template provides the information needed for WebSphere to include TdRedux in its list of JDBC drivers when you configure your data sources. Note that most of the specified properties are not required, and should be deleted from the datasource-specific properties when the datasource is configured. However, the serverName property is required when configuring the data source.
After updating the provider template, restart WebSphere. Then Open the administrative console, select Resources->JDBC Providers and create a new JDBC provider from TdRedux. You must specify the pathname to the TdRedux.jar file for your system, and set the type of driver to SQL92. Once you've configured the provider, you can then create a DataSource by opening Resources->JDBC Providers->TdRedux JDBC Driver and clicking on the Data Sources icon. This will display a list of all currently configured TdRedux data sources (none if none are configured). Click on the "New" button to display a form to enter all the appropriate configuration information. Remember to click the Properties button and configure the serverName property, as well as any other properties you might need. Most importantly, remember to save the configuration when done!
WebSphere does not have native support for Teradata within its automated CMP deployment tools, and thus presents some issues for using TdRedux as a persistent store with WebSphere's CMP container. Note the following: