public Transaction createWritePrepareTransaction(Transaction transaction,
                                                     ApplicationId applicationId,
                                                     long sessionId,
                                                     OptionalLong activeSessionId) {
        // Needs to read or be supplied current active session id, to avoid overwriting a newer session id.
        String path = applicationPath(applicationId).getAbsolute();
        return transaction.add(setData(path, new ApplicationData(applicationId, activeSessionId, OptionalLong.of(sessionId)).toJson()));
    }
Returns a transaction which writes the given session id as the currently active for the given application.

@param applicationId An {@link ApplicationId} that represents an active application.
@param sessionId session id belonging to the application package for this application id.
configserver/src/main/java/com/yahoo/vespa/config/server/application/ApplicationCuratorDatabase.java