The JIA Update Service is an optional capability that enables JIA to download updates and apply them in runtime. Update packages are stored on a central server known as the Update Server. The JIA agent checks this server periodically and downloads update packages that are available. The JIA agent is then stopped, and the Update Client component is called to extract the updates, apply them, and restart the JIA agent.
The Update Service can update any file in the JIARuntime folder, and is able to handle various desktop permissions configurations (e.g., non-admin users). Updates may be initiated both manually (by the end user) and automatically. Manual updates are done via a Help menu option of the JIA Desktop Agent. Automatic update schedules are set in the Update Service tab of the JIA Configuration Settings.
Proper functioning of the Update Service is contingent on deploying the necessary components and defining appropriate settings in the required configuration files. For more information, refer to Enabling the Update Service.
The following sections describe the components of the JIA Update Service and their roles in the update process.
JIA Agent
This component is the existing client agent running on the desktop. When the Update Service is enabled, the agent checks for updates stored in a remote location (Update Server). If an update is available, it is downloaded and the Update Client is invoked.
Update Client
This component is a standalone executable that handles update packages and then restarts JIA. The Update Client is responsible for:
•Backing up existing files
•Extracting the update package
•Restarting the JIA agent
Update Server
This is a passive component that is used only to store configuration files and update packages. It does not include any running components. The Update Server may be a shared file system, an HTTP server, or an FTP server.
JIA Updater Service
This is an updater admin service installer and executable. In order to enable automatic updates, this component needs to be installed on every desktop for which the user has no write permissions for the JIARuntime client folder.
To install the service using the default port (8000), run the following command:
UpdaterService.exe/i |
To install the service using the port of your choice, specify the port as in the following example:
UpdaterService.exe/i-port:8006 |
Note: If you are not using the default port, be sure to change the Update Administrator Service Port setting (in the JIA configuration settings) to the correct value. |
Update Package
Update packages can contain any products or project artifacts to replace the ones in the previous version. The update package can also contain an updated client configuration file that includes the latest version number. Optionally, the package may include an update script.
OnBeforeApplyUpdate Handler on FormBase
This optional component allows you to execute an event before the update process is begun. The event is registered in the Init method of the JIA project. For example:
((FormBase)Form).OnBeforeApplyUpdate += Service_OnBeforeApplyUpdate;
void Service_OnBeforeApplyUpdate(object sender, EventArgs e) { // Put your code here } |