Custom advisors

You can also write your own advisors for specific applications. These are called custom advisors, and can be based on sample Java code provided with the product. You can find the sample code in the <install_path>/servers/samples/CustomAdvisors directory, where <install_path> is the Load Balancer installation path (such as /opt/ibm/edge/lb on AIX, or C:\Program Files\IBM\edge\lb on Windows).

Custom advisors execute on the Dispatcher node, and must be written in the Java language and compiled with a Java compiler for the Dispatcher machine.

Important: For the Edge Components that are part of IBM WAS Network Deployment V5.1 you need a Java 1.4 compiler.

For IBM WAS Network Deployment V5.0, you need a Java 1.3 compiler.

Class file names must follow the form ADV_name.class, where name is the name you choose for the advisor.

Using the Java SDK, the compile command might be:

javac -classpath <install_path>/servers/lib/ibmnd.jar ADV_<name>.java

Note The Load Balancer base classes, found in ibmnd.jar, must be referenced in the classpath during compilation.

The advisor code must then be copied to the <install_path>/servers/lib/CustomAdvisors directory.

To start the customer advisor, the manager function of Dispatcher must have been started. Then issue the following command to start your custom advisor:

dscontrol advisor start <name> <port_number>

The <port_number> specified in the command is the port on which the advisor opens a connection with the target server.

More detailed information about custom advisors, describing how they work, how to write, compile and test them, including examples, development techniques, and interface methods, can be found in the Load Balancer Administration Guide, GC09-4602.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.