Creating a protocol handler class
When you install the connector, stub code and make files
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:
- Modify (and rename) the stubProtocolHandler.java file.
- Edit the makefile to contain the name of your source file.
- 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.
- Add the new class to the .jar file. Use the following command:
jar cvf MyProtocolHandler.jar <classes>.
where:
- MyProtocolHandler.jar is the protocol handler .jar file. This file must be in the classpath where the connector
startup batch file, start_xml.bat (start_xml.sh for UNIX), resides.
- <classes> are all of the classes for your protocol handler.
List all classes and separate each entry with a space.
- 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.
