The Jiwa API service by default can only be configured to connect and
...
serve data from a single database.
These instructions detail how to have multiple instances of the service running on the same machine, such that each instance can be configured to connect to different databases.
Table of Contents |
---|
Copy the Jiwa folder
Locate the Jiwa 7 folder and copy it, naming it as desired.
...
Run sc.exe
Open a command prompt and type in the following:
sc.exe create "Jiwa Service 2" binPath= "C:\Program Files (x86)\Jiwa Financials\Service2\JiwaAPISelfHostedService.exe"
...
Note that the "Jiwa Service 2" is the name of the service, and the binPath is the location of the executable.
Important: Make sure there is a space after the = character.
Edit the configuration file
Locate the JiwaAPISelfHostedService.exe.config in the folder copied in the first step (C:\Program Files (x86)\Jiwa Financials\Service2) and edit the contents to connect to the desired database.
You should also configure the second service to run on a different port to the first service.
Configure the service
Open service.msc and locate your new service and right-click, choose "Properties" from the context menu and ensure the Start up type and Log On information as as desired.
...
Secure the service
If you are using SSL Certificates, then you will need to bind the certificate to the new port you are running the second service on.
Start the service
Open service.msc and start the service in the usual fashion.
Removing the service
There may be a need at some point to remove the service - to do this simply open a command prompt and type in the following:
sc.exe delete "Jiwa Service 2"
Then delete the contents of the "C:\Program Files (x86)\Jiwa Financials\Service2\" folder.