private void writeStateToZooKeeper(SessionZooKeeperClient zooKeeperClient,
                                       ApplicationPackage applicationPackage,
                                       ApplicationId applicationId,
                                       Instant created,
                                       Optional<FileReference> fileReference,
                                       Optional<DockerImage> dockerImageRepository,
                                       Version vespaVersion,
                                       Optional<Version> versionToBuildFirst,
                                       DeployLogger deployLogger,
                                       Map<Version, FileRegistry> fileRegistryMap,
                                       AllocatedHosts allocatedHosts,
                                       Optional<AthenzDomain> athenzDomain,
                                       Optional<Quota> quota,
                                       List<TenantVault> tenantVaults,
                                       List<TenantSecretStore> tenantSecretStores,
                                       List<X509Certificate> operatorCertificates,
                                       Optional<CloudAccount> cloudAccount,
                                       List<DataplaneToken> dataplaneTokens,
                                       ActivationTriggers activationTriggers) {
        var zooKeeperDeployer = new ZooKeeperDeployer(curator, deployLogger, applicationId, zooKeeperClient.sessionId());
        try {
            zooKeeperDeployer.deploy(applicationPackage, fileRegistryMap, allocatedHosts);
            new SessionSerializer().write(zooKeeperClient,
                                          applicationId,
                                          created,
                                          fileReference,
                                          dockerImageRepository,
                                          vespaVersion,
                                          versionToBuildFirst,
                                          athenzDomain,
                                          quota,
                                          tenantVaults,
                                          tenantSecretStores,
                                          operatorCertificates,
                                          cloudAccount,
                                          dataplaneTokens,
                                          activationTriggers,
                                          writeSessionData);
        } catch (RuntimeException | IOException e) {
            zooKeeperDeployer.cleanup();
            throw new RuntimeException("Error preparing session", e);
        }
    }
Warn on use of deprecated XML features
configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionPreparer.java