Handlers

This tab allows you to specify Open Server event handlers when you have configured EAServer to support Open Server client connections. This feature allows you to run legacy Sybase Open Server applications in EAServer. For more information, see Appendix B, “Migrating Open Server Applications to EAServer,” in the EAServer Programmer’s Guide. These handlers are called only for events that are generated by clients that connect to a listener that is configured to accept Open Server requests.

StepsSpecifying an event handler

  1. Select the Handlers tab.

  2. Enter the DLL or shared library name and the function name of the specific event handler being called, separated by a colon.

    The following example illustrates an entry for a connect event handler:

    Platform

    Entry

    Solaris, AIX, Digital UNIX, and LINUX

    libsamp.so:debug_connect

    HP-UX

    libsamp.sl:debug_connect

    Windows

    libsamp.dll:debug_connect

    where libsamp is the DLL or shared library name and debug_connect is the function called whenever a connect event handler is called.

    Table 3-6 summarizes the types of event handlers that you can install. For information on coding event handlers, see Appendix B, “Migrating Open Server Applications to EAServer,” in the EAServer Programmer’s Guide.

    Table 3-6: Individual server event handlers

    Event handler

    Called

    Connect

    Each time a client connects to EAServer.

    Disconnect

    When the client disconnects from EAServer.

    Error

    When a server processing error occurs.

    CS Error

    When a CS-Library error occurs

    CT Error

    When a Client-Library error occurs

    Open Server Error

    When a Open Server error occurs.

    Initialization

    Before starting a server.

    Start

    When a request to start the server is made.

    Stop

    When a request to stop the server is made.

    Language

    When a client sends a language request, such as a SQL statement.

    RPC

    When a client issues a remote procedure call.

    Attention

    When an attention has been received. An attention is an immediate event; EAServer services the attention as soon as it occurs, rather than adding it to the client’s event queue.

    Cursor

    When a client sends a cursor request.

    Dynamic

    When a client sends a dynamic SQL request.

    Message

    When the client sends a message.

    Option

    When a client sends an option command.

    Bulk

    When a client issues a bulk copy request.