Automated service archive management

Deploy and undeploy your service archives automatically when you add or remove them from the services directory.

You can configure IBM® z/OS® Connect to deploy a service archive automatically when you copy your service archive file to the location where your services archives are stored. For example, resources/zosconnect/services. When you remove the service archive file from the services directory, the service is automatically undeployed.

To deploy a service, you add the .sar archive file into the services location directory. Your user ID must have the following permissions:
  • Read, write, and execute permission to the services location directory.
  • Read and execute permission to all parent directories of the services location directory.
To update an existing service, you replace the .sar archive file in the services location directory. To delete an existing service, you delete the .sar archive file from the services location directory. To perform these tasks, your user ID must have the following permissions:
  • Read, write, and execute permission to the services location directory.
  • Read and execute permission to all parent directories of the services location directory.
  • Write access to the .sar archive file.
The IBM z/OS Connect server's user ID must have read and write access to the .sar archive file. Use the UNIX System Services chmod command to assign the appropriate permissions to the directories and archive files.
The services directory is monitored for changes to the service archives. You can control how and when IBM z/OS Connect reacts to these changes by setting the updateTrigger and pollingRate attributes of the zosconnect_services element of the server.xml configuration file. The default value for pollingRate is 5000 mSecs. For more information, see zosconnect_services.
Note: Service definitions that contain override attributes remain in the server.xml configuration file after you delete or uninstall a service archive file.

When you copy a service archive file to the services directory, ensure that the service name is unique within the folder. For example, if test1.sar exists in the folder and contains a service named test, it must be removed before you copy test2.sar, which also contains a service named test. If both files are present when IBM z/OS Connect starts, the service that is deployed is that of the first file that is read. When the other file is read, an error message is returned that the service is already deployed.

To update a service, replace the service archive file in the services directory. The file must have the same name. If the updateTrigger and pollingRate attributes of the zosconnect_services element are set, the service is installed automatically when the folder is polled.

If you copy a service archive to the services directory where a service of the same name is already configured, the new service will not be installed. When the server is restarted, the new service might install first, but this is unpredictable.