Forum Stats

  • 3,827,190 Users
  • 2,260,748 Discussions
  • 7,897,184 Comments

Discussions

How to configure OAM 11.1.2 Load Balancing from script ?

Thomas Lassauniere
Thomas Lassauniere Member Posts: 17 Blue Ribbon
edited Sep 17, 2015 10:22AM in Identity Manager

Hi

I'm currently configuring Oracle Access Manager to work with LoadBalancing

I'm trying to do this configuration : image

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

Tagged:
User190110 -Oracle

Best Answer

  • handat
    handat Member Posts: 4,688 Gold Crown
    edited Jun 18, 2015 10:51AM 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..

    User190110 -OracleThomas Lassauniere

Answers

  • Thomas Lassauniere
    Thomas Lassauniere Member Posts: 17 Blue Ribbon
    edited Jun 18, 2015 8:36AM

    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>

  • handat
    handat Member Posts: 4,688 Gold Crown
    edited Jun 18, 2015 10:51AM 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..

    User190110 -OracleThomas Lassauniere
  • Thomas Lassauniere
    Thomas Lassauniere Member Posts: 17 Blue Ribbon
    edited Sep 17, 2015 10:22AM

    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

This discussion has been closed.