Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 536.4K On-Premises Infrastructure
- 138.3K Analytics Software
- 38.6K Application Development Software
- 5.8K Cloud Platform
- 109.5K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
How to configure OAM 11.1.2 Load Balancing from script ?

Hi
I'm currently configuring Oracle Access Manager to work with LoadBalancing
I'm trying to do this configuration :
Actually, I made the configuration with my browser, and I'm searching to do the same thing with a script.
Where is stored the configuration ? Domain config file? DB store ?
Is there a WLST command to do this config ?
Regards
Best Answer
-
Here's a wlst snippet that will do the trick:
domainRuntime()
name = ObjectName("oracle.oam", "type", "Config");
writeSig = ["java.lang.String","javax.management.openmbean.CompositeData"]
oamHostKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverhost"
oamPortKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverport"
oamProtKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverprotocol"
mbs.invoke(name, "applyStringProperty", [oamHostKey,StringSettings(oamHostKey,"myhostname").toCompositeData(StringSettings.toCompositeType())], writeSig)
mbs.invoke(name, "applyStringProperty", [oamPortKey,StringSettings(oamPortKey,"443").toCompositeData(StringSettings.toCompositeType())], writeSig)
mbs.invoke(name, "applyStringProperty", [oamProtKey,StringSettings(oamProtKey,"https").toCompositeData(StringSettings.toCompositeType())], writeSig)
its dynamic and you won't need to worry about increasing the version number or concurrent access, etc..
Answers
-
I found my answer : it is stored in $DOMAIN_HOME/config/fmwconfig/oam-config.xml
<Setting Name="OAMSERVER" Type="htf:map">
<Setting Name="serverhost" Type="xsd:string">lb_hostname</Setting>
<Setting Name="serverport" Type="xsd:string">lb_port</Setting>
<Setting Name="serverprotocol" Type="xsd:string">http</Setting>
</Setting>
If you have to edit this file, be sure to increase version number : <Setting Name="Version" Type="xsd:integer">113</Setting>
-
Here's a wlst snippet that will do the trick:
domainRuntime()
name = ObjectName("oracle.oam", "type", "Config");
writeSig = ["java.lang.String","javax.management.openmbean.CompositeData"]
oamHostKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverhost"
oamPortKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverport"
oamProtKey = "DeployedComponent/Server/NGAMServer/Profile/OAMServerProfile/OAMSERVER/serverprotocol"
mbs.invoke(name, "applyStringProperty", [oamHostKey,StringSettings(oamHostKey,"myhostname").toCompositeData(StringSettings.toCompositeType())], writeSig)
mbs.invoke(name, "applyStringProperty", [oamPortKey,StringSettings(oamPortKey,"443").toCompositeData(StringSettings.toCompositeType())], writeSig)
mbs.invoke(name, "applyStringProperty", [oamProtKey,StringSettings(oamProtKey,"https").toCompositeData(StringSettings.toCompositeType())], writeSig)
its dynamic and you won't need to worry about increasing the version number or concurrent access, etc..
-
Thank you handat for this WLST script
It works very fine and now I can use it in place of a JAVA program used to edit dynamically the xml file.
And now I do not need to restart WLS after modifying the config xml file \o/
Very helpfull, thanks