How to Dynamically Use Properties in WLST
(Doc ID 1663420.1)
Last updated on APRIL 15, 2024
Applies to:
Oracle WebLogic Server - Version 9.2 and later Information in this document applies to any platform.
Goal
This document provides an example of how to dynamically use WLST properties.
Blocks of code must be added to a script every time new variables are introduced into a properties file. What it would be like if you created a variable called numOfManagedServers=X, where X is the number of managed servers in the domain? Then, the script would have a for loop like:
The problem: If you need to add a new managed server and/or another similar property, you would need to add ManagedServer4=ProductDmanagedServer and so on. In fact, you would need to modify the script as well in order to reference the new variable added (ManagedServer4 in this case). So, how can you solve this?
Solution
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!