Home > Articles > Programming > Java

Working with the WebLogic Server Tools

  • Print
  • + Share This
In your work toward understanding the WebLogic Server, it is imperative that you experience the tools that support it. In this chapter, you will look at two tasks supported by these tools: the administration of the WebLogic Server and the deployment of J2EE-based applications into the WebLogic Server domains.

In This Chapter

  • The WebLogic Server System Administration Tools

  • The WebLogic Server Deployment Tools

  • Deploying Your First Web Application Using the WebLogic Builder

The WebLogic Server System Administration Tools

Many system administration tasks are associated with a WebLogic Server, but at a high level they can be grouped into the following categories:

  • Creation of WebLogic domains and their associated WebLogic Servers

  • The management of the WebLogic domains and their associated hosted Web or Enterprise Java (J2EE) applications

  • The management and monitoring of WebLogic Server instances that constitute a WebLogic domain

  • The management of the resources and J2EE services that the domains and deployed applications utilize

  • WebLogic domain security

As described in Table 3.1, three very important administration tools span the entire spectrum of administration tasks you will need to perform with respect to the WebLogic Server: the WebLogic Administration Console, the weblogic.Admin command-line utility, and the Domain Configuration Wizard.

Table 3.1 The Primary WebLogic Administration Tools

Tool Name


WebLogic Administration Console

A Web browser-based graphical user interface for managing WebLogic Servers and their associated domains and applications.

weblogic.Admin command-line utility

A command-line Java utility for specifically managing WebLogic Server instances. However, you can also use this utility to manage and monitor the WebLogic Server domains by invoking methods against the WebLogic Server Mbeans, which requires you to understand the WebLogic Server Mbean architecture.

Domain Configuration Wizard

A Java client program for creating and configuring WebLogic Server domains based on predefined domain templates.

From the administration tools listed in Table 3.1, the Domain Configuration Wizard is the only tool that does not directly interact with the WebLogic Server. The primary role of the Domain Configuration Wizard is to create and configure the WebLogic domains, as well as provide the necessary scripts to start the instances of WebLogic Servers related to a specific WebLogic domain. Because these tasks are applicable to the installation process of the WebLogic Server, a detailed discussion of the Configuration Wizard can be found in Chapter 2, "Installing and Configuring the WebLogic Server 7."

The following sections will focus on describing the WebLogic Administration Console and the weblogic.Admin command-line utility and the ways they can be used toward WebLogic Server system administration. A contextual overview of the WebLogic Server administration environment will also be provided so that you understand how these tools interact with WebLogic Servers and how your administration activities set specific attributes for the WebLogic Servers in a domain through the Java Management Extension (JMX) API and the WebLogic Server MBeans.

The WebLogic Administration Console

The Administration Console is the recommended tool for performing all system administration tasks related to the WebLogic Server. As shown in Figure 3.1, the Administration Console provides an intuitive Web browser-based interface to a multitude of system administration tasks related to a WebLogic domain and its associated WebLogic Servers and applications.

Figure 3.1Figure 3.1 The home page of the WebLogic Server Administration Console.

Starting the Administration Console

The Administration Console exists as a JSP-based application that is hosted by an Administration Server assigned to a specific WebLogic domain. For this reason, before you can use the Administration Console, the Administration Server that is assigned to your WebLogic Domain must be started and running. If you have installed a standalone WebLogic Server using the Domain Configuration Wizard, as discussed in "The WebLogic Server Installation Process" section in Chapter 2, your WebLogic Server is already configured as an Administration Server. You can start your Administration Server by executing the startWebLogic.cmd script file in the root of your domain directory.

After you start your Administration Server, you can access the Administration Console through a Web browser (Netscape 4.x or higher, or Internet Explorer 4.x or higher) from any machine that has network access to the Administration Server by using one of the following URLs:

http://hostname:port/console (unsecured access)
https://hostname:port/console (secured access)


  • hostname is the DNS name or IP address of the machine the Administration Server resides on

  • port is the listening port of the Administration Server, which can be either secured (the default is 7001) or unsecured (the default is 7002)

For example, the following URL starts the Administration Console for an Administration Server that resides on a machine named EINSTEIN with the listening port set at the default 7001:


Only if you specified localhost as the Administration Server's listen address during its installation process can you launch the Administration Console using the following URL:


Because an Administration Server is always assigned to a single WebLogic domain, the Administration Console can be used to manage only that active domain. If you need to manage multiple WebLogic Domains, you need to open separate instances of the Administration Console, with each console connecting to a different Administration Server managing a specific WebLogic domain.

After you launch the Administration Console, you need to log in using the System Administration username and password that was set when your Administration Server was created.

Navigating the Administration Console

Through the Administration Console, you have full administrative control of an entire WebLogic domain and the associated WebLogic Servers. However, to use the Administration Console in a productive and intelligent manner, you must first understand how to navigate its interface.

As shown in Figure 3.2, the Administration Console interface is divided into left and right panes.

The left pane of the Administration Console provides a hierarchical navigation tree (Domain tree) for managing the Administration Console and the active WebLogic domain, including all associated WebLogic Servers and their resources. When you traverse and select a node in the Domain tree, the right pane of the Administration Console displays a table of data, configuration or monitoring information for that selection. Most of the pages displayed in the right pane provide easy-to-use intuitive guides for setting the attributes of the selected node in the Domain tree.

Figure 3.2Figure 3.2 The Administration Console interface.

If a node in the Domain tree is preceded by a plus sign, you can click on the plus sign to expand the tree to access additional resources for that node. You can also right-click on certain nodes in the Domain tree to bring up a context menu of administration and monitoring tasks related to that node. For example, Figure 3.3 shows the context menu related to the Administration Server node named AdminServer.

Figure 3.3Figure 3.3 An example of a context menu for the Administration Console.

If you need help in using the Administration Console for any reason, you can easily reference the online Administration Console Help system, as shown in Figure 3.4, by clicking the Help icon displayed in the top-right corner of the Administration Console.

Figure 3.4Figure 3.4 The Administration Console Help system.

A Simple Example of Using the Administration Console

Using the Administration Console requires you to first understand the task you want to perform, and the console's interface provides you with the means to achieve that goal. Because this chapter assumes you have just recently been exposed to the WebLogic Server, we've provided a simple example to demonstrate how you can set the machine name of the Administration Server.

Follow these steps to configure the machine name for your Administration Server using the Administration Console:

  1. Launch your Administration Console so that it connects to your WebLogic Administration Server.

  2. Enter a valid administration username and password.

  3. Expand your domain tree.

  4. Select the Machines node and click the Configure a New Machine link in the right pane.

  5. In the displayed Configuration, General tab, as shown in Figure 3.5, enter the machine name you want to assign to your Administration Server and click Create.

Figure 3.5Figure 3.5  Configure a machine name using the Administration Console.

  1. Select the Configuration, Servers tab and select your Administration Server as the server that runs on that machine, as illustrated in Figure 3.6. Then click Apply.

Figure 3.6Figure 3.6 Adding your Administration Server to your machine configuration.

After you create your machine configuration, you will see it listed under the Machines node in your Domain tree.

The weblogic.Admin Command-Line Utility

The weblogic.Admin command-line utility provides a suite of useful functions that can be used toward the system administration of a WebLogic Server domain. It is an alternative to using the Administration Console, especially if you prefer to use the command line as opposed to a Web browser interface, or the Web browser is just not available.

The syntax and required arguments for using weblogic.Admin are as follows:

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


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

  • username specifies a username with access to the Administration Server.

  • password specifies a password for the username.

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

Before you select the weblogic.Admin utility as your primary administration tool, review the following guidelines for its usage:

  • The machine from which you use the weblogic.Admin utility must have the WebLogic Server software installed to be able to execute the weblogic.Admin class.

  • If you have satisfied the first guideline and will be performing system administration from a remote machine, you need to enable HTTP Tunneling on the Administration Server, as shown in Figure 3.7. The procedure to enable HTTP Tunneling requires that you restart the Administration Server.

Figure 3.7Figure 3.7 Configuring the Administration Server for remote administration using the weblogic.Admin utility.

  • The weblogic.Admin utility comes with several useful functions for managing the WebLogic Servers in a domain. However, to achieve the administration capabilities provided by the Administration Console, you need to understand the internal administration infrastructure of the WebLogic Server.

For a brief discussion of the internal administration infrastructure of WebLogic Server, see "Administering a WebLogic Domain from an Infrastructure Perspective," p. 102.

Embracing the preceding guidelines, until you become familiar with the management infrastructure provided by the WebLogic Server, you should use the weblogic.Admin utility for those tasks where the functionality is already provided for you in the form of commands or for tasks for which you have predeveloped and tested scripts.

The weblogic.Admin Utility Commands

This section describes the syntax and required arguments for using the more commonly used weblogic.Admin utility commands. To execute these commands, you must first ensure that your Java CLASSPATH environment variable is set correctly. You can easily perform this task by executing the setEnv script file that is automatically generated for you when you created your WebLogic domains.

All the commands listed in this section have a URL argument to specify the target WebLogic Server. If you omit this argument where they are optional, the value defaults to t3://localhost:7001.

CONNECT The CONNECT command allows you to test a connection with a WebLogic Server from a client machine. You specify the number of connections you want to test, and it returns the round-trip time for each connection and the total time each connection was maintained.


java weblogic.Admin [-url URL] [-username username][-password password] CONNECT count

where connect specifies the number of connections you want to test.

FORCESHUTDOWN The FORCESHUTDOWN command instructs a WebLogic Server to terminate immediately. When it actually terminates depends on the timeout period set for the WebLogic Server, which provides a grace period for any existing transactions to complete.


java weblogic.Admin [-url URL] [-username username][-password password] FORCESHUTDOWN [targetserver]

where targetserver specifies the name of the server to shut down. If you do not specify a value, the command shuts down the server that you specified in the -url argument.

GETSTATE The GETSTATE command returns the current state of a WebLogic Server.


java weblogic.Admin [-url URL] [-username username][-password password] GETSTATE targetserver

where targetserver specifies the name of the server to shut down. If you do not specify a value, the command shuts down the server that you specified in the -url argument.

HELP The HELP command provides the syntax and usage information of all or a specific weblogic.Admin utility commands.


java weblogic.Admin HELP [COMMAND]

LICENSES The LICENSES command lists all the WebLogic-licensed products installed for a specific WebLogic Server from the BEA License file.


java weblogic.Admin [-url URL] [-username username][-password password] LICENSES

PING The PING command allows you to confirm that a WebLogic Server is available to accept client requests and to test the speed of the network connectivity between the client and the WebLogic Server.

PING can be used as an alternative to the CONNECT command.


java weblogic.Admin [-url URL] [-username username][-password password] PING [round_trips] [message_length]

where round_trips specifies the number of round-trip connections (pings) to test and message_length specifies the size of the message packet to send with each ping; the packet must be less than 10MB.

SERVERLOG The SERVERLOG command allows you to display the contents of a log file that is generated by an Administration or Managed Server depending on the URL you provide as an argument.


java.weblogic.Admin [-url URL] [-username username][-password password] SERVERLOG [[starttime]|[endtime]]

where starttime and endtime (optional) specify the start and end times of message entries you want to extract from the log file, both in the format yyyy/mm/dd hh:mm.

SHUTDOWN The SHUTDOWN command allows you to shut down a specified WebLogic Server. When it actually shuts down depends on the timeout period set for the WebLogic Server, which provides a grace period for any existing transactions to complete.


java weblogic.Admin [-url URL] [-username username][-password password] SHUTDOWN [targetserver]

where targetserver should be specified only if the WebLogic Server you want to shut down is another configured WebLogic Server in the same domain as the Administration Server provided by the URL.

VERSION The VERSION command displays the version of the WebLogic Server software that is running on the machine specified by the URL.


java weblogic.Admin -url URL -username username -password password VERSION
  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.