Difference between revisions of "Commander4j Interface Services Install"
Line 33: | Line 33: | ||
''Service4j /install '''myservicename''''' | ''Service4j /install '''myservicename''''' | ||
+ | |||
+ | On a computer that you only intend to have 1 service installed you can omit "my service" and it will use a default value. If you computer needs to have more than one service installed then you need to ensure that "myservice" is a unique identifier, without spaces and meaningful, for example :- | ||
+ | |||
+ | ''Service4j /install Commander4j_Company1'' | ||
+ | |||
+ | ''Service4j /install Commander4j_Company2'' |
Revision as of 08:28, 27 March 2014
From version 4.21 the process for creating a Service for interfacing has become much easier to setup. If you have a prior version of Commander4j and you have already created a service you should use the "uninstall service" shortcut to remove it and then follow the instructions below to create a new service.
Assumptions
Although you can connect to more that one database with a single install of C4J, only one of those databases can be managed by a single service. If you want to operate more than one database on a single server it is recommended that you install the application into a unique folder for each database. For example you could use the following structure.
Service for Database 1 (Company 1)
C:\MyApps\Company1\Commander4j
Service for Database 2 (Company 2)
C:\MyApps\Company2\Commander4j
The physical database can reside anywhere on the network, you don't need to have the C4J Application/Service installed on the database server.
Configuration
The above screen shows a config with multiple databases defined. As mentioned previously, in a situation like this you can only assign the service to manage one of these, so it might be better to install the application multiple times. However in this case I have selected the database that i want to configure for use with the service by selecting it, clicking on the assign button and then saving the config. You will notice that a field marked "Unique ID" is now populated with the word "service". This allows the service application to identify which database to connect to where there are more than one.
Installation
Open up a command window and change into the installation directory.
For example
C: CD \MyApps\Folder1\Commander4j
Now type this command to create the service
Service4j /install myservicename
On a computer that you only intend to have 1 service installed you can omit "my service" and it will use a default value. If you computer needs to have more than one service installed then you need to ensure that "myservice" is a unique identifier, without spaces and meaningful, for example :-
Service4j /install Commander4j_Company1
Service4j /install Commander4j_Company2