如何从命令行停止/启动特定于WebSphere部署的EAR? [英] How to stop/start specfic WebSphere-deployed EAR from command line?

查看:289
本文介绍了如何从命令行停止/启动特定于WebSphere部署的EAR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将依赖项jar放入我在WebSphere app服务器上爆炸的EAR中.我需要停止/启动EAR以使WS执行新代码.有没有办法从命令行执行此操作?

I'm throwing a dependency jar into my exploded EAR on WebSphere app server. I need to stop/start the EAR to get WS to execute the new code. Is there a way to do this from command line?

推荐答案

尝试运行类似这样的内容:

Try running something like this:

/opt/ibm/websphere/appserver/profiles/<MyProfileName>/bin/wsadmin.sh -c "AdminControl.invoke(AdminControl.queryNames('type=ApplicationManager,process=<MyServerName>,*'),'stopApplication','MyAppName')" -lang jython

它会提示您输入WAS用户名和密码(如果您已启用了管理安全性" ),并且在输入时-前提是您的用户名至少已分配了操作员角色-您的应用程序将被停止.

It will prompt you for a WAS Userid and password (in case you have enabled "Administrative Security") and when you enter them - provided your userid has at least been assigned the Operator Role - your application will be stopped.

您可以通过类似的方式启动相同的应用程序.

In a similar way you may start the same application.

这篇关于如何从命令行停止/启动特定于WebSphere部署的EAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆