websphere - wsadmin + jython 重启 WAS 应用服务器

标签 websphere jython websphere-7 wsadmin server-administration

是否可以使用 wsadmin (jacl/jython) 停止/启动 WAS 应用程序服务器。我想删除配置文件上的所有缓存,然后重新启动 WAS 应用程序服务器。我使用 wsadmin 作为独立的。

最佳答案

您可以从 wsadmin 发出命令(使用 Jython):

AdminControl.invoke(AdminControl.queryNames('WebSphere:*,type=Server,node=%s,process=%s' % ('YourNodeName', 'YourServerName')), 'restart')

与 WAS Base 和 ND 一起使用。
使用 ND,您还有另一种选择:

AdminControl.invoke(AdminControl.queryNames('WebSphere:*,type=Server,node=%s,process=%s' % ('YourNodeName', 'YourServerName')), 'stop')
# now your server is stopped, you can do any cleanup
# and then start the server with NodeAgent
AdminControl.invoke(AdminControl.queryNames('WebSphere:*,type=NodeAgent,node=%s' % 'YourNodeName'), 'launchProcess', ['YourServerName'], ['java.lang.String'])

关于websphere - wsadmin + jython 重启 WAS 应用服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13494012/

相关文章:

websphere-7 - wsadmin Web 身份验证行为

websphere-7 - 入站请求最多允许 10000 个参数

caching - WebSphere 7 : Modify HTTP headers for static content file serving

ssl - 使用 ikeyman 工具的 key 密码和 keystore 密码

java - 有没有办法检查文档中是否存在标签名称? (DOM - Jython)

python - Jython Swing : Passing more than self and event on a button press

java - Jython,如何获取脚本所在 jar 的基本路径?

java - Websphere 无法启动

websphere - 信任应用程序(而不是用户)发布到任何用户的事件流

java - 在 websphere 应用服务器中通过 spring 加载资源