Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop/start specfic WebSphere-deployed EAR from command line?

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?

like image 816
user1561108 Avatar asked May 22 '13 10:05

user1561108


People also ask

How do I start and stop WebSphere instance from command line?

From a command prompt, go to the [appserver root]/bin directory. Enter the following command, replacing server_name with the name of your WebSphere Application Server: (Windows) stopServer. bat server_name.


1 Answers

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

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.

like image 193
trikelef Avatar answered Sep 26 '22 01:09

trikelef