Shutdown Methods for WebLogic Server in Windows 2000


Shutdown Methods for WebLogic Server in Windows 2000

There are two methods you should use for shutting down your WebLogic Server gracefully:

  • The WebLogic Server Administration Console

  • The weblogic.Admin command-line utility

You should always try to use one of these methods because killing the WebLogic Server process will prevent any cleanup processes from occurring, which can lead to the loss or corruption of data used by WebLogic Server.

Shutting Down WebLogic Server Using the Administration Console

Follow these steps to shut down an instance of WebLogic Server using the Administration Console:

  1. Start the Administration Console for the instance of WebLogic Server you want to shut down using the http://hostname:port/console syntax .

  2. Log in to the Administration Console using an admin-level username and password.

  3. In the Administration Console navigation tree (the left pane), click the + in front of Servers to display the list of servers.

  4. Right-click the name of the server you want to stop and choose Start/Stop This Server, as illustrated in Figure 10.19.

    Figure 10.19. Shut down WebLogic Server using the Administration Console.

    graphics/10fig19.gif

  5. Follow the Administration Console instructions to stop WebLogic Server.

Shutting Down WebLogic Server Using the weblogic.Admin Utility

The weblogic.Admin command-line utility provides a suite of useful functions that can be used for the administration of WebLogic Server. Even though it does not provide the rich administration capabilities of the Administration Console, it is an extremely useful alternative, especially if you do not have access to a Web browser.

The syntax and required arguments for using the weblogic.Admin command-line utility are as follows :

 
 java weblogic.Admin [-url URL] [-username username] [-password password] COMMAND arguments 

where:

  • URL specifies the WebLogic Server host including the TCP port at which the WebLogic Server is listening for client requests . The format for the URL argument is hostname : port , for example the default is localhost:7001.

  • username specifies a username with access to WebLogic Server.

  • password specifies a password for the username.

  • COMMAND arguments specifies command syntax and arguments for a WebLogic Server administration task.

For detailed information on the weblogic.Admin command syntax and arguments, please refer to the WebLogic Server Administration Command Reference section of your WebLogic Server documentation.

In reference to shutting down a WebLogic Server, the following weblogic.Admin syntax and arguments can be used:

 
 java weblogic.Admin [-url URL] [-username username] [-password password] SHUTDOWN [seconds] ["lockMessage"] 

where:

  • seconds specifies the number of seconds WebLogic Server will remain locked and will wait to start the shutdown process after the command is run.

  • lockmessage sends a message to any user requesting a connection to WebLogic Server while it is in the process of shutting down.

To run the weblogic.Admin utility, it is important to have the PATH and CLASSPATH environmental variables set correctly to reflect your Java and WebLogic Server installation directories and files. This effort can be alleviated by using the setEnv script, which is created by default in your domain directories. For example, the myDomain directory contains a setEnv script that can be used to set up the environment for running java commands explicitly against WebLogic Server supporting the "myDomain" domain.

The following steps describe how to shut down an instance of the mydomain WebLogic Server using the weblogic.Admin utility:

  1. From the command prompt, change directories to your mydomain directory.

  2. From your mydomain directory, run the setEnv script (setEnv.cmd) to set up your Java environment with the appropriate PATH and CLASSPATH information.

  3. Execute the following weblogic.Admin command:

       
      java weblogic.Admin -url localhost:7001 -username username -password password SHUTDOWN 60 "The myDomain WebLogic Server is in the process of shutting down"  

As you can see in Figure 10.20, the myDomain WebLogic Server is shut down gracefully.

Figure 10.20. Shut down WebLogic Server using the weblogic.Admin utility.

graphics/10fig20.jpg

It is a good practice to provide a shut down message, so any users trying to connect to WebLogic Server are aware of its status, and hence avoid any unnecessary debugging exercises on why their connection requests are failing.



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net