Académique Documents
Professionnel Documents
Culture Documents
Description:
BISP is committed to provide BEST learning material to the beginners and advance learners.
In the same series, we have prepared a complete end-to end Hands-on Guide for WebLogic
Administration. The document focuses on detailed information about WebLogic Admin Console
and Scripting tool. Join our professional training program and learn from experts.
History:
Version
0.1
0.1
Description Change
Initial Draft
Review#1
www.bispsolutions.com
Author
Kuldeep Mishra
Amit Sharma
www.hyperionguru.com
Publish Date
12th Aug 2012
18th Aug 2012
weblogicexperts.wordpress.com |
Page 1
Contents
An Introduction to WebLogic Server Administration Console ...................................................................................................... 3
Use the Administration Console to:............................................................................................................................... 3
Starting the Administration Console ............................................................................................................................ 3
Administration Console Login ......................................................................................................................................... 3
Disabling and Enabling Admin Console .......................................................................................................................... 4
From Admin console:- ............................................................................................................................................................... 4
From WLST:- .............................................................................................................................................................................. 4
Enabling the Admin Console: .................................................................................................................................................... 5
Elements of the Administration Consol ........................................................................................................................................ 5
Change Center ........................................................................................................................................................................... 5
Domain Structure: ..................................................................................................................................................................... 5
System Status: ........................................................................................................................................................................... 6
Using the Change Center........................................................................................................................................................... 6
Undoing Changes ...................................................................................................................................................................... 7
Releasing the Configuration Lock .............................................................................................................................................. 7
How Change Management Works ................................................................................................................................................ 7
Dynamic and Non-Dynamic Changes ........................................................................................................................................ 8
Viewing Changes ....................................................................................................................................................................... 8
Deploying Multiple Applications ............................................................................................................................................... 8
WebLogic Scripting Tool ................................................................................................................................................................ 9
Using Jython .............................................................................................................................................................................. 9
What Does WLST Do? ................................................................................................................................................................ 9
Using WLST Online or Offline ............................................................................................................................................. 9
Using WLST Online ............................................................................................................................................................. 9
Interactive Mode, Script Mode, and Embedded Mode ............................................................................................... 10
Interactive Mode ................................................................................................................................................................ 10
Script Mode ......................................................................................................................................................................... 10
Steps for Using WLST in Interactive or Script Mode.................................................................................................. 11
Setting Up Your Environment :................................................................................................................................................ 11
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 2
The WebLogic Server Administration Console is a Web browser-based, graphical user interface
that we use to manage a WebLogic Server domain. A WebLogic Server domain is a logically
related group of WebLogic Server resources that we manage as a unit. A domain includes one or
more WebLogic Servers and may also include WebLogic Server clusters. Clusters are groups of
WebLogic Servers instances that work together to provide scalability and high-availability for
applications. We deploy and manage our applications as part of a domain.
Use the Administration Console to:
-Configure, start, and stop WebLogic Server instances
-Configure WebLogic Server clusters
-Configure WebLogic Server services, such as database connectivity (JDBC) and messaging
(JMS)
-Configure security parameters, including managing users, groups, and roles
-Configure and deploy our applications
-Monitor server and application performance
-View server and domain log files
-View application deployment descriptors
-Edit selected runtime application deployment descriptor elements
-Control (start, stop, and restart) standalone Coherence cache servers
-Create and configure Coherence clusters
Starting the Administration Console
To start the Administration Console:
i) Start an Administration Server.
ii) Open one of the supported Web browsers to the following URL:
iii) http://hostname:port/console
Where hostname is the DNS name or IP address of the Administration Server and port is the
listen port on which the Administration Server is listening for requests (port 7001 by default).
If we have configured a domain-wide administration port, use that port number. If we
configured the Administration Server to use Secure Socket Layer (SSL) we must add s after
http as follows:
https://hostname:port/console
Administration Console Login
When the login page appears, enter the user name and the password we used to start the
Administration Server (we may have specified this user name and password during the
installation process) or enter a user name that belongs to one of the following security groups:
Administrators, Operators, Deplorers, or Monitors. These groups provide various levels of
access to system administration functions in the Administration Console.
Using the security system, we can add or delete users to one of these groups to provide
controlled access to the Console.
Enter the username and password that we set when creating our domain.
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 3
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 4
save()
activate()
disconnect()
exit()
Enabling the Admin Console:
After we disable the admin console we can enable it again by using WLST.
Following are the steps on the same:
connect(weblogic,weblogic,t3://localhost:7001)
edit()
startEdit()
cmo.setConsoleEnabled(true)
save()
activate()
disconnect()
exit()
Note: Here,
i. weblogic and weblogic are the user id and password of admin console.
ii. t3://localhost:7001 is the admin console URL
iii. After we enable/disable the admin console RESTART our admin server
Domain Structure:
Contains a tree structure we can use to navigate to pages in the Administration Console. Click
a + (plus) icon in the Domain Structure to expand a node and a - (minus) icon to collapse the
node.
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 5
It give links to online help tasks that are relevant to the current Console page.
Breadcrumb Navigation: A series of links that show the path we have taken through the
Administration Console's pages. We can click on any of the links to return to a previouslyvisited page.
System Status: The System Status panel reports on the number of information, error, and
warning messages that have been logged. We can view these messages in the server log files,
which we can access from the Administration Console at Diagnostics > Log Files.
The starting point for using the Administration Console to make changes in our WebLogic
Server domain is the Change Center. To make any changes using the console, we must:
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 6
Locate the Change Center in the upper left of the Administration Console screen.
Click the Lock & Edit button to lock the configuration edit hierarchy for the domain. This
enables us to make changes using the Administration Console.
Make the changes we desire on the relevant page of the console. Click Save on each page
where we make a change.
When we have finished making all the desired changes, click Activate Changes in the Change
Center.
Undoing Changes
We can revert any pending (saved, but not yet activated) changes by clicking Undo All
Changes in the Change Center. We can revert any individual change by going to the
appropriate page in the Administration Console and restoring the attribute to its previous
value.
Releasing the Configuration Lock
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 7
domain. When we activate changes, each server determines whether it can accept the change.
If all servers are able to accept the change, they update their working configuration hierarchy
and the change is completed.
Dynamic and Non-Dynamic Changes
i)Non-dynamic changes require that the affected servers or system resources be restarted
before they become effective.
ii)Non-dynamic properties are marked with an exclamation mark:
We can view any changes that we have saved, but not yet activated, by clicking the View
Changes and Restarts link in the Change Center. The View Changes and Restarts link presents
two tabs, Change List and Restart Checklist:
i) The Change List page presents all changes that have been saved, but not yet activated.
ii) The Restart Checklist lists all servers for which non-dynamic changes have been activated,
but which require restarts before the changes become effective.
When we use the Administration Console to deploy multiple applications, upon installing the
applications, they are listed in the Console's Deployments page in the "distribute Initializing"
state. After activating changes, they are listed in the "Prepared" state. To deploy the
applications, select the application names on the Deployments page and click Start.
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 8
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 9
manage security data (such as adding or removing users). We can also use WLST to connect to
Managed Servers, but we cannot modify configuration data from Managed Servers.
WLST online is a Java Management Extensions (JMX) client. It interacts with a servers inmemory collection of Managed Beans (MBeans), which are Java objects that provide a
management interface for an underlying resource
Using WLST Offline
Without connecting to a running WebLogic Server instance, we can use WLST to create
domain templates, create a new domain based on existing templates, or extend an existing,
inactive domain. We cannot use WLST offline to view performance data about resources in a
domain or modify security data (such as adding or removing users).
WLST offline provides read and write access to the configuration data that is persisted in the
domains config directory or in a domain template JAR created using Template Builder
Interactive Mode, Script Mode, and Embedded Mode
We can use any of the following techniques to invoke WLST commands:
i)Interactively, on the command lineInteractive Mode
ii)In batches, supplied in a fileScript Mode
iii)Embedded in Java code Embedded Mode
Interactive Mode
Interactive mode, in which we enter a command and view the response at a command-line
prompt, is useful for learning the tool, prototyping command syntax, and verifying
configuration options before building a script. Using WLST interactively is particularly useful
for getting immediate feedback after making a critical configuration change. The WLST
scripting maintains a persistent connection with an instance of WebLogic Server.
WLST can write all of the commands that we enter during a WLST session to a file. We can edit
this file and run it as a WLST script.
Script Mode
Scripts invoke a sequence of WLST commands without requiring our input, much like a shell
script. Scripts contain WLST commands in a text file with a .py file extension, for example,
filename.py. We use script files with the Jython commands for running scripts.
Using WLST scripts, we can:
i) Automate WebLogic Server configuration and application deployment
ii) Apply the same configuration settings, iteratively, across multiple nodes of a topology
iii) Take advantage of scripting language features, such as loops, flow control constructs,
conditional statements, and variable evaluations that are limited in interactive mode
iv) Schedule scripts to run at various times
v) Automate repetitive tasks and complex procedures
vi) Configure an application in a hands-free data center
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 10
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 11
iii)In command prompt write java weblogic.WLST to Initializing Weblogic Scripting Tool.
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 12
v) In command prompt write cd('Servers') and then write ls() command to show the
directory.
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 13
vii) In command prompt write get('StartupMode') to checks the value of the StartupMode
attribute for the server ManagedServer_1
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 14
Exiting WLST
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 15
www.bispsolutions.com
www.hyperionguru.com
weblogicexperts.wordpress.com |
Page 16