This document provides instructions for configuring PlantsByWebSphere to run
with DB2.
To complete these instructions, you will need the following:
- DB2 UDB Enterprise Edition 7.2 Fixpack 7
- Websphere Application Server 5.0
- The PlantsByWebSphere sample that comes installed with the Application Server
I. Create and populate the PLANTSBY database in DB2
- Ensure that Java\bin and SQLLIB\bin are in your path so that you can run the java.exe and db2cmd.exe commands.
- Run the batch file db2createplantsby_db.bat (located in the install folder one directory down) to create the PLANTSBY database. Enter your DB2 user id and password as command line parameters.
- Run the java class file Populate.class to populate the PLANTSBY tables. Enter your DB2 user id and password as command line parameters.
II. Reinstall a clean PlantsByWebSphere EAR
The PlantsByWebSphere EAR that ships with WebSphere Application Server 5.0 comes preconfigured with Cloudscape deploy code. In order to run the application on DB2, it is necessary to build a clean ear and to generate DB2 deploy code. The following steps will guide you through this process.
- While the server is running, open the Samples Gallery, then click on PlantsByWebSphere => Build it Yourself.
- Follow the instructions to rebuild, remove and reinstall the PlantsByWebSphere.ear file with one change:
- In step 3 under Removing and reinstalling the PlantsByWebSphere.ear file use the following wsadmin command:
install_root/bin/wsadmin -conntype none -c "$AdminApp install PlantsByWebSphere.ear {-appname PlantsByWebSphere -usedefaultbindings -node <node> deployejb -deployejb.dbtype DB2UDB_V72}"
where <node> is the name of node on which to install the Sample.
This deploys the PlantsByWebSphere EJBs with DB2-specific deploy code