WLST can be used as well to manage server life cycle and can be pretty useful, for example, if you have to start/stop a domain consisting in lots of servers. There are basically two modes to manage your servers:
- Using the Node Manager interface
- Without Node Manager (via the Admin Server).
Let’s shortly illustrate both approaches
WLST can connect to a Node Manager that is running on any machine and start one or more WebLogic Server instances on the machine.
A WebLogic domain's Administration Server does not need to be running in order to start servers using this technique.
Start by launching WLST at first:
In case the Node Manager process is not already running, you can log on to the host computer and use WLST to start it:
Next, connect WLST to a Node Manager by entering the nmConnect command:
You can now use the nmStart command to start a server:
Monitor the status of Managed server by entering the nmServerStatus command:
Finally, you can stop the server by entering the nmKill command:
In the latter option, we will use the WLST startServer command to start the Administration Server. Here’s an example:
After WLST starts a server instance, the server runs in a separate process from WLST; exiting WLST does not shut down the server. So, once you have started the administration server, you can simply connect to it and issue commands to control life cycle of servers: