Start or Stop the Adapter
The run-time adapter can be run as a console application. The adapter can also be installed and started as a Microsoft Windows service.
Start the Adapter
The following command line starts the adapter from a command window using the default adcomService.tra
properties file. The default file has been edited with the name of the project, the adapter configuration and properties file to pass to the application. Because the properties file has the same name prefix as the executable and is in the same folder, it need not be specified on the command line.
You can run the adapter as a console application using a custom properties file. For example, the next command line starts the adapter service that is identified in the adcomSamplecm.tra
properties file, which is located in the same directory as the executable. The absolute pathname to the properties file must be given if it is located in a different directory than the executable.
Adapter Command Line Options
The next table describes the command line options for the run-time adapter.
Table 6 Adapter Command Line Options
Option
|
Description
|
--help
|
Displays help about the executable’s command-line options.
|
--runAsNTService <service name>
|
Used only when the service component of the adapter is run as a Microsoft Windows service. This command line option is automatically added to the Image Path value when the service component is installed as a Microsoft Windows service.
|
--createNTService <service name>
|
Adds the adcomService executable to the Microsoft Windows Services database with the specified service name. This option must be used in conjunction with the -system:repourl and -system:configurl options to specify the repository and configuration URLs that the Microsoft Windows service should use.
|
--deleteNTService <service name>
|
Deletes the adcomService executable with the specified service name from the Microsoft Windows Services database.
Make sure that the line,
is commented out in the adcomService.tra file.
|
--system:repourl <url>
|
Specifies which repository URL the service component should use.
|
-system:configurl <url>
|
Specifies which adapter URL the service component should use.
|
--system:clientVar <varName>=<value>
|
Allows you to define the value for a client variable in the repository. This value takes precedence over any global value set in the repository. Substitution takes place only at start up. Multiple -system:clientVar can be specified in the command line. If the same variable already exists in the command line, the latter overrides the former. No space is allowed for both the varName and the value when using -system:clientVar . For more details, see the TIBCO Designer User’s Guide.
|
--system:propfile <filepath>
|
Directs the adapter to load a command properties file containing startup information. These properties can be queried via the MAppProperties::setProperty() and MAppProperties::getProperty() methods (in C++ only).
|
--run --propFile <fileName>
|
Launches the adapter using the specified properties file. This is the default option, if no options are specified on the command line.
|
--install --propFile <fileName>
|
Microsoft Windows Only. Installs the application as a Microsoft Windows Service using the specified properties file.
If propFile is not given, the property file prefix name must have the same name as the adapter executable prefix name.
|
--uninstall --propFile <fileName>
|
Microsoft Windows Only. Uninstalls the Microsoft Windows Service associated with the adapter.
If propFile is not given, the property file prefix name must have the same name as the adapter executable prefix name.
|
--start --propFile <fileName>
|
Microsoft Windows Only. Start the Microsoft Windows Service using the specified properties file.
If propFile is not given, the property file prefix name must have the same name as the adapter executable prefix name.
|
--stop --propFile <fileName>
|
Microsoft Windows Only. Stops the Microsoft Windows Service using the specified properties file.
If propFile is not given, the property file prefix name must have the same name as the adapter executable prefix name.
|
 |
If the name and location of the properties file is different from the default properties file name and location, you must specify the absolute path at the command line.
|
The following examples illustrate typical uses of the command-line options for the service component:
Example 1
The following command line creates the Microsoft Windows service TIBCOCOMService1
:
The service is created in the Microsoft Windows Services database, and is automatically started because the following command line is added when it is installed as a Microsoft Windows service:
Example 2
The following command line deletes the Microsoft Windows service TIBCOCOMService1
from the Microsoft Windows Services database:
Example 3
The following command line starts the adcomService
executable as a standalone executable with the specified repository and adapter instances:
adcomService
–system:repourl “c:\tibco\adapter\adcom\5.3\examples\sample.dat” –system:configurl “Adapter for COM/Service Instances/TIBCOCOMService1”
Stop the Adapter
Use one of the following methods to stop the adapter:
- From a command prompt window, close the window in which the adapter is running.
- From another command window, stop the adapter by sending a message on the terminate subject or terminate topic. See General Tab for information about specifying the terminate subject or topic.
- From the Control Panel > Services dialog, stop the adapter service, if it is running as a Microsoft Windows service.
TIBCO Adapter™ for COM User’s Guide
Software Release 5.3,
September 2005
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com
|