【问题标题】:Change an attribute in a mbean using wlst.使用 wlst 更改 mbean 中的属性。
【发布时间】:2012-11-27 10:13:26
【问题描述】:

我正在使用 Oracle Service Bus,我想创建一个脚本来更改特定 mbean 中的属性。

我找到了mbean:

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

我要更改的属性是DomainSLAAlertingEnabled

谁能帮助我了解如何使用 wlst(weblogic 脚本工具)更改此 mbean 中的属性?

如何导航到此 mbean,然后如何更改它?

DomainSLAAlertingEnabled 是布尔值。

【问题讨论】:

  • 检查与该 bean 相关的 API。你会找到解决办法的。如果您能告诉我们您到底要做什么,我们将能够更恰当地回答。

标签: oracle weblogic jmx wlst osb


【解决方案1】:

这是一个nice tutorial,展示了如何使用 WSLT 来配置各种 Weblogic mbean。

基本上,您需要:

  1. 连接到管理员:例如__connectToAdmin(properties)
  2. 检索 Mbean:例如

    SOAInfraConfigobj = ObjectName(soaconfigmbean+’:Location=’+locationinfo+’,
                         name=’+appname+’, type=SoaInfraConfig,Application=’+appname)
    
  3. 设置所需的属性

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

当然,您需要将值修改为您的特定 MBean 和特定属性。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-15
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多