Friday, March 14, 2008

Using the APDE with JDBC Type 4 drivers

The APDE (Application Package Development Environment) can either be used on the TPM server or can be installed on a remote computer for the development of workflows. In Fix Pack 2, documentation was provided on how to configure the APDE to use JDBC Type 4 drivers instead of having to install the DB2 client on the remote computers. The problem was that this documentation jumps all over the place. So I thought I would document the steps I used to install the APDE and now I will share them with you.

Background
The APDE is the development environment in TPM for building custom workflows (and other things). Even though you could develop these workflows in the Workflow Editor or even notepad, the APDE provides an excellent IDE that allows for easier creation of custom workflows.

Steps required for DB2 connectivity on Windows
These instructions are for installing the APDE on a Windows system. The same principles should apply for other OSs.

1. Install Java 1.4.2+ confirm that the environment is setup by opening a command prompt and type java -version (Download from www.java.com
2. Download Eclipse from www.eclipse.org. This has to be 3.1.2. Version 3.2 does not work. (Download from www.ecplise.org
3. Extract the eclipse zip file to C:\Program Files (actually directory could be anywhere)
4. Copy the apde.zip and apde.upgrade.zip to remote computer
5. Extract apde.zip and apde.upgrade.zip
6. Copy/move the contents of apde.zip to the eclipse directory and overwrite existing files
7. Copy/move the contents of apde.upgrade.zip to the eclipse directory and overwrite existing files
8. Create a directory under the C:\Program Files\eclipse directory called TPMCFG
9. Copy the files db2jcc.jar, db2jcc_license_cisuz.jar, db2jcc_license_cu.jar from DB2_HOME\java on the TPM server to the TPMCFG directory
10. Copy the crypto.xml and dcm.xml files from TIO_HOME\config to the TPMCFG directory
11. Edit the new dcm.xml file and modify the file to the following values:
...



...
jdbc:db2://:/tc

The server name will be the name of the server where your TPM TC database resides (should be the TPM server). The db2 port is the port db2 is on, most likely this is 50000 or 60000 (this seems to happen more on Linux)
12. Run the eclipse.exe from C:\Program Files\eclipse
13. Go to Window -> Preferences -> Automation Package -> Database
14. Press the Import button and select the dcm.xml file from the TPMCFG directory. Confirm all the settings are correct. I had to modify the password as this did not seem to import correctly.
15. In the Import driver, I had to select the db2jcc.jar file and press the Add button or I received db connection errors
16. Press OK and restart the APDE

If you want to set up the APDE to allow for dynamic installs of the automation packages. The Deployment Engine information needs to be configured. Go to the Deployment Engine section and change the Host Name to the TPM server name. The remote and local directories will also need to be set.

Now it should be all good to go!

Martin Carnegie

No comments: