Services can be set up using different methods. The following details one of the methods for installing a service.
To install a service, at the command line, type:
NNSYAdapter39 -install [-n|-name] serviceName [-d|-display] serviceDisplayName -p paramFile
To remove a service, at the command line, type:
NNSYAdapter39 -remove [-n|-name] serviceName
To start a service, at the command line, type:
NNSYAdapter39 -start [-n|-name] serviceName
To stop a service, at the command line, type:
NNSYAdapter39 -stop [-n|-name] serviceName
To see the current status of a service, at the command line, type:
NNSYAdapter39 -status [-n|-name] serviceName
You can check your NT service information using the Services Panel. The Services Panel is invoked from Start→Control Panel→Services where you can review the list.
Each service entry has one name for the service and one for the displayed name. These two names do not have to be the same but you can have only one service for each name. If you install a named service, you need to use that same name when removing it.
The default name for NNSYAdapter39 is NNSYADK. If you want more than one NNSYAdapter39 service, you name them using the -install -n[ame] <name> convention. The display name is the name that appears in the list of services that you can review from Control Panel Services.
The following installs a service with the name adk39Svc and uses the configuration file NNadk39.dat.
NNSYAdapter39 -install -n adk39Svc -p NNadk39.dat
The following installs a service with the name adk39Svc with no parameters:
NNSYAdapter39 -install -n NNadk39Svc
The following removes a service named NNadk39:
NNSYAdapter39 -remove -n NNadk39
The following starts a service named NNadk39:
NNSYAdapter39 -start -n NNadk39
Case Description |
Example |
Expected Behavior |
|
---|---|---|---|
1 |
Install a service with no description |
NNSYAdapter39 -install |
Should install a service with no parameters service name = NNSYADK serviceDisplayName = NNSY-ADK-Service |
2 |
Install a service with config file parameter |
NNSYAdapter39 -install -p test.dat |
Should install a service with test.dat parameter service name = NNSYADK serviceDisplayName = NNSY-ADK-Service |
3 |
Install a service with config file parameter and serviceName |
NNSYAdapter39 -install -n testSvc -p test.dat |
Should install a service with test.dat parameter service name = testSvc serviceDisplayName = NNSY-ADK-Service |
4 |
Install a service with config file parameter and serviceDisplayName |
NNSYAdapter39 -install -d testSvcDisplay -p test.dat |
Should install a service with test.dat parameter service name = NNSYADK serviceDisplayName = testSvcDisplay |
5 |
Install a service with config file parameter, serviceName, and serviceDisplayName |
NNSYAdapter39 -install -n testSvc -d testSvcDisplay -p test.dat |
Should install a service with test.dat parameter service name = testSvc serviceDisplayName = testSvcDisplay |
6 |
Start a service without installing |
NNSYAdapter39 -start -n testSvc |
Error message noting that the service is already installed. |
7 |
Start an installed service |
NNSYAdapter39 -start -n testSvc |
Service should start successfully. |
8 |
Start a service that is running |
NNSYAdapter39 -start -n testSvc |
Error message noting that the service is already running. |
9 |
Start a service without the service name |
NNSYAdapter39 -start |
If a service named NNSYADK is installed, it will start successfully. If that service is not installed, an error message that the service is not installed is generated. |
10 |
Start a service that is installed without parameters |
Service start should be successful. The .nml error log should provide the information that the config file is not specified. |
|
11 |
Start a service with the transport manager not running |
Service start should be unsuccessful. The .nml error log should provide the information. |
|
12 |
Start a service with some parameters missing from the config file |
Service start should be unsuccessful. The .nml error log should provide the information. |
|
13 |
Stop the running service |
NNSYAdapter39 -stop -n testSvc |
Service should stop successfully. |
14 |
Stop an already stopped service |
NNSYAdapter39 -stop -n testSvc |
Error message that the service is not running. |
15 |
Find the status of a service |
NNSYAdapter39 -status -n testSvc |
Service status should be written to stdout. |
16 |
Remove a stopped service |
NNSYAdapter39 -remove -n testSvc |
Service should be removed. |
17 |
Remove a running service |
NNSYAdapter39 -remove -n testSvc |
Service should be stopped and removed. |
18 |
Remove a service that is not installed |
NNSYAdapter39 -remove -n testSvc |
Error message that the service is not installed. |
19 |
Perform tests for multi-threaded NNSYAdapter39 |
Use a .dat file with the following parameters set:: MultiThreaded = TRUE InboundTransportID = transport1,transport2,transport3 |
Should get the respective desired behaviors. |
20 |
Install multiple services |
NNSYAdapter39 -install -name broker1 -d broker1 -p broker1.cfg NNSYAdapter39 -install -name broker2 -d broker2 -p broker2.cfg |
The services broker1 and broker2 should be installed. |
21 |
Remove the services |
Services are not in Control Panel/Services list. |