Home > Articles > Programming > Java

Working with the WebLogic Server Tools

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

Description

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)

where

  • 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:

http://EINSTEIN:7001/console

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:

http://localhost:7001/console

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

where

  • 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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

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.

Syntax:

java weblogic.Admin -url URL -username username -password password VERSION

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020