Show TOC

External Adapter CommandsLocate this document in the navigation structure

External adapter commands fall into two categories: those that run on the same host as Studio, and those that run on the same host as the server.

The discovery commands, x_unixDiscCmd and x_winDiscCmd always run on the Studio host. All other commands run on the server host.

The Studio and server are frequently run on the same host, so the development of all command and driving scripts for the custom adapter are straightforward. The configuration becomes more complex during remote execution when Studio and the server are running on different hosts.

For example, if the Studio is running on a Windows host, and the server is set up through Studio to execute on a remote Linux host, it implies that the discovery command and the discovery file name that the framework generates are running and are generated in a Windows environment. The path to the discovery file is a Windows-specific path with drive letters and forward-slash ('/') characters used as path separators. In this case, the developer of the connector should write the discovery command to run in a Windows environment while coding all other commands to remotely execute on the Linux box using a user-configured ssh or rsh command.

Command Description

x_unixCmdConfig

x_winCmdConfig

The configure command should perform any required parsing and parameter checking. It can also convert the parameters into the real format expected by the execution command by reading, parsing, and rewriting the parameter file. If the configure command fails (non-zero return), it is reported as a reset() error, and the adapter fails to start.

x_unixCmdExec

x_winCmdExec

When the server starts the adapter, it executes this command with its ending indicating that the connector has finished.

x_unixCmdStop

x_winCmdStop

The stop command runs from a separate thread; it should stop all processes created with the x_{unix,win}CmdExec command, thus causing the x_{unix,win}CmdExec to return.

x_unixCmdClean

x_winCmdClean

The clean command runs after the server has stopped the connection, that is, when x_{unix,win}CmdExec returns.

x_winDiscCmd

This command is for schema discovery. It should write a discovery file into the file name passed to it. Append the parameter -o <temporary disc filename> command before executing it.

<discover>
    <table name="table_name_1" />
      <column name="col_name_1" type="col_type_1"/>
          .
          .
          .
      <column name="col_name_k" type="col_type_k"/>
    </table>
          .
          .
          .
    <table name="table_name_n" />
      <column name="col_name_1" type="col_type_1"/>
          .
          .
          .
      <column name="col_name_1" type="col_type_1"/>
    </table>
</discover>