Example: Migrating - Changing transaction log directory using scripting
Prepare for evolutionary changes without script compatibility support.
The location of the transaction logs directory attribute has changed from the ApplicationServer::TransactionService to the ServerEntry::recoveryLogs. As long as the new location is not used, the value from the old location will continue to be used. Scripts that modify the old location can still be used; that value will take effect until a value in the new location is set. The change to scripts to use the new location is as follows:
- Using Jaclset transService [$AdminConfig list TransactionService $server1] $AdminConfig showAttribute $transService transactionLogDirectory
Using JythonAdminConfig.list("ServerEntry") # Select one entry from the list, e.g the entry for server1: serverEntryId = AdminConfig.getid("/ServerEntry:server1") serverEntry = AdminConfig.list("ServerEntry", serverEntryId) recoveryLog = AdminConfig.showAttribute(serverEntry, "recoveryLog") AdminConfig.showAttribute(recoveryLog, "transactionLogDirectory")
Using Jacl$AdminConfig list ServerEntry $node set serverEntry <select one of the ServerEntry from output of above command> set recoveryLog [$AdminConfig showAttribute $serverEntry recoveryLog] $AdminConfig showAttribute $recoveryLog transactionLogDirectory