To start the ODA, you run an ODA startup script. This startup script starts the ODA runtime. This startup script is a batch file that starts the ODA runtime. By convention, a startup script's name takes the following form:
start_ODAName.bat
where ODAname is the unique name of the ODA (its source-data name) with the string "ODA" appended. For example, if an ODA has its source data in HTML format, its ODA name could be HTMLODA. Therefore, you could name its startup script as follows:
start_HTMLODA.bat
Before you can start up an ODA that you have developed, you need to ensure that a startup script exists to support your new ODA. To enable a startup script to start your own ODA, you must take the following steps:
The following sections describe each of these steps.
The ODA runtime directory contains the runtime files for your ODA. To prepare the ODA runtime directory, take the following steps:
ProductDir\ODA\srcDataName
By convention, the directory name matches the ODA's source-data name (srcDataName). The source-data name is a string that uniquely identifies the source data (or adapter) with which the ODA works. For more information, see Naming the ODA.
The ODA's library file is a Java archive (jar) file. You created this jar file when you compiled the ODA. For more information, see Compiling the ODA.
As System startup files describes, an ODA requires an ODA startup script for it to be able to start. An ODA requires a startup script for the system administrator to start the ODA-runtime process. When the WebSphere Business Integration Adapters Installer installs adapters on a Windows system, it takes the following steps for ODAs:
To provide the ability to start up your own ODA, you must generate its startup script and provide the shortcuts that invoke this startup script.
In this start_ODAname.bat file, make sure you take the following steps:
Variable name | Value |
---|---|
PATH |
Add the path of the ODA's runtime directory to the front of the PATH variable (so that runtime can locate the ODA's JRE): PATH="%CROSSWORLDS%"\ODA\ODAruntimeDir;%PATH% where ODAruntimeDir is the ODA's runtime directory, which has the form srcDataName. For more information, see Preparing the ODA runtime directory. |
AGENTNAME |
Specify the ODA name for your ODA (ODAname), which has the following form: srcDataNameODA where srcDataName is the name of the source data. For more information, see Naming the ODA. |
AGENT |
Specify the full path name for your ODA's library file, the jar file that contains the ODA class. This path name has the following form: "%CROSSWORLDS%"\ODA\ODAruntimeDir\ODAlibrary.jar where:
|
AGENTCLASS |
Specify the name for your ODA package and class, which has the following form: com.ibm.oda.srcDataName.ODAname where:
|
JCLASSES |
Add any ODA-specific jar files to this variable. Jar files are separated with a semicolon (;). At a minimum, this variable should be set to include the following classes:
|
Define variables for information that can change from release to release. You can then set the variable to a value appropriate for this release and then include the variable in the appropriate command line of the startup script. If the information changes in the future, you only have to change the variable's value. You do not have to locate all command lines that use this information.
"%CROSSWORLDS%\bin\java" -Duser.home="%CROSSWORLDS%" -mx128m -classpath %JCLASSES% com.crossworlds.ODKInfrastructure.XRmiAgent -l%AGENTNAME% -c%AGENTCLASS%
A shortcut enables an ODA to be started from a menu item within Programs > IBM WebSphere Business Integration Adapters > Adapters > Object Discovery Agents. An easy way to create a shortcut to start an ODA running on Windows is to copy an existing ODA's shortcut and edit the shortcut properties to change the connector name or add any other startup parameters.