3 Replies Latest reply on Sep 17, 2015 2:22 PM by Thomas Lassauniere

    How to configure OAM 11.1.2 Load Balancing from script ?

    Thomas Lassauniere

      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

        • 1. Re: How to configure OAM 11.1.2 Load Balancing from script ?
          Thomas Lassauniere

          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>

          • 2. Re: How to configure OAM 11.1.2 Load Balancing from script ?
            handat

            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..

            1 person found this helpful
            • 3. Re: How to configure OAM 11.1.2 Load Balancing from script ?
              Thomas Lassauniere

              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