使用 wsadmin 脚本编制工具标识运行对象的属性和操作
可以使用脚本编制来标识运行对象的属性和操作。
开始之前
开始本任务前,wsadmin 工具必须正在运行。请参阅关于“启动 wsadmin 脚本编制客户机”的主题。
关于此任务
使用 Help 对象的 attributes 或 operations 命令来查找有关服务器中运行的 MBean 的信息。
过程
- 指定运行对象。
- 使用 attributes 命令显示运行对象的属性:
- 使用 Jacl:
$Help attributes MBeanObjectName
- 使用 Jython:
Help.attributes(MBeanObjectName)
表 1. Help attributes 命令描述. 以某个对象名运行 attributes 命令。 属性 定义 $ 是使用其值替换变量名的 Jacl 运算符 Help 是为已连接服务器进程中运行的 MBean 提供一般帮助和信息的对象 attributes 是个帮助命令 MBeanObjectName 是步骤 2 中获取的 MBean 对象名的字符串表示法 - 使用 operations 命令来找出受 MBean 支持的操作:
- 使用 Jacl:
或$Help operations MBeanObjectname
$Help operations MBeanObjectname operationName
- 使用 Jython:
或Help.operations(MBeanObjectname)
Help.operations(MBeanObjectname, operationName)
表 2. Help operations 命令描述. 以某个对象名以及(可选)操作名称来运行 operations 命令。 属性 定义 $ 是使用其值替换变量名的 Jacl 运算符 Help 是为已连接服务器进程中运行的 MBean 提供一般帮助和信息的对象 operations 是个帮助命令 MBeanObjectname 是步骤 2 中获取的 MBean 对象名的字符串表示法 operationName (可选)是需要获取详细信息的指定操作 如果未提供 operationName 值,那么会返回 MBean 支持的所有操作以及每个操作的特征符。如果指定 operationName 值,那么仅返回指定的操作并且它包含一些包括输入参数和返回值的详细信息。
要显示服务器 MBean 的操作,使用以下示例:
- 使用 Jacl:
set server [$AdminControl completeObjectName type=Server,name=server1,*] $Help operations $server
- 使用 Jython:
server = AdminControl.completeObjectName('type=Server,name=server1,*') print Help.operations(server)
要显示有关停止操作的详细信息,使用以下示例:
- 使用 Jacl:
$Help operations $server stop
- 使用 Jython:
print Help.operations(server, 'stop')


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_traceonoff
文件名:txml_traceonoff.html