【问题标题】:How to start all the appservers using wsadmin jython script?如何使用 wsadmin jython 脚本启动所有应用服务器?
【发布时间】:2020-09-08 19:58:02
【问题描述】:

我正在尝试使用 Jython 启动由 DMGR 管理的所有应用服务器,我想出了这个脚本,但它不起作用。谁能指导我这里可能出了什么问题。

server = AdminConfig.list( 'Server' );
mbean  = AdminConfig.getObjectName( server );
AdminControl.invoke( mbean, 'restart' );

# combined into a single statement, this would be:

AdminControl.invoke( AdminConfig.getObjectName( AdminConfig.list( 'Server' ) ), 'restart' );

【问题讨论】:

    标签: python websphere jython websphere-8 wsadmin


    【解决方案1】:

    有一个 jython 函数库可能在这里处理它 https://github.com/wsadminlib/wsadminlib。寻找 startAllServersInCluster

    【讨论】:

    • 嗨布鲁斯,谢谢我明白了。第一种获取 CLUSTER Name 的方法不起作用。
    • def getServerClusterByName( name ): 241 """返回指定服务器集群的配置对象 id 242 TODO: 去掉 this 或 getClusterId""" 243 return getObjectByName( 'ServerCluster', name ) 这是获取集群名称的正确方法吗?
    猜你喜欢
    • 2012-11-09
    • 1970-01-01
    • 2021-01-11
    • 2021-01-05
    • 1970-01-01
    • 2020-12-21
    • 2012-01-01
    • 1970-01-01
    • 2019-05-12
    相关资源
    最近更新 更多