3

I am working with Oracle Service Bus and I want to create a script that will change an attribute in a specific mbean.

I have located the mbean:

com.bea:Name=OperationsConfig,
Location=AdminServer,
Type=com.bea.wli.sb.management.configuration.operations.OperationsConfigMBean 

and the attribute i want to change is DomainSLAAlertingEnabled

Can anybody help me as to how i can change an attribute in this mbean using wlst (weblogic scripting tool)?

How do i navigate to this mbean and then how do i change it?

DomainSLAAlertingEnabled is boolean.

Aleš
  • 8,896
  • 8
  • 62
  • 107
Alexandros
  • 81
  • 2
  • 3
  • 6
  • Check the API related to that bean. You will find the solution. If you could tell us what exactly you are tying to do, we will be able to answer it more appropriately. – systemhalted Dec 13 '12 at 14:05

1 Answers1

4

Here is a nice tutorial showing howto use WSLT to configure various Weblogic mbeans.

Essentially, you need to :

  1. Connect to the admin : e.g. __connectToAdmin(properties)
  2. Retrieve the Mbean: e.g.

    SOAInfraConfigobj = ObjectName(soaconfigmbean+’:Location=’+locationinfo+’,
                         name=’+appname+’, type=SoaInfraConfig,Application=’+appname)
    
  3. Set the desired atribute:

    mbs.setAttribute(SOAInfraConfigobj, Attribute(auditlevel,auditlevelvalue))

Of course, you need to modify the values to your specific MBean and specific attributes.

Aleš
  • 8,896
  • 8
  • 62
  • 107