Creating a protocol handler class

When you install the connector, stub code and makefiles for the protocol handler are installed. The stub file contains Java code that defines an empty class that lists all the methods you must implement. You can use the stub file as a template for generating your custom protocol handler.

To implement your new protocol handler:

  1. Modify (and rename) the stubProtocolHandler.java file.
  2. Edit the makefile to contain the name of your source file.
  3. Run the makeProtocolHandler.bat file to compile the class. The makefile compiles only the class. It does not add the class to the .jar file.
  4. Add the new class to the .jar file. Use the following command:

    jar cvf MyProtocolHandler.jar <classes>.

    where:

  5. Make sure that the connector can pick up the new classes. Edit the start_xml.bat (start_xml.sh for UNIX) so that the new .jar file is included in the CLASSPATH.

Copyright IBM Corp. 1997, 2004