Sie sind auf Seite 1von 596

V8.

cover

Front cover

WebSphere Application
Server V8 Administration for
AIX
(Course code WA180 / VA180)

Student Exercises
ERC 1.2

WebSphere Education

Student Exercises

Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
DB2
System p

HACMP
System x

System i
System z

Windows is a trademark of Microsoft Corporation in the United States, other countries, or


both.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Other product and service names might be trademarks of IBM or other companies.

May 2013 edition


The information contained in this document has not been submitted to any formal IBM test and is distributed on an as is basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customers ability to evaluate and integrate them into the customers operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.

Copyright International Business Machines Corporation 2012.


This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

V5.4.0.3
Student Exercises

TOC

Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Verifying the image and course materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Exercise 1. Installing IBM Installation Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 1: Accessing your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 2: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 3: Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 4: Installing IBM Installation Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1-1
1-4
1-4
1-4
1-4
1-4
1-9

Exercise 2. Installing WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . 2-1


Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 3: Install WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Section 4: Modify WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Section 5: Create a profile with the Profile Management Tool . . . . . . . . . . . . . . . . . . 2-14
Section 6: Verify installation of WebSphere Application Server . . . . . . . . . . . . . . . . . 2-22
Section 7: Create a backup of profile1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Section 8: Explore the directory structure of WebSphere Application Server . . . . . . . 2-30
Section 9: Check the installation log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Section 10: Start the WebSphere Application Server . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37
Exercise 3. Installing IBM HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Section 3: Start Installation Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Section 4: Install IBM HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Section 5: Install IBM HTTP Server plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Section 6: Install WebSphere Customization Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Section 7: Configuring the web server plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Section 8: Confirm and test installation of IBM HTTP Server and plug-ins . . . . . . . . . 3-23
Section 9: Explore the IBM HTTP Server and plug-in installation . . . . . . . . . . . . . . . . 3-24
Section 10: Adding a web server as an IBM Installation Manager repository (optional)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Exercise 4. WebSphere Information Center installation (optional) . . . . . . . . . . . . 4-1

Copyright IBM Corp. 2012

Contents
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

iii

Student Exercises

Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2


Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Section 3: Working with the online version 8.0 collaborative information center . . . . . 4-2
Section 4: Demonstration: Installing the offline information center into an Eclipse-based
tool (reference or demonstration only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Exercise 5. Exploring the administrative console . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Section 3: Start the server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Section 4: Explore configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Section 5: Start the administrative console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Section 6: Explore the navigation tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Section 7: Explore guided activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
Section 8: Explore server settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Section 9: Examine application settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
Section 10: Examine environment settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25
Section 11: Examine resource settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27
Section 12: Examine troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28
Section 13: Modify the administrative console session timeout . . . . . . . . . . . . . . . . . 5-28
Section 14: Log out of the administrative console . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
Exercise 6. Assembling an application (demonstration) . . . . . . . . . . . . . . . . . . . . .6-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Section 1: Lab demonstration information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Section 2: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Section 3: Start the IBM Assembly and Deploy Tools for WebSphere Administration . 6-4
Section 4: Create an enterprise application project . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Section 5: Add the Plants By WebSphere utility module . . . . . . . . . . . . . . . . . . . . . . 6-11
Section 6: Add the web module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Section 7: Add a test server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
Section 8: Configure WebSphere data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22
Section 9: Export the enterprise archive (EAR) file . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
Exercise 7. Installing an application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Section 3: Start the server and the administrative console . . . . . . . . . . . . . . . . . . . . . . 7-2
Section 4: Create J2C authentication aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Section 5: Create a JDBC provider and data sources for the application . . . . . . . . . . . 7-6
Section 6: Install the PlantsByWebSphere enterprise application . . . . . . . . . . . . . . . 7-15
Section 7: Test the enterprise application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
iv

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V5.4.0.3
Student Exercises

TOC

Exercise 8. Monitored directory: Drag-and-drop deployment . . . . . . . . . . . . . . . . . 8-1


Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Section 3: Use monitored directory to deploy an enterprise application . . . . . . . . . . . . 8-2
Section 4: Use properties files with drag-and-drop deployment . . . . . . . . . . . . . . . . . 8-12
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18
Exercise 9. Problem determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Section 3: Working with log files of the application server . . . . . . . . . . . . . . . . . . . . . . . 9-3
Section 4: Set up and configure HPEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Section 5: Use the Log Viewer in the administrative console to examine log data and trace
data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
Section 6: Enable tracing for an application server and view trace data from the Log Viewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
Section 7: Collecting JVM data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21
Section 8: Clean up server1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29
Section 9: READ ONLY: Using IBM Support Assistant tools to analyze JVM data . . . 9-30
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-39
Exercise 10. Using wsadmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Section 3: Using wsadmin with Jython . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Section 4: Start wsadmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Section 5: Dealing with security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6
Section 6: Starting wsadmin to run a script in a file . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Section 7: Work with wsadmin administrative objects . . . . . . . . . . . . . . . . . . . . . . . . 10-11
Section 8: Work with applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-24
Section 9: Exploring the scripting libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28
Section 10: Using IBM Assembly and Deploy Tools to code, test, and debug Jython scripts
(demonstration only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32
Section 11: Creating the script (demonstration only) . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Section 12: Using the Jython debugger (demonstration only) . . . . . . . . . . . . . . . . . . 10-47
Section 13: Using console command assist (demonstration only) . . . . . . . . . . . . . . 10-51
Section 14: Using properties file-based configuration . . . . . . . . . . . . . . . . . . . . . . . . 10-56
Section 15: Using SWING with Jython (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-58
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-60
Exercise 11. Creating a federated cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . .
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Copyright IBM Corp. 2012

Contents
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-1
11-2
11-2
11-2

Student Exercises

Section 3: Create a deployment manager profile by using the Profile Management Tool
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-2
Section 4: Back up the Dmgr profile configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Section 5: Federate profile1 into the cell of the deployment manager . . . . . . . . . . . 11-19
Section 6: Create a custom profile and federate it into the deployment manager cell
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11-25
Section 7: Add the IBM HTTP Server to the cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31
Section 8: Add the web server to the configuration . . . . . . . . . . . . . . . . . . . . . . . . . 11-34
Section 9: Mapping modules to servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-37
Section 10: Working with the plug-in configuration file . . . . . . . . . . . . . . . . . . . . . . . 11-40
Section 11: Test the plug-in configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-44
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-46
Exercise 12. Clustering and workload management . . . . . . . . . . . . . . . . . . . . . . . .12-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Section 3: Check nodes and node agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Section 4: Creating the PlantsCluster cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Section 5: Set the applications to run on the cluster . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Section 6: Create a cluster scoped JDBC resource . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
Section 7: Test the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
Section 8: Verify session replication settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
Section 9: Test the application for session failover . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
Exercise 13. Configuring the service integration bus . . . . . . . . . . . . . . . . . . . . . . .13-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Section 3: Applications that are used in this exercise . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Section 4: The messaging environment that is created in the exercise . . . . . . . . . . . 13-6
Section 5: Setting up the service integration bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-6
Section 6: Configuring the JMS resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-23
Section 7: Installing the messaging applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-26
Section 8: Testing the applications and exploring messaging engine policies . . . . . 13-33
Section 9: Read only: Configure the scalability messaging engine policy . . . . . . . . 13-46
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-49
Exercise 14. Configuring WebSphere security . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Section 3: Verify administrative security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Section 4: Defining WebSphere administrative console users . . . . . . . . . . . . . . . . . . 14-4
Section 5: Authenticate to the WebSphere administrative console and test mapped users
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-8
Section 6: Enabling fine-grained control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-11
vi

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V5.4.0.3
Student Exercises

TOC

Section 7: Test the fine-grained access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-17


Section 8: Look at security domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-20
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25
Exercise 15. Configuring application security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Section 3: Enabling application security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2
Section 4: Securing the PlantsByWebSphere application . . . . . . . . . . . . . . . . . . . . . . 15-4
Section 5: How does it work? (optional - read only) . . . . . . . . . . . . . . . . . . . . . . . . . 15-15
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-21
Exercise 16. Configuring SSL for WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
Section 1: Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
Section 3: Create a backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-3
Section 4: Create a profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
Section 5: Examine the node certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-9
Section 6: Examine certificate expiration and updating . . . . . . . . . . . . . . . . . . . . . . . 16-16
Section 7: Plug-in key ring propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-19
Section 8: Configuring SSL for IBM HTTP Server (optional) . . . . . . . . . . . . . . . . . . . 16-24
Section 9: Testing the SSL connection (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-28
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-33
Exercise 17. Using the performance monitoring tools . . . . . . . . . . . . . . . . . . . . . 17-1
Exercise instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
Section 1: Resetting the environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
Section 2: Using your AIX system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-3
Section 3: Enabling performance monitoring and setting user preferences . . . . . . . . 17-4
Section 4: Viewing servlet and web applications module data . . . . . . . . . . . . . . . . . . 17-7
Section 5: Using the TPV performance advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-12
Section 6: Using request metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-14
Section 7: Optional: Install and configure ITCAM for WebSphere Application Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-18
Exercise review and wrap-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17-36
Appendix A. Resetting the WebSphere environment . . . . . . . . . . . . . . . . . . . . . . . . A-1
Appendix B. Introduction to accessing Citrix-based AIX lab systems . . . . . . . . . . B-1

Copyright IBM Corp. 2012

Contents
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

vii

Student Exercises

viii

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V5.4.0.3
Student Exercises

TMK

Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
AFS
AS/400
DataPower
developerWorks
IMS
Notes
Power
Rational
Tivoli
WPM

AIX
CICS
DB
Express
Lotus
OS/400
PowerVM
RDN
U
z/OS

alphaWorks
CloudBurst
DB2
HACMP
MVS
Passport Advantage
RACF
Redbooks
WebSphere
zSeries

Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in


the United States, and/or other countries.
Intel and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Microsoft, Windows and Windows Vista are trademarks of Microsoft Corporation in the
United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
VMware and the VMware boxes logo and design, Virtual SMP and VMotion are registered
trademarks or trademarks (the Marks) of VMware, Inc. in the United States and/or other
jurisdictions.
Other product and service names might be trademarks of IBM or other companies.

Copyright IBM Corp. 2012

Trademarks
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

ix

Student Exercises

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0
Student Exercises

pref

Copyright IBM Corp. 2012

xi
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Student Exercises

xii

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0
Student Exercises

pref

Exercises description
This course includes the following exercises:
Exercise 1: Installing IBM Installation Manager
Exercise 2: Installing WebSphere Application Server
Exercise 3: Installing IBM HTTP Server
Exercise 4: WebSphere Information Center installation (optional)
Exercise 5: Exploring the administrative console
Exercise 6: Assembling an application (demonstration)
Exercise 7: Installing an application
Exercise 8: Monitored directory: Drag-and-drop deployment
Exercise 9: Problem determination
Exercise 10: Using wsadmin
Exercise 11: Creating a federated cell
Exercise 12: Clustering and workload management
Exercise 13: Configuring the service integration bus
Exercise 14: Configuring WebSphere security
Exercise 15: Configuring application security
Exercise 16: Configuring SSL for WebSphere
Exercise 17: Using the performance monitoring tools
In the exercise instructions, you see each numbered step with a line
that prefixes it. You can use this line to check off each step as you
complete it to monitor your progress.
Most exercises include required sections which should always be
completed. These sections might be required before later exercises.
Some exercises also include optional sections that you can do if you
have sufficient time and want an additional challenge.

Copyright IBM Corp. 2012

Exercises description
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

xiii

Student Exercises

xiv

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V5.4.0.3
Student Exercises

AP

Verifying the image and course materials


The student books and VMware image for this course display a release number that is
called the edition revision code (ERC). To verify that the books and image are at the same
level, compare the ERC of the VMware image to the ERC of the student books.
__ 1. Determine the ERC number of your course materials.
__ a. Open all of the books you received (either printed or PDF).
__ b. Note the ERC listed on the front page of your books. The ERC number is listed
under the course title on the first page of the books as in the following example:

__ 2. Determine the ERC number of the VMware image.


__ a. On the image desktop, open the readme.txt file.
__ b. Note the ERC listed in the file. The ERC number is indicated on the ERC
number line as in the following example:

Copyright IBM Corp. 2012

Verifying the image and course materials


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

xv

Student Exercises

__ 3. Verify the image and course materials.


__ a. If the ERC number on the image does not match the ERC number on the printed
materials, notify your instructor that the materials are not synchronized.
STOP
STOP

Stop

Do NOT proceed with the exercises if the ERC numbers on the course materials and
course image do not match; ask your instructor for further direction.

xvi

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 1. Installing IBM Installation Manager


What this exercise is about
This exercise covers the installation of IBM Installation Manager and
WebSphere Customization Toolbox.

What you should be able to do


At the end of the exercise, you should be able to:
Install IBM Installation Manager
View the installation log file
Confirm the installation of Installation Manager
Install WebSphere Customization Toolbox

Introduction
IBM Installation Manager overview
IBM Installation Manager is an installation management tool that
installs and maintains Installation Manager-based software packages.
It is the Eclipse-based tool that provides you the ability to install and
modify packages, search for updates, uninstall, and roll back.
Installation Manager makes it easier for you to download and install
code for a number of IBM software packages.
Starting with WebSphere Application Server V8, Installation Manager
V1.4.3.1 or later is used for installation. It replaces InstallShield
MultiPlatform (ISMP) and Update Installer that were used to install,
update, and uninstall previous versions of WebSphere Application
Server. It also replaces the functions that the Installation Factory
previously provided. Installation Manager V1.4.3.1 comes with
WebSphere Application Server V8.
Installation Manager was originally introduced to support installation of
Rational products and is currently available for all platforms. It
supports installation of WebSphere, Rational, and other products. A
single instance of Installation Manager can manage the product
lifecycle for any Installation Manager-based product from WebSphere,
Rational, Lotus, and any other brand within IBM. It provides the
following benefits:
Consistency across all platforms
Copyright IBM Corp. 2012

Exercise 1. Installing IBM Installation Manager


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

1-1

Student Exercises

Lifecycle management of any Installation Manager installed


products
Several methods for lifecycle management activities
Common packaging
Validation and system checks are done before downloading
installation files
More efficiency on delivering new fixes and files for rollback
Installation Manager comes in the form of an installation kit, which
contains a set of Installation Manager installation files and a flat-file
repository for the Installation Manager product. The installation kit is
used only for setup and maintenance of the Installation Manager. You
need to run Installation Manager only on those systems on which you
install or update product code. You normally need only one Installation
Manager on a computer because one Installation Manager can track
any number of product installations. To begin an installation, you need
to obtain the Installation Manager product packages. Product
packages can be obtained in one of the following ways:
Access the physical disk media and use a local installation
Download the files from the Passport Advantage site and use a
local installation
Download the files from an IBM.com repository site and use a local
installation
The physical disk contains the rollup of all Installation Manager
versions for each supported operating system. When you insert a disk
into a local computer, the installation process starts automatically
because it recognizes your local operating system. If you are not using
a disk on a local computer, you must start the installation process
yourself by using the appropriate installation file.
You can also download the necessary files from an IBM.com site. After
the download, extract the downloaded files to a common location, and
then determine the files to use to start the installation.
You cannot install multiple versions of Installation Manager on the
same physical machine. If you try to install on the same physical
machine, it returns an error that indicates that it is already installed.
WebSphere Customization Toolbox overview
WebSphere Customization Toolbox is an Eclipse-based application
that includes tools for managing, configuring, and migrating various
parts of the WebSphere environment. WebSphere Customization

1-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Toolbox existed in version 7 but with vastly smaller functionality for


configuring z/OS application servers only.
WebSphere Customization Toolbox comes in two offerings, and each
offering wraps various combinations of each tool on different
platforms:
Embedded and included as a part of a WebSphere Application
Server installation
As a stand-alone offering
The version that is used in this exercise is the stand-alone WebSphere
Customization Toolbox, which provides the following tools:
Profile Management Tool (z/OS only)
z/OS Migration Management Tool
Web Server Plug-ins Configuration Tool
AIX exercise variables:
<variable>
<os_userid>
<was_userid>
<master_password>
<db2_userid>
<db2_password>
<IBM_repository>
<software_dir>
<was_root>
<profile_root>
<ihs_root>
<plugin_root>
<db2_root>

Value
root
wasadmin
web1sphere
db2inst1
was1edu
/usr/IBM-Repositories
/usr/software
/usr/IBM/WebSphere/AppServer
/usr/IBM/WebSphere/AppServer/profiles
/usr/IBM/HTTPServer
/usr/IBM/WebSphere/Plugins
/opt/IBM/db2/V9.5

Instructor exercise overview


In the first part of this exercise, students install IBM Installation Manager. In the second part
of the exercise, students use IBM Installation Manager to install WebSphere Customization
Toolbox.

Copyright IBM Corp. 2012

Exercise 1. Installing IBM Installation Manager


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

1-3

Student Exercises

Exercise instructions
Section 1: Accessing your AIX system
Note
For more information about accessing your AIX lab environment, see Appendix B.
Appendix B also contains some basic information about starting terminal windows and text
editors.

Section 2: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 3: Logging in
__ 1. When you start your machine, you are prompted for a user ID and password. At this
prompt, enter:
User ID: root
Password: web1sphere
If you are already logged in, but not as root, then log off your current ID and log in as:
root

Section 4: Installing IBM Installation Manager


Before installing Installation Manager, there are several decisions that you must make.
First, you must decide in which mode to run the Installation Manager. The mode
determines which user or user group does the installation. The choices are administrator,

1-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

non-administrator, or group. Second, you need to decide where the product files and
runtime data are going to be located.
__ 1. Locate the repository and package.
__ a. Open a terminal window by either clicking the Terminal icon on the bottom of the
screen, or expanding the Personal Applications drawer and selecting the
Terminal application.

__ b. In the terminal window, use the cd command to navigate to


/usr/IBM-repository/IIM143/IM_1431_aix.motif.ppc
Note
A repository is where the installable packages are found. The repository includes
metadata that describes the software version and how it is installed. It has a list of files that
are organized in a tree structure. The repository can be local or on a remote server.
A package is a software product that Installation Manager installs. It is a separately
installable unit that can operate independently from other packages of that software.

Copyright IBM Corp. 2012

Exercise 1. Installing IBM Installation Manager


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

1-5

Student Exercises

__ c. Type the following to start the installation as an administrator:


./install

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.

__ d. IBM Installation Manager opens. Since Installation Manager is not installed yet,
the Installation Manager package is selected by default. The package is ready to
install, as the status message indicates.

1-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click Next.
__ f.

Select I accept the terms in the license agreement. Click Next.

__ 2. Determine the location of the installation directory. The installation location must be
a directory that is named eclipse.
__ a. Accept /opt/IBM/InstallationManager/eclipse as the Installation
Manager Directory.

__ b. Click Next.

Copyright IBM Corp. 2012

Exercise 1. Installing IBM Installation Manager


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

1-7

Student Exercises

__ 3. Begin installation of the Installation Manager packages.


__ a. On the Summary page, review the packages. There is only one package, IBM
Installation Manager 1.4.3.1.

__ b. Click Install. At the bottom of the panel, observe the progress of the installation.

__ c. A message indicates that the package installation is finished.

__ d. Close IBM Installation Manager.

End of exercise

1-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


In the first part of the exercise, you installed and configured the IBM Installation Manager.
Installation Manager is the platform that is used to install WebSphere Application Server
and other tools. In the second part of the exercise, you installed WebSphere Customization
Toolbox, which is a framework for customizing installations of WebSphere Application
Server.

Copyright IBM Corp. 2012

Exercise 1. Installing IBM Installation Manager


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

1-9

Student Exercises

1-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 2. Installing WebSphere Application


Server
What this exercise is about
In this exercise, you install WebSphere Application Server Network
Deployment V8. In version 8, the installation of WebSphere
Application Server Network Deployment is a two-step process. The
first step uses IBM Installation Manager to install a set of shared
product binary files. The second step uses the Profile Management
Tool, a part of the WebSphere Customization Toolbox to create an
application server profile.
After installation, you test the product to ensure that WebSphere
Application Server was installed successfully. You also examine
several log files to verify installation.

What you should be able to do


At the end of the exercise, you should be able to:
Use IBM Installation Manager to install WebSphere Application
Server Network Deployment
Use IBM Installation Manager to modify a product feature
Use the Profile Management Tool to create a profile
Verify that the installation was successful by examining log files
Start and stop the application server

Introduction
In this exercise, you install WebSphere Application Server Network
Deployment V8.
WebSphere Application Server relies on TCP/IP networking, so you
must have TCP/IP correctly configured, and it is important that the
host name of the machine remains unchanged.
The lab workstation should be configured appropriately. Make sure
that you know the host name of the machine because you need for this
exercise.
<variable>
<os_userid>
<was_userid>
Copyright IBM Corp. 2012

Value
root
wasadmin
Exercise 2. Installing WebSphere Application Server
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-1

Student Exercises

<variable>
<master_password>
<db2_userid>
<db2_password>
<IBM_repository>
<software_dir>
<was_root>
<profile_root>
<ihs_root>
<plugin_root>
<db2_root>

Value
web1sphere
db2inst1
was1edu
/usr/IBM-repository
/usr/software
/usr/IBM/WebSphere/AppServer
/usr/IBM/WebSphere/AppServer/profiles
/usr/IBM/HTTPServer
/usr/IBM/HTTPServer/Plugins
/home/db2inst1/sqllib

Requirements

2-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Install WebSphere Application Server


All exercises in this chapter depend on the availability of specific equipment in your
classroom.
__ 1. Start IBM Installation Manager.
__ a. Open a terminal window.
__ b. Navigate to /opt/IBM/InstallationManager/eclipse/
__ c. Type ./IBMIM to start IBM Installation Manager.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-3

Student Exercises

__ d. The Installation Manager launches, showing the Install Packages wizard.


Installation Manager contains a number of wizards to help install and maintain
various packages.

Information
The Installation Manager uses repositories to identify the packages or updates to install. A
repository is a location that stores data for installing, modifying, rolling back, updating, or
uninstalling packages. Each installed package has an embedded location for its default
update repository. You can add, edit, or remove repositories for use by the Installation
Manager.
By default, the Installation Manager is configured to use a service repository which is made
up of repositories at IBM.com. In this case, Internet access is required. If a machine does
not have Internet access, the Installation Manager can be configured to look for a local
repository. Updates can be downloaded and placed in a temporary directory on the
machine. The Installation Manager looks in this directory for installable updates. You must
manually configure local repositories.

2-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. The Install Packages wizard takes you through the installation process for one or
more packages. To locate the packages, you must configure the repository.
__ a. Select File > Preferences.
__ b. Select Repositories.

__ c. Click Add Repository....

__ d. Browse to /usr/IBM-repository/WAS8/repository.config. Click Open.

__ e. Click OK.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-5

Student Exercises

__ f.

The repository is added to the list of repositories.

__ 3. Test the connection to the local repository. This step is more important when you
configure remote repositories and need access to the repository to complete a
product installation.
__ a. Click Test Connections.

__ b. A message indicates that the repository is connected. Click OK.

__ c. Click OK to dismiss the dialog box.

2-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. Install WebSphere Application Server.


__ a. Click the Install icon.

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-7

Student Exercises

__ b. Installation Manager lists all the packages that it finds in the configured
repositories. In this case, it searched the repository and found the following
packages. Select IBM WebSphere Application Server Network Deployment.

__ c. The Install Packages panel is updated to indicate the status for Version 8.0.0.0 to
Will be installed. Click Next.
__ d. The Licenses panel opens. You can read the license agreements for any of the
packages. Select I accept the terms in the license agreement. Click Next.

__ e. On the Install Packages panel, accept the default location of


/usr/IBM/IMShared for the Shared Resources Directory and click Next.

__ f.

2-8

On the Location panel, the package for WebSphere Application Server Network
Deployment V8.0 is selected along with Create a new package group. Verify

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

that the installation directory is /usr/IBM/WebSphere/AppServer. The package


group name is automatically modified to be unique.

EXempty

__ g. Click Next.
__ h. The Features panel indicates the individual language packs for the WebSphere
Application Server runtime environment and administrative console. Keep the
default setting. Click Next.

__ i.

The Features panel lists additional features for installation. Note the default
selections. Keep the default selections (including the IBM 64-bit SDK for Java,
Version 6). Click Next.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-9

Student Exercises

Note
Do not select the Sample application feature. This feature is added to the installation later
in this exercise.

__ j.

On the Summary panel, confirm your previous choices. Verify your information
with the following figure. You can click Back to modify any choices.

__ k. Click Install to begin the installation. Depending on system resources, the


installation takes approximately 510 minutes. During the installation, verify the
progress with the progress bar at the bottom of the window.
__ l.

When the installation completes, the installation results are displayed at the top
of the panel. Select None in the area that indicates programs to start. Click
Finish.

__ m. Do not close Installation Manager as it is used in the next section of the


exercise.

2-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 4: Modify WebSphere Application Server


You can use Installation Manager to add or remove a product feature from an installed
package. To modify an installed package, Installation Manager must have access to the
repository that contains the package installation files.
In this section of the exercise, you modify the WebSphere Application Server installation
from Section 1 to include the sample applications.
__ 1. Modify the installation to include the sample applications.
__ a. From the main panel of Installation Manager, click Modify.

__ b. The Modify Packages panel is displayed. This panel lists the packages that are
installed and can be modified. Select IBM WebSphere Application Server

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-11

Student Exercises

Network Deployment V8.0, which is installed in the following directory:


/usr/IBM/WebSphere/AppServer.

__ c. Click Next.
__ d. On the Features panel listing individual language packs, keep the default value.
Click Next.
__ e. The Features panel lists the features for installation. Add the Sample
applications. Click Next.

2-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
In version 8.0, the only sample that is shipped with the product is PlantsByWebSphere
(PBW), which was updated to use Java Platform, Enterprise Edition 6 technology. The
PlantsByWebSphere sample application is available at
/usr/IBM/WebSphere/AppServer/samples after installation.
All previous samples included in version 7 that are still relevant are online along with
several new samples. You can obtain information about the samples in the WebSphere
Application Server Information Center.

__ f.

In the Summary panel, verify that the added features include the sample
applications. Click Modify.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-13

Student Exercises

__ g. When the installation completes, the installation results are displayed at the top
of the panel. Click Finish.

__ h. Close the Installation Manager.


__ i.

Open a terminal and navigate to /usr/IBM/WebSphere/AppServer/samples.


Verify that the PlantsByWebSphere sample application is in the directory by
using the ls -la command.

Section 5: Create a profile with the Profile Management Tool


After the core product files for WebSphere Application Server are installed, you must
create a profile to make the product functional. In this section of the exercise, you create an
application server profile named profile1 with the Profile Management Tool in the
WebSphere Customization Toolbox. The Profile Management Tool was added to the
WebSphere Customization Toolbox during the installation of WebSphere Application
Server in Section 1 of this exercise.
__ 1. Create an application server profile with the Profile Management Tool.
__ a. In a terminal window, navigate to
/usr/IBM/WebSphere/AppServer/bin/ProfileManagement
__ b. Enter the following command to start the Profile Management Tool:
./pmt.sh

2-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. The WebSphere Customization Toolbox opens to the Profile Management Tool.


There are no profiles in the list.

__ d. Click Create.
__ e. In the Environment Selection panel, select Application server. Click Next.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-15

Student Exercises

Information
Profiles allow you to create multiple runtime environments on a system without installing
the core product files again. When using the Profile Management Tool, there are several
types of profiles that can be created:
Cell (deployment manager and a federated application server)
A cell creates two profiles: a management profile with a deployment manager
and an application server profile. The application server is federated to the cell of
the deployment manager.
Management
A management profile provides the server and services for managing multiple
application server environments. The administrative agent manages application
servers on the same machine. The Network Deployment edition also includes a
deployment manager for tightly coupled management and a job manager for
loosely coupled management of topologies that are distributed over multiple
machines. Each instance of the deployment manager defines a unique cell.
Application server
An application server environment runs your enterprise applications. An
application server is managed from its own administrative console and functions
independently from all other application servers. A new instance of a stand-alone
node with a single application server is created. Stand-alone nodes have only
one application server.
Custom profile
A custom profile contains an empty node, which does not contain an
administrative console or servers. The typical use for a custom profile is to
federate its node to a deployment manager. After federating the node, use the
deployment manager to create a server or a cluster of servers within the node.
Secure proxy (configuration-only)
A secure proxy profile is for use with a DMZ secure proxy server. You cannot
start the secure proxy server on the Network Deployment installation. This
configuration-only profile is intended only to be used to configure the profile with
the administrative console. After you configure the profile, you can export the
profile configuration and then import it into the secure proxy profile in your DMZ.

2-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

In the Profile Creation Options panel, select Advanced profile creation. This
selection allows you to specify your own values for some settings. Click Next.

__ g. In the Optional Application Deployment panel, keep the default selections. Click
Next.

__ h. In the Profile Name and Location panel, make the following modifications:
- Profile name: profile1

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-17

Student Exercises

- Profile directory: /usr/IBM/WebSphere/AppServer/profiles/profile1

Information
The Server runtime performance tuning settings is a new feature in version 8. The
performance monitoring infrastructure service is enabled to gather statistics so you can
further tune the server yourself. Settings include:
Standard: The standard settings are optimized for general-purpose usage with
conservative settings.
Peak: The peak settings are optimized for runtime performance in environments
where updates to applications are infrequent.
Development: The development settings are optimized for environments with
less powerful hardware and where updates to applications are frequent.

__ i.

Click Next.

__ j.

In the Node and Host Names panel, enter the following values (the default
values need to be changed):
- Node name: was8host01Node01
- Server name: server1

2-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

- Host name: was8host01

EXempty

__ k. Click Next.
__ l.

The Administrative Security panel specifies whether to use initial administrative


security. If selected, you specify an initial administrative user ID and password
that is used for administrative activities such as console access. Verify that
Enable administrative security is selected. Enter the following values:
- User name: wasadmin
- Password: web1sphere
- Confirm password: web1sphere

__ m. Click Next.
__ n. In the Security Certificate (Part 1) panel, accept the default selection. Click
Next.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-19

Student Exercises

__ o. In the Security Certificate (Part 2) panel, accept the default selection. Click
Next.
__ p. In the Port Values Assignment panel, accept the default values. Click Next.
__ q. In the Web Server Definition panel, accept the default value. Do not create a web
server definition. Click Next.
__ r.

Review the Profile Creation Summary panel. Click Create.

2-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ s. The profile creation completes successfully in several minutes. In the Profile


Creation Complete panel, clear the check box for Launch the First steps
console. Click Finish.

__ t.

The newly created profile is listed in the Profile Management Tool.

__ u. Exit the Profile Management Tool by clicking File > Exit.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-21

Student Exercises

Section 6: Verify installation of WebSphere Application Server


The First steps console allows you to start or stop the server, access the WebSphere
Information Center, and launch various tools. Each application server profile has an
associated First steps console.
__ 1. Start the First steps console for profile1.
__ a. From a terminal window, navigate to
/usr/IBM/WebSphere/AppServer/profiles/profile1/firststeps.
__ b. Run the following script:
./firststeps.sh
__ c. The First steps console for profile1 opens.
__ 2. Verify that the server is installed and starts properly.
__ a. Click Installation verification.

__ b. The installation verification test tool runs and displays messages to indicate the
verification status. Use the scroll bar to view all messages. At the bottom of the
message list are the messages (expect some errors and warnings before the
final success messages):

2-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

IVTL0070I: The Installation Verification Tool verification succeeded.


IVTL0080I: The installation verification is complete.

__ c. Close First steps output - Installation verification.


__ d. From the First steps console, click Administrative console to start the
administrative console for profile1. The application server from profile1 was
started in the previous step during the installation verification test, so the
administrative console is able to connect to the running application server.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-23

Student Exercises

__ e. A window opens with a warning of an unknown certificate. Select Accept this


certificate permanently. Click OK.

__ f.

Click OK in the dialog box warning of a Domain Name Mismatch.

__ g. Click OK in the dialog box with a Security Warning.


Information
What is happening here? Why are the warnings displayed?
Without going in to too many details, there are two issues here. Both involve the fact that
the browser is using SSL to communicate with the administrative console application. To
establish the SSL connection, the application server presents a certificate to the browser.
Now the browser complains about two aspects of this certificate and asks the user if it
should continue. The two issues are:
The host name for the certificate does not match what was entered in the URL.
In this case, the URL might use localhost, and the certificate was created (during
profile creation) with a mapping to the host IP address. To resolve this issue,
either specify an appropriate host name during the certificate creation or use the
host name in the certificate when entering the URL into the browser.
The certificate that is presented to the browser is signed by an unknown
certificate authority. By default, an internal self-signed certificate signs the
certificates that are created for the WebSphere cell. As such, the browser does
not necessarily trust this unknown certificate authority and therefore asks the
user if it is appropriate to proceed.

__ h. Log in to the administrative console.


2-24 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

- User ID: wasadmin


- Password: web1sphere
- Click Log in.

Information
The user ID wasadmin was created during the profile creation process. It does not exist in
the operating system registry or an LDAP registry, but instead exists in a file-based registry
within the application server configuration. Now that the profile is created, security can be
reconfigured to use any user registry.

__ 3. The main page for the WebSphere Integrated Solutions Console shows up.
__ 4. Verify that the DefaultApplication is installed and is running.
__ a. Using the administrative console navigation tree, click Applications >
Application Types > WebSphere enterprise applications.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-25

Student Exercises

The application status for the DefaultApplication is displayed as a green arrow to


indicate that the application is running. If you place your cursor over the arrow, a
message indicates that the application is Started.

2-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Open another browser window and enter the following URL:


http://localhost:9080/snoop
This URL runs a servlet that is called Snoop, which comes with the
DefaultApplication and displays a page with information about the runtime
environment of the server.
This page provides further confirmation that the application server is operating
correctly.

__ c. Close the browser that is running Snoop servlet.


__ d. Close the administrative console by clicking Logout. The administrative console
is examined more in later exercises. Close the browser.
__ 5. Exit from the First steps console.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-27

Student Exercises

Section 7: Create a backup of profile1


__ 1. Before continuing, create a backup of profile1 with the backupConfig command.
The backupConfig command is a utility to back up the configuration of your profile
to a compressed file. You can later restore this configuration if needed. When the
backupConfig command runs, it first stops the application server before creating
the backup file.
__ a. Run the backupConfig command. From a terminal window, change to
/usr/IBM/WebSphere/AppServer/profiles/profile1/bin
__ b. Create the backup by entering the following command: ./backupConfig.sh
__ c. As the backup process starts, you are challenged for a user ID and password.
- For User Identity, enter: wasadmin
- For User Password, enter: web1sphere
- Click OK.

Information
You are prompted for credentials because administrative security was enabled during the
creation of the profile. As such, all administrative functions, including backups,
administrative console access, and wsadmin scripts, require authentication.
During the rest of the labs, enter the administrative user ID and password when prompted.
The lab instructions do not always indicate this step.

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
capture, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

2-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. When the backup finishes, a message indicates the number of files that were
backed up successfully.

Information
By default, all servers on the node are stopped before the backup is made to prevent
partially synchronized information from being saved. The -nostop option can be used with
the backupConfig command to prevent the servers from being stopped before backing up
the configuration.

__ 2. The command creates a backup file that is called WebSphereConfig_<date>.zip


with the current date and places the compressed file in the
/usr/IBM/WebSphere/AppServer/profiles/profile1/bin/directory.
To distinguish between multiple backups, modify the name with something more
descriptive, such as the name of the profile.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-29

Student Exercises

__ a. Copy the backup file to another directory to safe keeping. Enter the following
command:
cp WebSphereConfig_<YYYY-MM-DD>.zip
/usr/software/backups/backup_profile1.zip

Information
If you need to restore the configuration directory structure at a later time, you can use the
restoreConfig command. You need to specify the name of the backup file.
The command restores the entire directory:
/usr/IBM/WebSphere/AppServer/profiles/profile1/config

__ 3. Verify that the application server is stopped. Enter the following the command:
./serverStatus.sh server1

Information
You can also run the serverStatus command with the -all option to give more details
on all application servers on the node.

Section 8: Explore the directory structure of WebSphere Application


Server
Now that WebSphere Application Server is installed, look through the directory structure
and review what you installed.
__ 1. Explore the WebSphere Application Server profile1 directory.
__ a. Using a terminal window, navigate to the directory
/usr/IBM/WebSphere/AppServer/profiles/profile1.
2-30 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. Review the subdirectories and their contents:

bin: programs, scripts, and DLLs


config: configuration files
configuration: configuration settings
consolepreferences
etc: dummy key ring, keytab files, plug-in keys
firststeps: firststeps utility
installableApps: applications that can be installed
installedApps: applications that are installed in WebSphere Application Server
installedConnectors: installed resource adapters
installedFilters
logs: trace and log files
properties: configuration property files that WebSphere uses
servers: server configuration
temp: temporary area for files that are created during JSP processing
tranlog
wstemp: temporary area for events

Section 9: Check the installation log files


A number of log files are created during the installation and profile creation process. It is
useful to check these files to verify that the installation completed successfully.
__ 1. Change to the manageprofiles directory under the WebSphere Application Server
logs directory.
__ a. Using a text editor (such as dtpad, vi, or emacs), open and view the
profile1_create.log file in the directory
/usr/IBM/WebSphere/AppServer/logs/manageprofiles. This log records
creation events that occurred when creating the profile profile1.
__ b. Look for the log message INSTCONFSUCCESS: Success: Profile profile1
now exits to verify that profile1 was created successfully.

__ 2. Change to the logs directory under profile1.


__ a. Navigate to the directory
/usr/IBM/WebSphere/AppServer/profiles/profile1/logs

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-31

Student Exercises

__ b. Open and view the backupConfig.log file. This log records events that occur
when creating a backup of the configuration directory structure.
__ c. Open and view the ivtClient.log file. This logs results from the installation
verification command.
__ d. Open and view the AboutThisProfile.txt file. This file logs information about
the profile, including the <profile_root>, the profile name, the node and host
names, and a number of the ports with which the profile was configured.

Section 10:Start the WebSphere Application Server


Start WebSphere Application Server in profile1 and view the log files.
__ 1. The log file, startServer.log, records the startup messages from the server. This
log file is in the WebSphere Application Server profile1 installation directory
/usr/IBM/WebSphere/AppServer/profiles/profile1/logs/server1
__ a. Navigate to the directory
/usr/IBM/WebSphere/AppServer/profiles/profile1/logs/server1

2-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Open the startServer.log file and examine the contents of the file.

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-33

Student Exercises

Information
A tail utility can also be helpful when looking at log files. The tail utility makes it easier to
monitor what is being actively written to a text-based log file.
Enter: tail startServer.log
This command displays the last few lines of the file startServer.log, where
you see the startup messages from the server.
You can also use the tail -f startServer.log, which continuously updates
your panel when new messages are added to the file. This approach is more
convenient than with a text editor. Text editors show only the messages that are
written to the file at a point in time, whereas the tail -f command displays the
file contents continuously as new entries are added.
.

__ 2. Using the command rm *.log, delete all the log files in the directory
/usr/IBM/WebSphere/AppServer/profiles/profile1/logs/server1. When the
server is started, new log files are created. This step ensures that new log files are
produced.
__ 3. If it is not already started, start the WebSphere Application Server in profile1.
__ a. In a terminal window, change to
/usr/IBM/WebSphere/AppServer/profiles/profile1/bin directory and enter
the command:
./startServer.sh server1

__ b. Verify that the application server is started by entering the following command
(notice that you can specify the user name and password on the command line):

2-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
./serverStatus.sh server1 -username wasadmin -password web1sphereYou can also

run the serverStatus command with the -all option to provide more details on all
application servers on the node.

__ 4. After successful startup of the server, review the startServer.log file for
successful start messages.
__ a. Navigate to the directory
/usr/IBM/WebSphere/AppServer/profiles/profile1/logs/server1
__ b. Open the startServer.log file and examine the contents of the file. Look for
the message Server server1 open for e-business, which indicates the
server is ready.
__ 5. Open and view the SystemErr.log file. This log contains the standard output from
the Java virtual machine (JVM) running the application server. This file can have
numerous messages, but does not include any error messages if the server started
correctly.
__ 6. Open and view the SystemOut.log file. This log contains the standard output from
the Java virtual machine (JVM) running the application server. This file contains
more detailed messages, indicating the steps that are done during startup of the
server.
Steps that are documented in the log include security initialization, messaging
initialization, registering resources in the JNDI namespace, EJB initialization, web
module initialization, and HTTP transport initialization. The log also contains
messages from application System.out print line code.
Information
You can look again at the messages in the SystemOut.log or SystemErr.log files as
you use the server and perform more functions. It might be a good idea to keep a tail -f
on these files for the duration of the labs.
ok

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-35

Student Exercises

__ 7. Stop the WebSphere Application Server, profile1. You can provide the user name
and password on the command line or through the dialog box when prompted.
__ a. In a terminal window, change to
/usr/IBM/Websphere/AppServer/profiles/profile1/bin and enter the
command:
./stopServer.sh server1

__ b. Enter the following login information when prompted:


Username: wasadmin
Password: web1sphere

__ c. Verify that the application server is stopped by entering the following command:
./serverStatus.sh server1

2-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


The first part of the exercise looked at the installation of WebSphere Application Server V8.
The Profile Management Tool was also used to create an application server profile called
profile1.

End of exercise

Copyright IBM Corp. 2012

Exercise 2. Installing WebSphere Application Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

2-37

Student Exercises

2-38 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 3. Installing IBM HTTP Server


What this exercise is about
This exercise covers the installation and configuration of IBM HTTP
Server and its WebSphere Application Server plug-ins.

What you should be able to do


At the end of the exercise, you should be able to:
Install IBM HTTP Server with IBM Installation Manager
Confirm and test the installation of IBM HTTP Server
Install Web Server Plug-ins for WebSphere Application Server
Install WebSphere Customization Toolbox
Configure the Web Server Plug-in for WebSphere Application
Server
Examine the installed directories and files for IBM HTTP Server
and the plug-ins

Introduction
A main theme in this release is the separation of installation from
configuration. IBM Installation Manager is the installation technology of
choice. The Installation Manager is a program that helps you install,
import, update, modify, and uninstall packages on your computer. The
Installation Manager also provides tools for managing licenses for the
packages that it installs, and for updating and modifying packages. If
the Installation Manager is installed on your computer, it is updated to
ensure that the computer has the latest version installed.
In this exercise, you use IBM Installation Manager to install IBM HTTP
Server and WebSphere Application Server plug-ins. The plug-ins are
configured with the Web Server Plug-ins Configuration Tool (PCT),
which represents new configuration tool support added in version 8. In
WebSphere Application Server V8, installation and configuration are
separated into two different steps so that the HTTP Server and the
Plug-ins installers do not offer the configuration steps that existed in
version 7. Instead, administrators use the Web Server Plug-ins
Configuration Tool (PCT) to configure various web server plug-ins.
Administrators can also configure IBM HTTP Server Admin server.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-1

Student Exercises

The Web Server Plug-ins Configuration Tool (PCT) is one of several


tools that are incorporated into the WebSphere Customization
Toolbox. PCT supports five different types of web server plug-ins, and
its main role is to collect user input data in an organized way and pass
it to the underlying plug-ins runtime component for processing.
<variable>
<os_userid>
<was_userid>
<master_password>
<db2_userid>
<db2_password>
<IBM_repository>
<software_dir>
<was_root>
<profile_root>
<ihs_root>
<plugin_root>
<db2_root>

Value
root
wasadmin
web1sphere
db2inst1
was1edu
/usr/IBM-Repositories
/usr/software
/usr/IBM/WebSphere/AppServer
/usr/IBM/WebSphere/AppServer/profiles
/usr/IBM/HTTPServer
/usr/IBM/WebSphere/Plugins
/opt/IBM/db2/V9.5

Requirements
Completion of the Installing IBM Installation Manager and Installing
WebSphere Application Server exercises.

3-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-3

Student Exercises

Section 3: Start Installation Manager


__ 1. Start IBM Installation Manager.
__ a. Open a terminal window by either clicking the Terminal icon on the bottom of the
screen, or expanding the Personal Applications drawer and selecting the
Terminal application.

__ b. Navigate to /opt/IBM/InstallationManager/eclipse/
__ c. Enter ./IBMIM to start IBM Installation Manager.

3-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Installation Manager opens to the main page.

Section 4: Install IBM HTTP Server


The Installation Manager is used to install IBM HTTP Server.
__ 1. Configure a repository so Installation Manager can locate the IBM HTTP Server
package files.
__ a. Select File > Preferences.
__ b. Select Repositories.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-5

Student Exercises

__ c. Click Add Repository.

__ d. Browse to /usr/IBM-repository/WAS8_Supplemental/repository.xml. Click


OK.

3-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click OK.

__ 2. Test the connection to the local repository. This step is more important when you
configure remote repositories and need access to the repository to complete a
product installation.
__ a. Click Test Connections.

__ b. A message indicates that the repository is connected. Click OK.

__ c. Click OK.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-7

Student Exercises

__ 3. Start the installation of IBM HTTP Server packages.


__ a. From the main page of Installation Manager, click Install.

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
captures, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

__ b. From the list of installation packages, select only IBM HTTP Server for
WebSphere Application Server. This action also selects Version 8.0.0.0.

3-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Click Next. This action retrieves and validates the package files from the
repository.
__ d. Select I accept the terms in the license agreement. Click Next.
__ e. On the Location panel, select Create a new package group. It is selected
already.
__ f.

On the Location panel, accept the default of /usr/IBM/HTTPServer as the


Installation Directory.

__ g. Click Next.
__ h. On the next panel, accept the defaults (including IBM HTTP Server 64-bit with
Java, Version 6). Click Next.
__ i.

On the Features panel for Configuration for IBM HTTP Server for WebSphere
Application Server 8.0.0.0, enter 80 as the HTTP port.

__ j.

Click Next.

__ k. On the Summary panel, verify that IBM HTTP Server for WebSphere
Application Server 8.0.0.0 is the package for installation. Click Install.
__ l.

Watch the installation proceed at the bottom of the window.

__ m. When the installation of the packages is complete, a message is displayed.

__ n. Click Finish.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-9

Student Exercises

Section 5: Install IBM HTTP Server plug-in


The plug-ins are necessary for routing requests from the web server and WebSphere
Application Server.
__ 1. Start the installation of the Web Server Plug-ins for IBM WebSphere Application
Server.
__ a. From the main page of Installation Manager, click Install.
__ b. From the list of installation packages, select only Web Server Plug-ins for
WebSphere Application Server. This action also selects Version 8.0.0.0.

__ c. Click Next. This action retrieves and validates the package files from the
repository.
__ d. Select I accept the terms in the license agreement. Click Next.
__ e. Select Create a new package group.
__ f.

Enter /usr/IBM/WebSphere/Plugins as the Installation Directory.

__ g. Click Next.
__ h. On the Features panel, select Web Server Plug-ins for WebSphere
Application Server 8.0.0.0 and IBM 64-bit Runtime Environment for Java,
Version 6 as the feature for installation.
__ i.

Click Next.

__ j.

On the Summary panel, click Install.

3-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ k. When the installation of the packages is complete, a message is displayed.

__ l.

Click Finish.

Section 6: Install WebSphere Customization Toolbox


The WebSphere Customization Toolbox includes tools for managing, configuring, and
migrating various parts of the WebSphere Application Server environment. There are three
tools included:
Profile Management Tool for z/OS only
z/OS Migration Tool
Web Server Plug-ins Configuration Tool
In this section, the Web Server Plug-ins Configuration Tool (PCT) is installed as part of the
WebSphere Customization Toolbox. The PCT includes both browser-based and
command-line options. The other tools are not necessary for the lab exercise environment.
The Web Server Plug-ins Configuration Tool is needed in the next section to configure the
web server plug-in. The plug-in configuration allows the web server to connect correctly
with the application server.
__ 1. Start the installation of WebSphere Customization Toolbox.
__ a. From the main page of Installation Manager, click Install.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-11

Student Exercises

__ b. From the list of installation packages, select WebSphere Customization


Toolbox. This action also selects Version 8.0.0.0.

__ c. Click Next. This action retrieves and validates the package files from the
repository.
__ d. Select I accept the terms in the license agreement. Click Next.

3-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Accept /usr/IBM/WebSphere/Toolbox as the Installation Directory. Click Next.

__ f.

On the Features panel, select Web Server Plug-ins Configuration Tool. Clear
any other check boxes.

__ g. Click Next.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-13

Student Exercises

__ h. On the Summary panel, verify that the only package that is listed under the
WebSphere Customization Toolbox 8.0.0.0 is the Web Server Plug-ins
Configuration Tool.

__ i.

Click Install.

__ j.

When the installation of the packages is complete, click Finish.

__ k. Close IBM Installation Manager.

Section 7: Configuring the web server plug-in


After products are installed with the IBM Installation Manager, other tools are used to
complete the configuration processes. A new tool in version 8, the Web Server Plug-ins
Configuration Tool (PCT) is available for configuring web server plug-ins. The PCT creates
one or more configurations for the web server plug-ins that can direct requests from a web
client through the web server. The PCT edits the configuration file or files for a web server
by creating directives that point to the location of the binary plug-in module and the plug-in
configuration file.
In this part of the exercise, the Web Server Plug-ins Configuration Tool (PCT) is used to
configure the web server plug-in.
__ 1. Start the WebSphere Customization Toolbox.
__ a. Using a terminal window, navigate to /usr/IBM/WebSphere/Toolbox/WCT
3-14 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Enter the following command to start WebSphere Customization Toolbox:


./wct.sh
__ c. Select Web Server Plug-ins Configuration Tool and click Launch Selected
Tool.

__ d. WebSphere Customization Toolbox opens:

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-15

Student Exercises

__ 2. Since the installed web server plug-in that you want to use is not in the list, you must
add it. Add the location of the web server plug-in runtime files.
__ a. In the Web Server Plug-in Runtime Locations panel, click Add.

__ b. In the Add Web Server Plug-in Location panel, enter the following values:
- In the Name field, enter: webserver1
- In the Location field, Browse to /usr/IBM/WebSphere/Plugins

__ c. Verify the settings and click Finish.


__ d. The web server is added to the location list.

3-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. In the Web Server Plug-in Configurations panel, click Create.

__ f.

Verify that IBM HTTP Server V8 is selected and click Next.

__ g. In the Web Server Architecture Selection panel, select 64 bit. Click Next.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-17

Student Exercises

__ h. In the Web Server configuration File Selection panel, enter the following
values:
- Select the existing IBM HTTP Server httpd.conf file:
/usr/IBM/HTTPServer/conf/httpd.conf
- Specify the Web server port: 80

__ i.

Click Next.

3-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ j.

In the Setup IBM HTTP Server Administration Server panel, enter the
following values (Note: you need to expand the dialog box to see all the fields):
- Verify that the Setup IBM HTTP Server Administration Server check box is
selected.
- HTTP Administration Port: 8008
- Verify that the Create a user ID for IBM HTTP Administration Server
authentication check box is selected.
- User ID: ihsadmin
- Password: web1sphere
- Confirm Password: web1sphere

__ k. Click Next.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-19

Student Exercises

__ l.

On the Setup IBM HTTP Server Administration Server panel, enter ihs as
the User ID and Group fields. This option allows you to create a unique user ID
and group for IBM HTTP Server administration.

__ m. Click Next.
__ n. In the Web Server Definition Name panel, verify that the unique name for the
web server is webserver1 and click Next.

3-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ o. On the Configuration Scenario Selection panel, select the Remote option and
enter the host name: was8host01
Click Next to continue.

Note
For a remote configuration, the Web Server Plug-ins Configuration Tool configures the web
server to use the plugin-cfg.xml file that is maintained on the web server machine in the
plugins_root/config/web_server_name directory. This file requires periodic
propagation. Propagation means copying the current plugin-cfg.xml file from the
application server machine to replace the
plugins_root/config/web_server_name/plugin-cfg.xml file.
For a local configuration, the Web Server Plug-ins Configuration Tool configures the web
server to use the plugin-cfg.xml file that is within the application server profile. The
stand-alone application server regenerates the
profile_root/config/cells/cell_name/nodes/web_server_name_node/servers/
web_server_name/plugin-cfg.xml file whenever a change occurs in the application
server configuration that affects deployed applications.

__ p. On the Plug-in Configuration Summary panel, review your settings. Click


Configure.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-21

Student Exercises

__ q. When the configuration is complete, the Plug-in configuration Result panel


displays the results. Clear the check box to Launch the plug-in configuration
roadmap. Click Finish.

__ r.

The configuration looks as shown:

__ s. Exit the WebSphere Customization Toolbox.

3-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 8: Confirm and test installation of IBM HTTP Server and plug-ins
__ 1. Verify that IBM HTTP Server is started. Note the output from each command.
__ a. From a terminal window, enter: ps -ef | grep httpd
was8host01:/opt/IBM/WebSphere/Toolbox/WCT # ps -ef | grep http
root 29457 20740 0 17:39 pts/1 00:00:00 grep httpd
__ b. If no httpd processes are running from <ihs_root>, start both the HTTP Server
and the HTTP Administrative Server:
- Navigate to /usr/IBM/HTTPServer/bin
- Run: ./apachectl start
No output from apachectl command
- Run: ./adminctl start
was8host01:/opt/IBM/HTTPServer/bin # ./adminctl start
__ 2. ./adminctl start: admin http startedCheck the status of the IBM HTTP
Server with a browser.
__ a. Open a Firefox browser. There are two easy ways to start Firefox on AIX. The
first is to enter firefox in a terminal window. The second is to click the Firefox
icon in the Personal Applications drawer.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-23

Student Exercises

__ b. Enter the following URL: http://localhost


__ c. If the IBM HTTP Server is started, the default IBM HTTP Server window opens.

__ d. Close the browser.

Section 9: Explore the IBM HTTP Server and plug-in installation


Explore the IBM HTTP Server directory structure
Now that IBM HTTP Server is installed, look through the directory structure and review
what you installed.
__ 1. Explore the IBM HTTP Server directory.
__ a. Open a terminal window.
__ b. Navigate to the directory /usr/IBM/HTTPServer.
__ 2. Review some of the subdirectories and their contents:

bin: programs, scripts, and shared libraries


conf: configuration files
logs: trace, error, and log files
properties: messages, versions

__ 3. Explore the WebSphere Application Server plug-ins directory.


__ a. Navigate to the directory /usr/IBM/WebSphere/Plugins.
__ b. Review some of the subdirectories and their contents:

bin: programs, scripts, and DLLs


logs: config and web server files
plugins: JAR files
properties: messages, versions

3-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Check installation log files


A number of log files are created during the installation process. It is useful to check these
files to verify that the installation completed successfully.
__ 4. Change to the installation logs directory under the IBM HTTP Server installation
directory.
__ a. Navigate to the directory /usr/IBM/HTTPServer/logs/postinstall.
__ b. Using a text editor (such as dtpad, vi, or emacs), open the postinstall.log
file. This file records installation status messages.
__ c. Look for the log message INSTCONFSUCCESS at the end of the log to verify that
the installation was successful.

__ d. Close the log file.


__ 5. Change to the Plugins/logs/config directory under the WebSphere directory.
__ a. Navigate to the directory /usr/IBM/WebSphere/Plugins/logs/config
__ b. Open installIHSPlugin.log. This log records WebSphere Application Server
plug-ins installation status messages.
__ c. Look for the log message Install complete to verify that the installation of the
plug-ins was successful.
__ d. Close the log file.

Review configuration and error files


Although no further configuration is required for this lab exercise, more configuration of the
IBM HTTP Server and administration server is possible through configuration files that are
in the conf directory of the web server.
__ 6. Change to the configuration directory under the IBM HTTP Server installation
directory.
__ a. Navigate to the directory /usr/IBM/HTTPServer/conf

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-25

Student Exercises

__ b. Open the httpd.conf file. This file contains configuration data for the IBM
HTTP Server.
__ c. Scroll to the bottom of this file and notice the last two lines. They define the
module that is loaded as the WebSphere plug-in and define the path to the
plugin-cfg.xml file.

__ d. Close the file when you are finished with your review.
__ e. Notice the httpd.conf.default file. This file contains the original configuration
parameters. It can be copied, if you need to restore or use the original
configuration parameters.
__ f.

Open the admin.conf file. This file contains configuration data for the
administration server. Close the file when you are finished with your review.

__ g. Notice the admin.conf.default file. This file contains the original configuration
parameters. It can be copied, if you need to restore or use the original
administrative configuration parameters.

Section 10:Adding a web server as an IBM Installation Manager


repository (optional)
IBM Installation Manager uses repositories to store product package files. Repositories can
be located locally or remotely. In this section of the exercise, you configure a web server as
a remote repository.
__ 1. Verify that the web server is started.
__ a. From a terminal window, enter: ps -ef | grep httpd
__ b. If no httpd processes are running from /usr/IBM/HTTPServer, start both the
HTTP Server and the HTTP Administrative Server:
- Navigate to /usr/IBM/HTTPServer/bin
- Run ./apachectl start
- Run ./adminctl start
__ 2. Copy the WebSphere Customization Toolbox package files to the web server.
__ a. Open a terminal window.
__ b. Navigate to: /usr/IBM/HTTPServer/htdocs

3-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Type the following command to create a symbolic link pointed at the


Supplemental installation files:
ln -s /usr/IBM-repository/WAS8_Supplemental/ WAS8_Sup

Note
The creation of the symbolic link allows the contents of the WAS8_Supplemental directory
to be available under htdocs. That in turn, makes the contents accessible through the web
server.

__ 3. Start IBM Installation Manager.


__ a. Open a terminal window and navigate to:
/opt/IBM/InstallationManager/eclipse/
__ b. Enter ./IBMIM to start IBM Installation Manager.
__ 4. Add the web server as a repository.
__ a. Select File > Preferences.
__ b. Select Repositories.
__ c. Select each of the existing repositories and click Remove Repository.
__ d. Click Add Repository.

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-27

Student Exercises

__ e. Enter: http://localhost/WAS8_Sup/repository.config
Click OK.

__ f.

Click Test Connections. Verify that you receive a message that indicates the
selected repositories are connected.

__ g. Click OK. Click OK again.


Information
This new repository is now accessible not just though the local file system, but also to any
client that has network access to the local web server.
This feature is significant as it allows administrators to share installations files through one
central point on the network.

__ 5. In a normal environment, since the WebSphere Customization Toolbox package is


added to the list of repositories, you can install it. For this exercise, you prove that
the package is ready to install. You do not actually install the package since it is
installed.
__ a. From the main IBM Installation Manager window, click Install.

3-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Although the local repositories are all removed, the Installation Manager still
displays the contents of the Supplemental repository because the HTTP
repository is defined and is being used.

__ c. Click Cancel to cancel the installation.


__ d. Close IBM Installation Manager.

End of exercise

Copyright IBM Corp. 2012

Exercise 3. Installing IBM HTTP Server


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

3-29

Student Exercises

Exercise review and wrap-up


In the first part of the exercise, you installed IBM HTTP Server with Installation Manager
and confirmed the installation. In the second part of the exercise, you installed the Web
Server Plug-ins for WebSphere Application Server. Finally, you examined the installed
directories, log files, and configuration files for IBM HTTP Server and plug-ins.

3-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 4. WebSphere Information Center


installation (optional)
What this exercise is about
This exercise covers how to use the online information center and how
to deploy an offline version of the information center.

What you should be able to do


At the end of the exercise, you should be able to:
Search and view the contents of the online information center
Navigate the information center
Add an information center plug-in to the help system of IBM
Assembly and Deploy Tool to make information center content
available offline
Use the Toolkit for Custom and Reusable Solution Information to
customize information center content

Introduction
IBM information centers provide online and offline approaches to
searching and viewing product information. In this exercise, you use
the traditional online WebSphere Application Server Information
Center to search and view topics that pertain to WebSphere
Application Server Network Deployment. IBM manages and maintains
the information center content, so the most current product information
is available.
There is also an option to configure an offline information center. This
configuration is done by adding content plug-ins to the plugins
directory of an Eclipse-based tool, such as IBM Assembly and Deploy
Tools. Product content plug-ins are downloaded from IBM. Therefore,
it is your responsibility to periodically download the current product
plug-ins. When you start the help system, the Eclipse tool scans the
plugins directory for new plug-ins (content) to load.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-1

Student Exercises

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Working with the online version 8.0 collaborative information


center
The online information center is the most current source of information that concerns
WebSphere products. IBM maintains and updates the information center with current
information.
This first section works only if your lab environment has access to the Internet. If
not, read this section for reference and proceed to the next section.
__ 1. Access the online information center. The information center is an access point to
product information. From the information center you can access education,
Redbooks, and other learning resources. Additionally, you can access product
blogs, discussion spaces, and other collaborative resources.
__ a. Open a browser and enter the following URL:
http://publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp

4-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. This action opens the WebSphere Application Server Information Center.

Note
Since the online information center is constantly updated, the contents you see might differ
from the contents that existed when this course was created.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-3

Student Exercises

__ 2. There are three tabs in the middle of the window: Learning, Tasks, and
Community and Support. Numerous resources are consolidated on one page for
your convenience.
- Click the Learning tab. This tab provides links to various education
resources.

4-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Click the Tasks tab. This tab lists common tasks that an administrator does (only a
partial list is shown in the figure).

__ a. Scroll down and click Administering applications and their environment. A


new list of sections is shown.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-5

Student Exercises

__ b. Click How do I administer applications and their environments? A new page


of shortcuts is displayed.

__ c. Click Create WebSphere profiles. The new page provides detailed information
about the particular task or topic.

4-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. In the breadcrumb trail, click Network Deployment (All operating systems),


Version 8.0. This action returns you to the initial Information Center page.

Limit the scope of the contents


The information center provides access to a large volume of information. It is important to
understand how to limit the contents you are viewing. This section shows you several
techniques.
__ 4. The left panel contains the contents of the information center. The contents list
topics for all products that are relevant to WebSphere Application Server. You can
limit the scope of topics that are displayed. The current scope is set to All topics.

__ a. In the toolbar, click Scope.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-7

Student Exercises

__ b. In the Select Scope panel, make the following selections:


Select Show only the following topics.
Click New.

4-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. In the New Scope panel, make the following selections in the Topics section:
Information home: WebSphere Application Server
Network Deployment (All operating systems), Version 8.0
WebSphere Application Server (Distributed operating systems),
Version 8.0

Click OK.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-9

Student Exercises

__ d. From the Select Scope panel, select scope1. Click OK.

__ e. The contents of the information center list the choices you made.

Search for content


The search facility of the information center implements a powerful search engine. There
are multiple ways to search and display content. You can use exact words or phrases,
wildcards, and Boolean operators. This part of the exercise explores different search
options.
__ 5. With an exact phrase, use the search facility to find information about virtual hosts.
Keep the Scope set to scope1.
__ a. In the Search field, type: virtual hosts
Click the Go icon.

4-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. The Search Results panel displays the expanded results of the search.

__ c. Click the white page icon to toggle the expanded results of the search.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-11

Student Exercises

__ 6. Display the results of the search.


__ a. Click the first Virtual host link.

4-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. A page is displayed with basic virtual host configuration information. As you


scroll down the page, notice that there are more links to related concepts, related
tasks, and related references. Click the Configuring virtual hosts link.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-13

Student Exercises

__ c. This action displays a page with detailed information about the selected task.
Scroll down the page to view all the content on the page.

__ 7. Using an asterisk as the wildcard character, find information about the term
application. An asterisk (*) is used for multiple unknown or variable characters in a
term. In this case, the search returns entries such as application server,
applications, ApplicationProfile, and many other entries.
__ a. In the Search field, type: applicatio*
Click the Go icon.

4-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. The Search Results panel displays the results of the search.

__ 8. Using a question mark as a wildcard character, find different information about the
term application. A question mark (?) is used for a single unknown or variable
character in a term. In this case, the returns application, but not applications or
ApplicationProfile.
__ a. In the Search field, type: applicatio?
Click the Go icon.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-15

Student Exercises

__ b. The Search Results panel displays the results of the search.

__ 9. You can use Boolean operators (AND, OR, NOT) in searches to make them more
efficient. Using Boolean operators, locate information about virtual hosts and other
virtual items.
__ a. In the Search field, type: virtual OR hosts
Click the Go icon. Using the OR operator widens the search to contain either the
term virtual or the term host.

4-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. The Search Results panel displays the results of the search.

__ c. In the Search field, type: virtual NOT hosts


Click the Go icon. Using the operator NOT narrows the search to include topics
that include only the term virtual. No results with the term virtual hosts are
included.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-17

Student Exercises

__ d. The Search Results panel displays the results of the search.

__ 10. Bookmark the current page for future reference.


__ a. In the toolbar, click the Bookmark Document icon.

__ b. Keep the default values for the new bookmark. Click Add.

4-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Select Bookmarks from the browser toolbar. The newly created bookmark is
added to the end of the bookmark list.

__ 11. Use the index to locate information.


__ a. In the toolbar at the bottom of the Search Results panel, click the Index tab.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-19

Student Exercises

__ b. This action displays the indexed content.

__ c. Click one of the links in the index listing. The content is displayed in the content
panel.

4-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Close the browser.

Section 4: Demonstration: Installing the offline information center into


an Eclipse-based tool (reference or demonstration only)
This section uses the IBM Assembly and Deploy Tools for WebSphere Administration,
which is not available on AIX. It is therefore not possible to go through these steps on your
lab workstation. Instead, a demonstration is available at the following website:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the information center demonstration. You can follow along
with the following instructions.

The following section was performed in a demonstration (URL provided previously):

You are not able to run this section in your lab environment. Watch the
demonstration instead. These steps are presented for reference only.

It might be desirable to maintain an offline version of one or more information centers. If


you already have an Eclipse-based tool, such as IBM Assembly and Deploy Tools for
WebSphere Administration, you can deploy documentation plug-in files into the plugins
directory of that tool. For Eclipse-based systems, the help system stores its documentation
in the plugins directory. The documentation plug-ins can be downloaded from IBM. As
soon as it is deployed to the plugins directory, the documentation shows up in the Help
contents list the next time that you start the Eclipse-based tool.
In this section of the exercise, you copy the document plug-ins for WebSphere Application
Server Network Deployment, IBM HTTP Server, and the Edge Components to the plugins
directory of IBM Assembly and Deploy Tools.
__ 1. Copy the WebSphere Application Server Network Deployment Information Center
plug-in to the plugins directory of IBM Assembly and Deploy Tools for WebSphere
Administration.
__ a. In Windows Explorer, navigate to C:\softare\InformationCenterPlugin\nd
__ b. Copy the entire contents of the directory to C:\Program Files\IBM\SDP\
plugins
__ 2. Copy the IBM HTTP Server Information Center plug-in to the plugins directory of
IBM Assembly and Deploy Tools for WebSphere Administration.
__ a. In Windows Explorer, navigate to C:\softare\InformationCenterPlugin\ihs
__ b. Copy the entire contents of the directory to C:\Program Files\IBM\SDP\
plugins
Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-21

Student Exercises

__ 3. Copy the Edge Components Information Center plug-in to the plugins directory of
IBM Assembly and Deploy Tools for WebSphere Administration.
__ a. In Windows Explorer, navigate to
C:\softare\InformationCenterPlugin\edge
__ b. Copy the entire contents of the directory to C:\Program Files\IBM\SDP\
plugins
__ 4. Start IBM Assembly and Deploy Tools and verify that the WebSphere Application
Server Network Deployment Information Center plug-in works correctly in the help
system of IBM Assembly and Deploy Tools.
__ a. Select Start > Programs > IBM Software Delivery Platform > IBM Assembly
and Deploy Tools for WebSphere Administration 8.0 > IBM Assembly and
Deploy Tools for WebSphere Administration.
__ b. In the Workspace Launcher window, keep the default workspace. Click OK.

__ c. After IBM Assembly and Deploy Tools opens, select Help > Help Contents.

4-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. In the Contents pane, the documentation for the three products is added.

__ e. Expand Edge Components, Version 8.0. Topics relevant to Network


Deployment are displayed.

__ f.

Expand any topic and follow the links.

__ 5. Explore the search function.


__ a. Enter virtual hosts in the search box and click Go.
__ b. Wait for the indexing to complete. Since it is likely that the data is being searched
for the first time, the tool first indexes the contents.
__ c. As soon as the results are displayed, notice that the contents are similar to the
contents that are displayed through the online information center.
__ 6. Explore the other components of the help system and notice that they are similar to
that of the online system.
__ 7. Close Help - IBM Assembly and Deploy Tools for WebSphere Administration.
Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-23

Student Exercises

__ 8. Close IBM Assembly and Deploy Tools for WebSphere Administration. Click
OK when you are prompted to exit.
Information
There might be occasions when you want to create customized content for your information
center. For example, you might have instructions or procedures for administering resources
that are specific to your company. In this case, you can either add the content to an existing
information center or create an information center that is composed of your custom
content.
When customized content is needed, the Toolkit for Custom and Reusable Solution
Information (TKCARSI) can be used to assemble and deploy a customized information
center. TKCARSI is only used to assemble and deploy the content. Content can be in the
form of plug-ins, documents, or graphics. Deployment can be local or to a remote server.
TKCARSI can be downloaded from IBM alphaWorks at:
http://www.alphaworks.ibm.com/tech/tkcarsi
Follow the instructions from alphaWorks to unpack and install the toolkit files to your local
system.
This section provides a simple example of using the Toolkit for Custom and Reusable
Solution Information to assemble and deploy customized content. The example assumes
that you unpacked the toolkit files.
__ 1. Start the Toolkit for Custom and Reusable Solution Information.
__ a. Open a command window and navigate to the directory where you unpacked
TKCARSI. The directory that is used in this example is C:\tkcarsi1.5.
__ b. Run the following script:
run.bat

4-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Close the Welcome window. The toolkit workspace is displayed.

__ 2. Create a solution information project. Projects contain the artifacts to create and
deploy a customized information center.
__ a. Select File > New > Solution information project.
__ b. Enter WAS ND Information as the Project name.

__ c. Click Finish.
Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-25

Student Exercises

__ d. In the Navigation Tree tab, the new project is displayed as a table of contents
with topics listed beneath.

__ 3. Change the browser title to a more meaningful name.


__ a. Select Information Center > Browser Title.
__ b. In the Browser Title tab, enter WebSphere Customized Help as the browser
title.

__ c. Close the Browser Title tab. Click Yes when asked to save the changes.
__ 4. To add content to the help system, you must add one or more plug-ins to the project.
Plug-ins are obtained directly from IBM, or an information development team
develops them separately. In this example, the information center plug-ins for
WebSphere Application Server are used. The plug-ins are added to the project

4-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

through the book tab. Books can also contain other content such as documents,
graphics, and links. Add a book to the project.
__ a. From the explorer view in the upper left, select the Books tab and click the Add
Books icon.

__ b. In the New Books panel, make the following selections:


Select Directory.
Browse to C:\softare\InformationCenterPlugin\nd\
com.ibm.websphere.nd.doc_6.1.0.

Click OK.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-27

Student Exercises

Click Yes when asked to copy content into the toolkit.

__ c. Click OK.
__ 5. Add book content to the highest level of the navigation tree.
__ a. Drag nav_tasks.xml to 0 WAS ND Information.

__ b. The content is added to the end of the navigation tree.

__ 6. To deploy the customized information center, you must package and export the
project.
__ a. Select Information Center > Export.

4-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click Yes when prompted to save any changes.


__ c. Browse to C:\tkcarsi1.5.
__ d. Accept the File name. Click Save.

__ e. Click Finish. It takes several minutes to compress and export the project.

__ 7. The newly created help system is ready. You can extract and run the newly created
help system on a local system or a remote system. In this example, the newly
created help system is extracted and then runs on a local system.
__ a. Using Windows Explorer, navigate to C:\tkcarsi1.5 and locate WAS ND
Information_package.zip.
__ b. Using the standard operating system tools, extract the compressed file to the
current directory.
__ c. Using Windows Explorer, navigate to C:\tkcarsi1.5\
WAS ND Information_package.

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-29

Student Exercises

__ d. Run help_start.bat. After a few moments, a new browser opens with the
newly created help system.

__ e. Notice that the browser title and contents are customized. In the Contents pane,
expand WAS ND Information. Topics for the content you loaded in the project
are displayed.

4-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Expand any of the topic links. Click any link to display the content of the topic.

__ g. Exit from the Toolkit for Custom and Reusable Solutions Information.
__ h. Run the help_end.bat script.
__ i.

Close any remaining help system browsers.

End of exercise

Copyright IBM Corp. 2012

Exercise 4. WebSphere Information Center installation (optional)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

4-31

Student Exercises

Exercise review and wrap-up


IBM information centers provide online and offline approaches to searching and viewing
product information. In this exercise, you used the online WebSphere Application Server
Information Center to search and view topics that pertain to WebSphere Application Server
Network Deployment. Next, you configured an offline information center. You did this
configuration by adding content plug-ins to the plug-ins directory of IBM Assembly and
Deploy Tools. Finally, you read an informational section that explained building information
center content with the Toolkit for Custom and Reusable Solution Information (TKCARSI).
TKCARSI is a tool available from alphaWorks to assemble and deploy information center
content.

4-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 5. Exploring the administrative console


What this exercise is about
In this exercise, you explore the WebSphere Application Server V8
administrative console. You examine the configuration structure, and
explore the contents of the WebSphere administrative console. The
administrative console is used to configure the server to gain
knowledge and become familiar with what is available.

What you should be able to do


At the end of the exercise, you should be able to:
Verify that WebSphere Application Server is started
Start the administrative console
Explore the navigation and functions of the administrative console
Use the administrative console to examine configuration
information, resources, and properties

Introduction
In this exercise, you explore the WebSphere Application Server V8
configuration. Exploration includes starting the server and browsing
through some of the configuration files. You also start and explore the
WebSphere administrative console.
The application server should already be installed and tested, and you
should be able to successfully start the server.
The application server runs as a single JVM, including all shared
services and the containers to run applications.
The WebSphere administrative console provides a graphical view of
the configuration and includes forms and wizards to make it easier to
perform configuration tasks.

Requirements
To do this exercise, you must have a working server and WebSphere
administrative console.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-1

Student Exercises

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Start the server


__ 1. Before you can configure the application server environment, you must start all the
required processes. For this exercise, you use profile1 on server1.
__ 2. Determine how many JVMs are running on your system.
__ a. Use the commands ps -ef | grep java to show the running Java processes.
__ 3. Take note of how many processes are running. There are no Java processes
running, unless the server is running from a previous exercise. Start the server if it is
not already running.
__ a. In a command window, go to (Note: <profile_root> in your lab environment is
defined as /usr/IBM/WebSphere/AppServer/profiles):
<profile_root>/profile1/bin
__ b. Enter ./startServer.sh server1 to start the server.

5-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
captures, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

__ c. After a successful startup of the server you see the message Server server1
open for e-business, which indicates that the server is ready.

Information
If the server does not start, look at the startServer.log in the
<profile_root>/profile1/logs/server1 directory.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-3

Student Exercises

__ 4. Examine the running Java processes.


__ a. Use the commands ps -ef | grep java to show the running Java processes.

Section 4: Explore configuration files


Examine some of the configuration files for the WebSphere Application Server.
__ 1. Explore the configuration directory structure and view some of the configuration
files.
__ a. To explore files on AIX, use the File Manager. An icon for the File Manager can
be found under the Personal Applications drawer in the toolbar.

5-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Examine the files within the profile config directory, which can be found under
<profile_root>/profile1

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-5

Student Exercises

__ c. A few important files that are contained in the config directory are:
<cell> is the cell name
<node> is the node name
<server> is the server name
- Cell-wide resources
config/cells/<cell>/resources.xml
- Node-specific resources
config/cells/<cell>/nodes/<node>/resources.xml
- Server-specific resources such as JDBC and JMS providers
config/cells/<cell>/nodes/<node>/servers/<server>/resources.xml
- Global security settings
config/cells/<cell>/security.xml
- Virtual hosts
config/cells/<cell>/virtualhosts.xml
- Applications and endpoints for a node
config/cells/<cell>/nodes/<node>/serverindex.xml
- Configuration of a server
config/cells/<cell>/nodes/<node>/servers/<server>/server.xml
Information
You must not edit these XML files manually; instead you must use the administrative
console or wsadmin command-line tool to make configuration changes that affect these
files.

__ 2. Examine the SOAP client configuration file.


<profile_root>/profile1/properties/soap.client.props
__ a. Go to: <profile_root>/profile1/properties
__ b. Open soap.client.props in an editor (such as dtpad; access through the
command line or right-click on the file and select Open).
This file contains security configuration information that clients use to authenticate to
the security service. The wsadmin client uses this file. Important parameters are:
loginUserid and loginPassword: ID and password are specified when
the parameter loginSource=properties is used. If they are not set here
or on the command line, the user is prompted for them interactively.

5-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

loginSource: specifies how the authentication information is obtained.


The default is prompt, which means the user is prompted for a user ID
and password.

__ 3. Close any editor windows still open.

Section 5: Start the administrative console


The administrative console is the graphical user interface for managing WebSphere
Application Server configuration settings for servers, applications, and other resources.
The administrative console is a browser-based web application that uses HTML and
JavaScript.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-7

Student Exercises

Information
In a federated cell, you always use the administrative console that is connected to the
deployment manager so that changes are synchronized across the cell. In a stand-alone
application server, you connect directly to the administrative console on the server.

__ 1. Open the administrative console.


__ a. Open a Firefox browser and enter the following URL:
http://localhost:9060/ibm/console
__ b. It is possible that the browser shows a message that the server connection is
untrusted. Select Accept this certificate permanently and click OK.
__ c. If there is a second security warning about a Domain Name Mismatch, click OK
again.
Information
It is important that you understand why the certificate for the administrative console
generates these errors. The browser is doing a useful security check. WebSphere has a
valid certificate and is secure, but the browser is raising some concerns.
The first concern is that the certificate that the application server uses is signed by an
unknown certificate authority. WebSphere, by default, creates its own certificates during the
profile creation process. These certificates are self-signed, and therefore it is expected that
the browser would not by default know the signer.
The second concern is that the domain associated with the certificate created for this
application server does not necessarily match the domain in the URL (localhost).

5-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The administrative console opens.

__ 2. Enter wasadmin for the User ID and web1sphere for the Password. Click Log in.
Information
If security is active, you must log in using a valid user ID and password. If administrative
security was disabled, the user ID you enter here would not matter, as it is used to track
configuration changes.
A workspace is saved for each user, which includes unsaved configuration changes and
navigation preferences.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-9

Student Exercises

The administrative console contains three frames:

Banner: This area is the top of the administrative console. It shows a welcome
message for your user ID. It shows links for logging out of the administrative
console and accessing product information.
Navigation tree: This area is the left frame of the administrative console. It
shows the types of information you can configure. There are 13 areas:

Guided activities
Servers
Applications
Services
Resources

Security
Environment
System administration
Users and groups
Monitoring and tuning

Troubleshooting
Service integration
UDDI

There is also a Welcome link, which takes you back to the main work area home
page.
Work area: This area is the right frame of the administrative console. It shows
the pages to create or change configuration information.
The work area of home shows the installed product version.
Note
Firefox allows you to increase the font size if your display is too small. To increase the font
size, use control + (plus) or the menu option View > Text Size > Increase. To decrease
the font size, use control - (minus) or View > Text Size > Decrease.

5-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 6: Explore the navigation tree


The administrative console navigation tree lists the tasks available in the administrative
console. Tasks are grouped into organizational nodes that represent categories of tasks.
__ 1. View the categories of tasks in the navigation tree. When you click a task in the
navigation tree, the work area contains one or more modules for completing the
task.
Use the View menu at the top of the navigation tree to modify the lists of tasks
according to your preferences.
__ 2. Click the View menu in the navigation tree.

You can organize the tasks as follows:


All tasks: shows all tasks in the administrative console.
My tasks: shows only the tasks that you added to the view. This list is initially
empty, but provides a link to the My Tasks module.
WebSphere Application Server: shows only the tasks for this particular
product, WebSphere Application Server.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-11

Student Exercises

__ 3. Using My tasks allows you to create and edit a list of tasks to view in the navigation
tree. The My tasks selection is especially useful to customize the navigation to
show only the tasks that you use most often.
__ a. Select My tasks from the menu in View.
__ b. There are no tasks currently selected. Click Add tasks to add a task to the view.

__ c. The work area shows the tasks that you can select to customize the My tasks
view in the navigation tree.
__ d. Check the boxes for Servers, Applications, and Resources. Click Apply.

5-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. After applying your selections, your customized task list is seen in the navigation
tree.

__ f.

Continue to explore and customize the My tasks view and add additional tasks.

__ g. When completed, click Deselect All to remove all tasks. Click Apply.
__ h. Select All tasks from the View menu.

Section 7: Explore guided activities


In this part of the exercise, you look at the guided activities for WebSphere Application
Server V8. Guided activities lead you through common administrative tasks that require
you to visit multiple administrative console pages.
__ 1. In the administrative console navigation tree, expand Guided Activities.
In the stand-alone environment, the guided activities include:

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-13

Student Exercises

- Connecting to a database
- Routing requests through a web server to an application server
Information
In the federated environment, the guided activities include:
- Connecting to a database
- Routing requests through a web server to an application server
- Configuring a cluster and configuring highly available applications

5-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ a. Click Connecting to a database to view the first activity.


The work area has information about the activity to help you perform this task
successfully. It contains an introduction to the task, and details other tasks to do
before and after completing this task. The work area also provides hints and tips
to help you avoid and recover from problems and other tasks.

__ b. Continue to explore the details for connecting to a database, or select another


guided activity to explore.

Section 8: Explore server settings


In this part of the exercise, you look at some of the settings that can be configured with the
administrative console. You begin by looking at the server section.
__ 1. In the administrative console navigation tree, expand Servers and Server Types.
In the stand-alone environment, the only server types are:
- WebSphere application servers
- WebSphere MQ servers
- Web servers
Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-15

Student Exercises

Information
In the federated environment, you can also manage:

Generic servers
Proxy servers
Version 5 JMS servers
Clusters
Cluster topology
Generic server clusters
Core groups

__ 2. Click WebSphere application servers.


The work area is a table that lists the application servers. You have one server,
server1.
This page is known as a collection page because the list is a collection of objects.
The page has two options for controlling the amount of information that is shown,
Filter and Preferences.

Information
For some other collection pages, an additional option, Scope, is presented. An example of
scope is seen later.

5-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Click the Filter icon.

The filter feature allows you to use wildcards to match only the objects you want to
work with if there are many objects of the same type. You can select a table column
and specify the text to match.
Information
This option rarely needs to be used unless there are many items.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-17

Student Exercises

__ 4. Click server1.
The configuration of server1 is seen. This page is known as a details page. There
are two pages, each with a tab at the top:
- Runtime
Runtime lists the current information that the running server uses.
- Configuration
Configuration lists the saved settings that are used when the server is next
started.

5-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Some basic configuration settings are shown under General Properties, including
the Classloader policy and the Class loading mode.
For a description of any of the settings, click More information about this page in
the Help box. The Help section is on the far right of the screen. On some screens, it
is necessary to scroll to the right to see the Help section.

__ 5. Under Server Infrastructure, click to expand Java and Process Management.


Click Process definition.
Use this page to view or change settings for a process definition. This page provides
command-line information for starting or initializing a process.
The Working directory entry starts with a $ and is a WebSphere variable.
(${USER_INSTALL_ROOT}) These variables allow for substitutions to the absolute
paths. You explore WebSphere variables later in this exercise.
__ 6. On the right, click Java Virtual Machine under Additional Properties.
The advanced JVM settings for server1 are seen. Scroll down and examine the
settings. Use the Help box to get default values for these settings.
What is the value of Maximum heap size? _______________
Is Debug Mode used? _______________
Is the JIT (just-in-time compiler) set? _______________
__ 7. Click Cancel to return to the Process Definition page.
__ 8. Click Process Logs under Additional Properties.
The process log settings for server1 are shown. These logs are the native stdout
and stderr log files for the JVM process.
Note
These logs are different from the SystemOut.log and SystemErr.log files, which
capture most output from the JVM, and support log file rotation to prevent the files from
growing too large.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-19

Student Exercises

__ 9. At the top of the page, there is a breadcrumb trail showing the pages that you
visited.

__ 10. Click server1 from the breadcrumb trail to return to the server1 configuration page.

5-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 11. Under Communications, expand Ports. The TCP/IP ports that server1 uses are
listed.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-21

Student Exercises

__ 12. Click the Details link to get additional information about these ports.

5-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 13. Click SOAP_CONNECTOR_ADDRESS to configure the port.


The host and port that are associated with the SOAP listener are seen in the Port
column. SOAP clients, like wsadmin, use this port to connect to the server for
administration tasks. On a single server installation, the default SOAP port is 8880.
__ 14. Click server1 in the breadcrumb trail to return to the server1 details page.
__ 15. Under Server Infrastructure, expand Administration. Click Server Components.
__ 16. Click Name Server.
The name service settings for the application server are seen.
__ 17. Click server1 in the breadcrumb trail to return to the server1 details page.
__ 18. Click the Runtime tab.
The properties of the currently running instance of server1 are shown:
-

Process ID (PID). Record your process ID: _________


Cell name
Node name
State (Started)

__ 19. se the commands ps -ef | grep java, and verify that the process ID shown
matches the PID for the java.exe process in the Processes list.

Section 9: Examine application settings


__ 1. Go to the administrative console navigation tree. Expand Applications and
Application Types.
There are three application types:
- WebSphere enterprise applications
- Business-level applications
- Assets
Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-23

Student Exercises

__ 2. Click WebSphere enterprise applications.


A collection page lists the applications in the configuration and their status. If you
move the mouse cursor over a status icon and click, a window opens and shows the
status.

The applications that are installed by default include:


DefaultApplication: includes the snoop servlet
ivtApp: installation verification test
query: for information about Enterprise JavaBeans
If the sample applications were installed, they would also be listed here.
At the moment you have only one server, but potentially the list includes applications
that are installed on multiple servers on the same computer or in a network
deployment cell.
Information
Tasks that can be performed on an application include:
Start
Rollout Update
Stop
Remove File
Install
Export
Uninstall
Export DDL
Update
Export File

__ 3. Click DefaultApplication

5-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

This page shows the general properties of the application with links to a number of
additional properties pages such as Details, Web Module, and Enterprise
JavaBeans Properties. It also shows a References page.
__ 4. Under Modules, click Manage Modules.
You see one web module, Default Web Application; one EJB module, Increment
EJB module; and the servers with which they are associated.
__ 5. Click the Default Web Application module.
A detail page shows the general properties that are associated with the deployment
of the web module.
__ 6. Click Manage Modules in the breadcrumb trail and select the Increment EJB
module.
A detail page shows the general properties that are associated with the deployment
of the EJB module.

Section 10:Examine environment settings


__ 1. In the administrative console navigation tree, expand Environment. The
Environment options include:
-

Virtual Hosts
Update global web server plug-in configuration
WebSphere Variables
Shared Libraries
Replication Domains
Naming

__ 2. Click Virtual Hosts.


The work area of a collection page lists the virtual hosts that are defined for the cell.
__ 3. Click default_host.
A details page shows the details for the virtual host. You can directly change only the
virtual host name. Under Additional Properties, you find links to other properties
pages.
__ 4. Click Host Aliases under Additional Properties.
The host name and port combinations that are associated with this virtual host are
shown. For the default_host, the default values are:

*:9080 (any host on the internal HTTP transport port)


*:80 (any host on the external HTTP transport port)
*:9443 (any host on the internal SSL transport port)
*:5060 (any host on the SIP transport port)
*:5061 (any host on the SIP transport port)
*:443 (any host on the external SSL transport port).

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-25

Student Exercises

You can define additional virtual hosts or modify default_host to support additional
host-port combinations.
__ 5. Click Virtual Hosts in the breadcrumb trail to return to the Virtual Hosts page.
__ 6. Click admin_host and then click Host Aliases.
__ 7. Examine the admin_host virtual host and write down the port numbers that are
associated with this virtual host: _________________________
Note
The browser accesses the administrative console on one of the ports that are associated
with the admin_host virtual host.

__ 8. In the administrative console navigation tree, under the Environment section, click
WebSphere variables.
The work area of a WebSphere variables collection page is seen. This page
includes the scope feature because variables can be defined for a cell, node, or
server. A menu of all available scopes is provided to narrow the list of variables that
are based on scope.

__ 9. From the scope menu, select scope Cell=<cellname>. How many variables are
defined for the cell? _______
__ 10. From the scope menu, select scope Node=<nodename>. How many variables are
defined for the node? ________
If there are more than the maximum rows (20 by default), a Next button is shown to
allow you to see the additional entries.
Notice that many variable values include references to other variables, for example,
${USER_INSTALL_ROOT}.
5-26 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 11. From the scope menu, select scope Node=<nodename>, Server=<servername>.


How many variables are defined for the server? ________

Section 11:Examine resource settings


__ 1. In the administrative console navigation tree, expand Resources. The resources
options are:

Schedulers
Object pool managers
JMS
JDBC
Resource adapters
Asynchronous beans
Cache instances
Mail
URL
Resource environment

__ 2. Expand JDBC; click JDBC providers.


A collection page lists the JDBC providers in the configuration. In a later exercise,
you configure a JDBC driver and data source for an application.
__ 3. Expand JMS and click JMS providers. Click an instance of Default messaging
provider.
A details page shows some basic properties of the internal JMS provider. Under
Additional Properties, there are links for:

Connection factories (for configuring a JMS connection factory)


Queue connection factories
Topic connection factories
Queues
Topics
Activation specifications

These settings can be defined at the cell, node, or server level so there is a scope
selection option available.
A collection page lists queue connection factories (if there are any defined). A queue
connection factory is used to create connections to the associated JMS provider of
JMS queue destinations, for point-to-point messaging.
A collection page lists topic connection factories (if there are any defined). A topic
connection factory is used to create connections to the associated JMS provider of
JMS topic destinations, for publish/subscribe messaging.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-27

Student Exercises

Section 12:Examine troubleshooting


The Troubleshooting area shows messages about runtime events and configuration
problems. This area automatically refreshes, and you can view either the runtime
messages or configurations problems totals.
__ 1. In the administrative console navigation tree, expand Troubleshooting.
__ 2. Expand Runtime Messages. You see entries for:
Runtime error
Runtime warning
Runtime information
The total number of errors, warnings, and information messages is displayed when
you select one of the options. Click Runtime information to view all of the
messages.
__ 3. In the Message column, click one of the messages (if there are any listed) to see the
message detail.
__ 4. In the navigation tree, expand Configuration Validation under Troubleshooting.
You see entries for:
Configuration error
Configuration warning
Configuration information
The total number of errors, warnings, and information messages is shown when you
select one of the options. Click Configuration error to view all of the error
messages. If you do not have any error messages, click the Configuration
information messages.
__ 5. If you have a configuration problem, click the link to it. The problem detail is seen.
On the next window, you see general properties information about the configuration
problem.
__ 6. Click Back to return to the Configuration Validation list and view other problems, if
any exist.

Section 13:Modify the administrative console session timeout


When you are working with the administrative console, the session expires if it is idle for
more than 30 minutes. To continue working, you must log in again. Many administrators
find the default session idle duration too short. You can change the session idle duration to
a time that works best for you. The session idle duration time cannot be modified from the
administrative console. The timeout must be modified by running a script.

5-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
The administrative console session expiration script that you use in this exercise is found in
the information center by searching for changing the console session expiration.

__ 1. Review the sample administrative console session expiration script.


__ a. Go to the /usr/software/wsadmin/ directory.
__ b. Open consoleTimeout.py with a text editor (such as dtpad).
__ c. Look at this script. Notice the comments at the top that show how to use this
script.

__ d. Do not save any changes that are made to the file.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-29

Student Exercises

__ 2. Run the script to change the session expiration.


__ a. From the command line, run the consoleTimeout.py script with wsadmin from
the <profile_root>/profile1/bin directory:
./wsadmin.sh -f /usr/software/wsadmin/consoleTimeout.py 120
-username wasadmin -password web1sphere

5-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
The first time wsadmin is run, the environment is set up. There are several messages
about processing new jar. These messages are expected the first time that wsadmin is
run.

Information
In the commands above, the username and password are specified on the command line.
Administrative scripts, such as wsadmin, support specifying the user name and password
on the command line, in the properties file, or through prompting (GUI or command line).

__ b. The session expiration timeout is now set for 120 minutes.


Information
The timeout session expiration must be set for each profile administrative console. Later in
the class you create additional profiles. You must rerun the timeout script for each profile
that you want to change the session timeout.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-31

Student Exercises

Note
The wsadmin tool can be used to run scripts. You learn more about wsadmin later in the
course.

Section 14:Log out of the administrative console


When you are working in the administrative console, a work area is saved which includes
all configuration changes you make in the session. When you log out, you can save or
discard these changes. If you close the browser, the session work area is preserved. The
next time you log in, you can recover the work area from the previous session.
Information
Any configuration changes that you want to keep must be saved to the master
configuration; otherwise the new settings are not used.

__ 1. Click Logout at the top of the page in the taskbar.


__ 2. If no resources are changed, then you are returned to the login page. If changes
were made, the Save page is seen. Click Discard so that you do not overwrite the
configuration.
The Discard WorkSpace Changes page asks you to confirm the discard. Click Yes,
and you are returned to the login page.
__ 3. Close the browser.
You now generally know your way around the WebSphere administrative console.

End of exercise

5-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


This exercise examined many of the features of the administrative console. You looked at
the properties of servers, applications, environment settings, and resources.

Copyright IBM Corp. 2012

Exercise 5. Exploring the administrative console


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

5-33

Student Exercises

5-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 6. Assembling an application


(demonstration)
What this exercise is about
This exercise uses the IBM Assembly and Deploy Tools for
WebSphere Administration, which is not available on AIX. It is
therefore not possible to go through these steps on your lab
workstation. Instead, a demonstration is available at the following
website:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/
home?lang=en#/wiki/WebSphere%20Education%20Wiki/page/
Course%20Demonstrations
Use your local browser to run the Assemble demonstration. You can
follow along with the instructions.
The demonstration covers the steps necessary to assemble Java
archive (.jar) files, and web archive (.war) files that combine an
enterprise application into an enterprise archive (EAR) file. This file
can be deployed to a Java EE 6 compliant application server. IBM
Assembly and Deploy Tools for WebSphere Administration are used to
complete this exercise.

What you should be able to do


At the end of the lab, you should be able to:
Navigate the Assembly and Deploy tool
Import and examine enterprise application components
Define the following application-scoped resources:
- Data source
- Authentication alias
Export an enhanced EAR file that is ready for deployment

Introduction
In this exercise, you assume the role of the application assembler. The
developers responsible for bean development provided you with the
.jar files that contain the code for the Enterprise JavaBeans. The
developers responsible for the presentation design gave you the .war
Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-1

Student Exercises

files that contain the HTML pages, JSPs, and servlets. It is now your
task to take these pieces and assemble them into an EAR file that can
be installed in the WebSphere Application Server.

The application developers provided the files for this application. The
application is made up of:
One Java utility.jar file. The application uses the code in this
file.
One web module .war file that contains the servlets, JavaServer
Faces (JSF) files, Enterprise JavaBeans (EJB) files, and
presentation (HTML and graphics) files, along with a deployment
descriptor.
In some cases, you might also be given a resource adapter archive
(RAR) module. For this exercise, however, there are no resource
adapter archive modules.

Requirements
To complete this exercise, you need the IBM Assembly and Deploy
Tools for WebSphere Administration. This tool is used to complete the
6-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

exercise. You also need the following files, which are in


C:\software\assemble:
PlantsByWebSphere.war
pbw-lib.jar

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-3

Student Exercises

Exercise instructions
Section 1: Lab demonstration information
This exercise uses the IBM Assembly and Deploy Tools for WebSphere
Administration, which is not available on AIX. It is therefore not possible to go through
these steps on your lab workstation. Instead, a demonstration is available at the following
URL:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the Assemble demonstration. You can follow along with the
instructions.

The following section was performed in a demonstration (URL provided previously):

You are not able to do this section in your lab environment. Watch the demonstration
instead. These steps are presented for reference only.

Section 2: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 3: Start the IBM Assembly and Deploy Tools for WebSphere
Administration
__ 1. Click Start > Programs > IBM Software Delivery Platform > IBM Assembly and
Deploy Tools for WebSphere Administration 8.0 > IBM Assembly and Deploy
Tools for WebSphere Administration to start IBM Assembly and Deploy Tools.
IBM Assembly and Deploy Tools starts by asking you which directory to use for its
workspace. This workspace is used during the life of the project. Each project can
have its own separate workspace.

6-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. Enter C:\software\assemble\PlantsByWebSphere for the workspace and click


OK.

__ 3. You are in the Java EE perspective to begin assembling the application. This
perspective is the default, and it is the title of the workbench.
__ 4. The Enterprise Explorer view shows all the modules that are currently loaded in
the workspace (none currently). As you add modules, they show in the
corresponding folders.
The empty area on the upper middle part of the window is where the different editors
open and show the contents of the selected items on the other views. This area is
called the editor pane.
Below the editor pane is a multipurpose pane that contains several views. One of
the views in the multipurpose pane is the Problems view, which is in the foreground
of the multipurpose pane. It contains any outstanding errors that need to be
resolved. This space is shared with several stacked views. You can select a view by
its tab at the top of the pane. These additional views are required during this
exercise.

Section 4: Create an enterprise application project


__ 1. Create an enterprise application project named PlantsByWebSphere.
__ a. Select the File > New > Enterprise Application Project.
__ b. Name the project: PlantsByWebSphere

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-5

Student Exercises

Information
This new workspace has no servers defined. An installed server needs to be defined in the
workspace so its runtime libraries are added to new projects created in the workspace. In
addition, the selected Target runtime environment defines where applications are
deployed to, when asking assembly and deploy to run an application on a server.

__ c. Click New Runtime to the right of Target Runtime to define a new server.

6-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Select IBM > WebSphere Application Server v8.0. Click Next.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-7

Student Exercises

__ e. Click Browse for the Installation directory.

__ f.

Go to the <was_root> folder and click OK.

__ g. Click Finish.
6-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ h. Make sure that the Project name is still set to PlantsByWebSphere. Click Next.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-9

Student Exercises

__ i.

Check Generate Deployment Descriptor. Click Finish.

__ j.

The PlantsByWebSphere project is now found in the Enterprise Explorer.

Information
You can safely ignore the error on the PlantsByWebSphere project. What does this error
say?

6-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Import the application modules


In your case you have a set of modules, .war and .jar files, by development. These
modules need to be assembled into a running application.
Information
Handing over individual application modules is the most common way to receive
application components, especially when more than one development team is involved.
Each team is responsible for one or more modules. Another way to hand over an
application for deployment is to receive an EAR file for the enterprise application.

Section 5: Add the Plants By WebSphere utility module


The application developers provide the utility .jar file for this application, and it is named
pbw-lib.jar. The JAR file contains the reusable code for multiple applications.
__ 1. From the menu, select File > Import.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-11

Student Exercises

__ 2. From the Import dialog, select Java EE Utility Jar and click Next.

6-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. The EAR project is PlantsByWebSphere, and Copy utility JARs into an existing
EAR from an external location must be checked. Click Next.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-13

Student Exercises

__ 4. In the Import dialog, click Browse, navigate to C:\software\assemble, and click


OK.

6-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 5. The utility JAR file named pbw-lib.jar is checked. Click Finish.

Information
Double-clicking a module (the second entry) on the Enterprise Explorer view opens its
deployment descriptor (if it exists) in a specialized editor. Deployment descriptor editors
have tabs along the bottom of the pane to give you access to the various sections of the
file. Using these editors makes working with deployment descriptors much easier.
If you change anything on a deployment descriptor, or any other file, you see an asterisk on
the tab where its name is shown at the top of the editor pane. The asterisk indicates that
the file has changes and needs to be saved. Do not save any changes that you make, and
close the EJB deployment descriptor in the editor.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-15

Student Exercises

Section 6: Add the web module


Next, add the web module that the application references. A web module consists of the
JSPs, HTML pages, and servlets that are contained within the .war file.
Note
In addition, this .war file contains EJB components. One of the changes in the Java EE 6
specification is that EJB components can be put into a web archive file.

__ 1. From the menu, select File > Import.


__ 2. In the Import dialog, select WAR file and click Next.

__ 3. In the Import dialog, click Browse, go to c:\software\assemble, and select


PlantsByWebSphere.war. Click Open.

6-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. Change the web project name to: PlantsByWebSphereWeb


The enterprise application project already has the name PlantsByWebSphere.

__ a. Click Finish to add the PlantsByWebSphere web module to the enterprise


application.
__ b. Click No in the dialog that asks to change to the Web perspective.
__ c. Verify that the web module is in the Enterprise Explorer.

__ d. There are no errors on the Markers view.


Information
It takes a minute or two for the project to finish rebuilding. Ignore any errors until the rebuild
process is complete. It is always a good practice to resolve all errors and to investigate any
warnings you see in the Problems view.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-17

Student Exercises

__ 5. The PlantsByWebSphere application needs to have the Uniform Resource


Identifier (URI) modified.
__ a. In the Enterprise Explorer view select PlantsByWebSphereWeb, right-click, and
select Properties from the menu.
__ b. Select Web Project Settings. Change the Context root to: PlantsByWebSphere
Click OK.

A dialog box might open to confirm this change. Click OK.


The web and utility modules are added to PlantsByWebSphere. You can see these
modules in the Enterprise Explorer by expanding PlantsByWebSphere >

6-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

PlantsByWebSphere > Modules.

Section 7: Add a test server


Earlier you specified that the target runtime environment is WebSphere Application Server
V8. Now you add a WebSphere Application Server V8 that can be used to test the
application if one does not exist.
Information
Adding a test server within IBM Assembly and Deploy Tools allows administrators,
assemblers, or developers to test their enterprise applications directly from their
development environment. The alternative would be to export the EAR file and deploy it to
a WebSphere Application Server runtime environment.
Although this test environment is being defined here, it is not used.

__ 1. Right-click in the empty Servers view; then select New > Server from the menu.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-19

Student Exercises

__ 2. In the Define a New Server dialog, accept the default options. Click Next.

6-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Type the password web1sphere in the WebSphere Server Settings dialog. Click
Finish.

__ 4. WebSphere Application Server v8.0 is shown in the Servers view.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-21

Student Exercises

Information
Creating WebSphere Application Server V8.0 in the Servers view allows you to test your
application on an existing instance of the WebSphere runtime environment directly from
IBM Assembly and Deploy Tools. You can easily install enterprise applications from the
menu by right-clicking WebSphere Application Server v8.0 and selecting Add and
Remove Projects from the menu.
You are not going to run through a test at this stage. There is some additional configuration
of the environment that needs to be done. You are going to test the Plants application in a
later exercise.

Section 8: Configure WebSphere data sources


You can define certain resources that are included with the application in the WebSphere
Application Server Deployment editor. Any resources that are defined on this page are
defined at the application scope. This approach is valuable in a development or test
environment, but is not considered a good approach when releasing applications into a
production environment.
When you export this EAR file, the resource definitions are included. An EAR file that
contains these types of resource definitions is called an enhanced EAR file. The resources
that are defined within the EAR file are scoped at the application scope. These resources
take precedence over any other resource definitions within the existing runtime
environment.
Although the steps that follow create application scoped resources, they are not used in the
labs that follow. This section is here to demonstrate how to add these resources.
Information
To work with application scoped resources in the WebSphere administrative console, you
need to select the application and then under Resources, select Application scoped
resources.

6-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

In this section, you define a JDBC provider and data source for the PlantsByWebSphere
application. Both of these resources are defined at the application scope and visible only to
the application.
__ 1. Open the Server Deployment view.
__ a. Right-click PlantsByWebSphere; then select Java EE > Open WebSphere
Application Server Deployment.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-23

Student Exercises

__ 2. Review the existing Derby JDBC provider. Derby is the database that the enhanced
EAR file uses.
__ a. At the top of the WebSphere Application Server Deployment view, notice the
Derby JDBC Provider (XA) in the JDBC provider list. You can look at this
configuration by clicking Edit.

__ 3. Create the data source. The data source is where you can define the specifics about
the back-end resource that is used. In this case, it provides the details for accessing
the PLANTS database (for example, data source name, JNDI name, J2C
authentication alias, database name, database host name).
__ a. Scroll to the top of the editor. Click the Derby JDBC Provider (XA) entry. Click
Add next to the Data source defined list.

6-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. In the Create JDBC Provider window, select Derby JDBC Provider (XA) as the
JDBC provider type.

__ c. Click Next.
__ d. On the next page, enter the properties of the data source. Enter the following
information in the fields as provided. Leave default values for all other fields.
Table 1: Data Source data
Field name
Value
Name
Plants
JNDI name
jdbc/PlantsByWebSphereDataSource
Description
Plants data source
Use this data source in
container-managed
The box is checked.
persistence (CMP).

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-25

Student Exercises

__ e. Click Next.
__ f.

For a data source, there are multiple properties that must be defined to access a
database. The fields can be set by clicking the field name and then entering the
value at the bottom of the wizard screen. For the derby database, the only field

6-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

that needs to be set is the databaseName. Set the databaseName field to:
PLANTS

__ g. Click Finish.
__ 4. Save your changes. From the main menu, select File > Save (or press Ctrl-S).
Close the WebSphere Application Server Deployment tab.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-27

Student Exercises

Information
These resource settings are saved within the EAR file in files under the
META-INF\ibmconfig folder. These files are not part of the Java EE 6 specification;
instead, WebSphere Application Server V8 uses these files for attributes that the
specification does not provide. This type of enterprise archive is called an enhanced EAR
file.

Look at the data that is contained in the resources.xml file. Typically this information is
defined in the server and is required before the enterprise application is run. In the
enhanced EAR file, this configuration data is stored with the application. These
enhancements are useful for development and testing, but developers do not use them
beyond testing. The enhanced EAR runs contrary to the separation of roles in Java EE.
Close the resources.xml file and do not save any changes.

6-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 9: Export the enterprise archive (EAR) file


Save the file in the <profile_root>\profile1\installableApps directory.
__ 1. Export the PlantsByWebSphere EAR file.
__ a. In the Enterprise Explorer view on the upper left pane, right-click
PlantsByWebSphere > Export > EAR file.

__ b. In the Export dialog, click Browse and go to the folder


<profile_root>\profile1\installableApps

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-29

Student Exercises

__ c. In the Destination field, change the name of the EAR file to:
EnhancedPlantsByWebSphere.ear
Clear the check box for Optimize for a specific server runtime.

Information
It is not always obvious when an EAR includes application scoped resources. To make the
fact clearer, this exercise includes the word enhanced as part of the EAR file name. This
convention makes it clear to anyone who might be deploying the EAR file in the future that
this EAR file includes enhancements.
Deploying an enhanced EAR file without realizing that application scoped resources are
included can cause confusion.

__ d. Click Finish to export the EAR file.


__ e. Verify that the EAR file was saved successfully.
__ f.

Exit assembly and deploy.

End of exercise

6-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


In this exercise, the IBM Assembly and Deploy Tools for WebSphere Administration were
used to assemble the modules for the PlantsByWebSphere application into an enterprise
archive. The PlantsByWebSphere application is tested in a later exercise.

Copyright IBM Corp. 2012

Exercise 6. Assembling an application (demonstration)


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

6-31

Student Exercises

6-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 7. Installing an application


What this exercise is about
This exercise covers the tasks that are used to install a WebSphere
enterprise application in WebSphere Application Server with the
administrative console. The PlantsByWebSphere application, which is
packaged as enhanced EAR file, is installed on the server.

What you should be able to do


At the end of the lab, you should be able to:
Use the administrative console to install an application
Use a web browser to test the application

Introduction
In this exercise, you install the PlantsByWebSphere enterprise archive
(EAR) file that was assembled with the assembly and deploy tool. The
EAR file contains all the application modules, and also contains the
definition of other resources that the application requires.
This application is tested by accessing it from a web browser.

Requirements
To do this exercise, the WebSphere Application Server must be
installed, including a working application server with an administrative
console. In addition, you need a web browser and DB2 installed, and
the PlantsByWebSphere database that is created and populated.
You also need the EnhancedPlantsByWebSphere.ear file.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-1

Student Exercises

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Start the server and the administrative console


Use the WebSphere Application Server administrative console to install the
PlantsByWebSphere application. Since the administrative console is an application that is
running on the server, the server must be running before the console is started.

__ 1. Start WebSphere Application Server if it is not already running.


__ a. The server can be started from the <was_root>/bin directory (The value of
<was_root> in your exercise environment is
/usr/IBM/WebSphere/AppServer). When using the administrative scripts in
your <was_root> directory, the profile name must also be specified. In a
command-prompt window, go to <was_root>/bin.
__ b. Enter the ./startServer.sh server1 -profileName profile1 command.
__ c. The server is started when a message similar to the following is seen:
Server server1 open for e-business; process id is 2136
The process ID is a unique number, which represents the server process that is
running on the system.

7-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
The server can be started without the use of the profile name if you issue the
./startServer.sh server1 command from the <profile_root>/<profile_name>/bin
directory.

__ 2. Open the WebSphere administrative console.


__ a. In a Firefox web browser, enter the address:
http://localhost:9060/ibm/console
If you see a security alert or warning from the web browser, click OK or the link to
continue to the website.
__ b. Enter wasadmin for the user ID and web1sphere for the password, and then
click Login.

Section 4: Create J2C authentication aliases


Most system resources need to be able to authenticate to a registry. Data sources need to
be able to authenticate to the database server. Here the database is set up to use the local
OS user registry.
__ 1. Create an authentication alias named PlantsApp.
__ a. From the WebSphere administrative console, expand Security and click Global
security.
__ b. Under Authentication on the right, expand Java Authentication and
Authorization Service.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-3

Student Exercises

__ c. Click J2C authentication data.

__ d. Click New.
__ e. In the General Properties area, enter the following values:
Table 2: J2C details
Field
Value
Alias
PlantsApp
User ID
db2inst1
Password
was1edu
Description
For PlantsByWebSphere App

7-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Click OK.
Notice that the alias was created, but the name is not exactly as you defined.
The wizard adds the node name in front of the alias name you entered.

__ g. Click the Save link near the top of the page to save your changes.
__ 2. Edit the hosts file to map dbhost to the IP address where the database server is
running. The database is running locally, so the loopback address 127.0.0.1 can
be used.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-5

Student Exercises

Information
In this case, a host name alias of dbhost is being used. This alias allows the database to
be moved without changing the configuration. For example, if other users want to test an
application on a different host, but with the same database, they define dbhost on their
host machine to point to a different location.

__ a. From a terminal window, use the following command to open the /etc/hosts
file in a text editor:
dtpad /etc/hosts
__ b. Ensure that both was8host01 and dbhost are mapped to the 127.0.0.1
address:

__ c. Save and close the hosts file.

Section 5: Create a JDBC provider and data sources for the application
If any resources that the application uses are not defined in the EAR file, you must define
them by using the administrative console. In this section, you create the data sources that
the PlantsByWebSphere application requires. These data sources define how the
application accesses the PLANTS database.
Information
In general, it is considered an excellent practice to ignore, or remove, application scoped
resources from enhanced EAR files when installing applications in a production
environment.

7-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

In this step of the exercise, you create the data source that the PlantsByWebSphere
application needs. You also create the JDBC provider under which the data source exists.
__ 1. Create the data source.
__ a. From the administrative console, expand Resources > JDBC > Data Sources.
__ b. Select the Node=was8host01Node01 scope and click New. This step defines
the scope at which the data source will visible.

__ c. Enter Plants for the data source name. This name is just a label and can be
anything that you like. Enter jdbc/PlantsByWebSphereDataSource for the JNDI
name. This name is used to look up the data source details. It must be the same

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-7

Student Exercises

name that the PlantsByWebSphere application uses. Each JNDI name must be
unique within the environment. Click Next.

7-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
If there are any existing JDBC providers, you see the following screen at Step 2. Select
Create new JDBC provider, and click Next. Otherwise, you go directly to Step 2.1, Create
new JDBC provider, in the wizard.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-9

Student Exercises

__ d. Select the values on the table in the Create new JDBC provider page. These
parameters define the characteristics of the driver that is used to communicate
with the database.

Table 3: JDBC details


Field
Database type
Provider type
Implementation type

Value
DB2
DB2 Universal JDBC Driver Provider
XA data source

__ e. Keep all remaining defaults and click Next.


__ f.

On the next page, you define where in the file system the JDBC provider finds
the JDBC drivers.

7-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Enter this value in both directory location fields (for your lab environment, the
expected location is /opt/IBM/db2/V9.5/java).

Information
The wizard creates the paths that point to the JDBC drivers and puts values into the
WebSphere environment variables named: DB2UNIVERSAL_JDBC_DRIVER_PATH and
DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH
If these variables are set before this step, their values prefill the entry fields. Anything that
is entered here overwrites the environment variables.

__ g. Click Next.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-11

Student Exercises

__ h. Now you are back in the data source definition part of the wizard and ready to
define the database properties. Enter the following parameters on the page:
Table 4: Data source details
Field
Value
Driver type
4
Database name
PLANTS
Server name
dbhost
Port number
50000
Use this data source
in container
This option is checked.
managed
persistence.

__ i.

Click Next.

__ j.

On the next page, select was8host01Node01/PlantsApp for the


Component-managed authentication alias, and click Next.

7-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
By specifying the PlantsApp authentication alias, when the system accesses the database,
the data source uses the user name and password that were previously specified.
Separating the user name and password out from the data source definition is important.
This indirection allows for the password to be changed in a single place instead of on every
resource that might use the same authentication.

__ k. On the next page, verify all the values that are entered, and click Finish to create
the data source and JDBC provider.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-13

Student Exercises

__ l.

Save your changes.

__ 2. Test the data source connections.


__ a. On the Data Sources page, select the check box for Plants, and click Test
connection.

__ b. Make sure that the connection was successful. Look for the successful
messages at the top of the work area (ignore any warnings).

Information
This test verifies that the application server is able to connect to the data source that was
defined. A success means that the application server is able to connect to host dbhost on
port50000. It can also connect to the database PLANTS with the user name and password
that are supplied in the J2C authentication alias. If any of those pieces are incorrectly
defined, the test fails.

7-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 6: Install the PlantsByWebSphere enterprise application


Information
The enterprise archive file (EAR) is enhanced. The enhancement is that this EAR file
contains the definition of how to access the database. This information is important and
useful for test purposes. This EAR enhancement breaks down the separation of concerns
barrier that is implicit within the Java EE roles. The administration role defines the
resources that are required for the application. In the steps that are contained here, you
ignore the enhanced part of the EAR file, and define resources from the WebSphere
application console.

__ 1. Install the EnhancedPlantsByWebSphere.ear file.


__ a. From the administrative console, expand Applications and click New
application.
__ b. Click New Enterprise Application.

__ c. Select Local file system and click Browse.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-15

Student Exercises

__ d. Go to /usr/software/ears, select the EnhancedPlantsByWebSphere.ear file,


and click Open. Click Next.

Information
If you are using a browser on a remote location, it is also possible to select Remote file
system and browse through the file system where the application server is running.

__ e. Select Fast Path - Prompt only when additional information is required, and
click Next.

Information
The Fast Path method limits the number of options that are shown, which simplifies the
installation process.

7-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

On the next page, you can select any additional installation options. Make certain
that Process embedded configuration is not selected.

Information
If an EAR file is enhanced, the Process embedded configuration check box is selected
by default. To ignore the application-scoped resources, the Process embedded
configuration option must not be selected.

__ g. Accept the default values and click the Summary link.


__ h. Click Finish to complete the installation.
__ i.

Save the changes.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-17

Student Exercises

__ 2. Start the PlantsByWebSphere application.


__ a. Expand Applications > Application Types, and select WebSphere enterprise
applications. Verify that the PlantsByWebSphere application is listed.
__ b. Select the check box next to PlantsByWebSphere and click Start.

Note
If the applications not running, look at the SystemOut.log file in the
<profile_root>/profile1/logs/server1 directory.

Warning
If this enhanced EAR file is installed with the Process embedded configuration checked,
then various properties are set at the application scope level. Caution must be used when
working with application scoped resources because they are not as clearly visible as
resources set at higher level scopes.
Application scoped resources are tied to a specific application. Enhanced EAR
files include application resources.
Settings that are made at the application scope level take precedence over the
same settings that are set at a higher level scope, such as the cell or node levels.
Application scoped resources are not available from scope selection menus.

7-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

It is problematic if an administrator is trying to troubleshoot a problem and is not aware that


an application is enhanced. A setting at the application scope can cause a problem with the
application. The administrator might review all the settings at the various scopes and never
look at the application scope settings.

Section 7: Test the enterprise application


Test the application by accessing it with the WebSphere Application Server HTTP
transport.
__ 1. Open the PlantsByWebSphere application and log on.
__ a. Open a new Firefox web browser, and access PlantsByWebSphere by entering
the following address: http://localhost:9080/PlantsByWebSphere

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-19

Student Exercises

__ b. Click Login. The PlantsByWebSphere login page is shown. Click the link that is
titled, register for your own account here.

7-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Create your own user information.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-21

Student Exercises

__ d. Click Help on the top or bottom menu bar. The PlantsByWebSphere help page is
seen.

7-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click the link View Server Info This page provides information about the
environment of the PlantsByWebSphere application. This information is useful
when running an application in a clustered mode.

__ f.

Type Testing into the Session data field and click Update. The columns for
Session Data and Session Created are updated. Clicking Refresh (or
refreshing the page with the browser) reloads the page, and the date and time in
the lower left is updated. These steps demonstrate that the page is reloaded, but
the session data remains the same.

Note
Be sure that you understand the information that is shown on the Server Info page and
that you understand how to update the session data. This page is useful when testing
multiple servers in a clustered configuration. Note: The Server Info page is not part of the
PlantsByWebSphere application that ships with the WebSphere Application server product.
The Server Info page is created specifically for use in this course material.

__ g. Click Home and explore other parts of the PlantsByWebSphere application.


Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-23

Student Exercises

Information
If the PlantsByWebSphere application works correctly, and it was able to retrieve the flower
inventory, that tells you a lot.
It means that the PlantsByWebSphere EAR was installed correctly. The browser was able
to communicate with the right port (9080) on the application server. The application server
was able to find and use the right data source and JDBC driver to communicate with the
DB2 database. The application server was able to communicate with DB2 on the correct
host (dbhost), with the correct user name and password as defined in the J2C
authentication alias (PlantsApp).
If any of these items is configured incorrectly, the application does not work.

__ 2. There is no need to log out of the application, but do close the web browser window.
__ 3. Log out of the administrative console and close the web browser.

End of exercise

7-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


During the first part of the exercise, the student installs the PlantsByWebSphere application
from the administrative console. After installation of the PlantsByWebSphere application, it
is tested.

Copyright IBM Corp. 2012

Exercise 7. Installing an application


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

7-25

Student Exercises

7-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 8. Monitored directory: Drag-and-drop


deployment
What this exercise is about
This exercise covers some of the new administrative features in
WebSphere application server version 8.

What you should be able to do


At the end of the exercise, you should be able to:
Use the drag-and-drop function to deploy an application
Use a property file with the drag-and-drop function to deploy an
application
Recover a node with the -asExistingNode function

Introduction
This exercise explores the new monitored directory feature, which is
also sometimes called the drag-and-drop function. This feature allows
a developer or administrator to drag an EAR file into a monitored
directory and WebSphere automatically deploys the application. To
provide more control, the monitored directory also supports the use of
property file-based configurations. This feature means that if you drop
a property file into the monitored directory, WebSphere not only can
deploy an application, but can also configure the application in any
way that is needed.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-1

Student Exercises

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Use monitored directory to deploy an enterprise application


In this section, the new monitored directory feature is used to deploy an EAR file. This
feature allows the deployment of an application by dragging an EAR file into a monitored
directory. The application is automatically installed and started.
The monitored directory feature is not enabled by default. So, the first step is to use the
administrative console to enable it. This step creates the directory structure that the
monitored directory feature uses.
__ 1. Verify that your server1 is running.
__ 2. Verify that the monitored directory does not yet exist.

8-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
capture, the directories typically start with /opt. On your AIX systems, the equivalent
directory path starts with /usr.

__ a. In a terminal window, change to the root directory for profile1 and get a directory
listing with an ls command:
cd /usr/IBM/WebSphere/AppServer/profiles/profile1
ls

__ b. Notice that there is no directory named monitoredDeployableApps.


__ 3. Enable the monitored directory.
__ a. Using the administrative console, log in using wasadmin and web1sphere as
the user name and password.
__ b. Browse to Applications > Global deployment settings.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-3

Student Exercises

__ c. Check the box for Monitor directory to automatically deploy applications and
accept the defaults for the other fields.

__ d. Click Apply.
__ e. Save the changes.
__ 4. Look at the log file.
__ a. In a terminal window, change to the log directory for profile1
(<profile_root>/profile1/logs/server1).

8-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Use a text editor (such as dtpad) to open the SystemOut.log file and search for
the string (uppercase): CWLDD

Note
The monitored directory works not only with stand-alone application servers, but also in a
federated environment. Some of the log file screen captures actually show the messages
from a federated environment. The messages in your stand-alone environment provide the
same information.

__ c. Restart server1.log out of the administrative console.


__ d. Using a terminal window, change to the bin directory for profile1 and issue the
following commands:
./stopServer.sh server1 -username wasadmin -password web1sphere
./startServer.sh server1

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-5

Student Exercises

__ e. Again, look at the server1 SystemOut.log file.

__ f.

Notice that there are now entries that indicate that the service is started. Also,
notice that the description string immediately preceding the CWLDD is
DragDropDeplo.

__ 5. Verify that the monitoredDeployableApps directory is created.


__ a. Using the terminal window, return to the root directory for profile1 and get
another directory listing with the ls command.

__ b. Notice that the monitoredDeployableApps directory is now there.


__ 6. Look at the monitored directory structure.
__ a. Using a terminal window, change to the monitoredDeployableApps folder.

8-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
In a federated environment, the directory contents are slightly different since clusters are
also supported.

__ b. Notice that by default, there are directories for servers and


deploymentProperties. For this section, only the servers directory is used.
__ c. Using the terminal window, change to the servers directory and notice that
there is already a subdirectory called server1. In a federated environment, you
manually create each server directory by using the exact name of the server.

Information
The server1 directory is used to deploy applications to server1. If there were multiple
server1 instances within the cell, it is also possible to create a directory structure of the
format nodes/<node-name>/server1. This directory allows you to specify to which server1
an application is deployed.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-7

Student Exercises

__ 7. Use the drag-and-drop feature to install an application.


__ a. Using the administrative console, browse to the Applications > Application
Types > WebSphere enterprise applications.

__ b. Notice which applications are currently deployed.


Using a terminal window, use the cp command (cp <from> <to>) to copy the
CacheMonitor.ear file into the monitoredDeployableApps directory.
From: <was_root>/installableApps/CacheMonitor.ear
To: <profile_root>/profile1/monitoredDeployableApps/servers/server1/
cp /usr/IBM/WebSphere/AppServer/installableApps/CacheMonitor.ear
/usr/IBM/WebSphere/AppServer/profiles/profile1/monitoredDeployableA
pps/servers/server1/

8-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Reopen the SystemOut.log file for server1. Notice that there are new entries
there.

Note
The messages that are shown here are only some of the entries. The others are examined
later.

__ d. Using the administrative console, return to the list of deployed applications and
look at the updated list of enterprise applications.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-9

Student Exercises

__ 8. Use the console to explore the Cache Monitor application settings.


__ a. Click the Dynamic Cache Monitor application. Feel free to look at and modify
the settings. Notice that the application behaves exactly as you would expect any
other application to behave.
Note
The application is installed. It can be configured, modified, and everything else that can be
done with any other application. The only real difference is that if the EAR file is removed
from the monitoredDeployableApps directory, the application would be uninstalled.

__ 9. Uninstall the application.


__ a. Using a terminal window, return to the
monitoredDeployableApps/servers/server1 directory.
__ b. Delete the CacheMonitor.ear file with the following command in the terminal
window in the server1 directory:

8-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. rm CacheMonitor.earReopen the SystemOut.log file for profile1 and notice

the new log entries.

__ d. Return to the administrative console and verify that the application no longer
shows up in the list of applications.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-11

Student Exercises

This approach works well, but only in some cases. If there is a requirement for anything but
the default settings for an application deployment, this approach does not do everything
that is needed. The next section helps address these additional requirements by using
properties file-based configurations to do the installations. This approach allows altering
the configurations during the drag-and-drop deployments.
It is important to note that when using properties file based configurations, the
drag-and-drop feature is limited to application deployments. Any additional properties that
are defined in the configuration files, aside from application deployments, are ignored.

Section 4: Use properties files with drag-and-drop deployment


In this section, the new drag-and-drop deployment feature is used to deploy an EAR file.
This feature allows the deployment of an application by dragging an EAR file into a
monitored directory. The result is that the application is automatically installed and started.
__ 1. Explore the monitoredDeployableApps directory again.
__ a. Return to the root of the monitoredDeployableApps directory and check what
subdirectories exist.
__ b. Notice there is a subdirectory named deploymentProperties.

Note
This directory is used to drag properties files into it, and it allows applications to be installed
with specific configurations (not just installing with the defaults).
7

__ 2. Export the properties for an existing application. This step demonstrates how you
might investigate what options can be set for an application or what options are
already set for an application.
__ a. In a terminal window, change to the bin directory of profile1.
__ b. Start wsadmin with the following command:
./wsadmin.sh -lang jython -username wasadmin -password web1sphere

8-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Enter the following command to export the properties for the DefaultApplication
(use the file /usr/software/prop_files/ DefaultApplication_props.py for
copying and pasting if you prefer).
AdminTask.extractConfigProperties('[-propertiesFileName
DefaultApplication.props -configData Deployment=DefaultApplication
-options [[SimpleOutputFormat true]]]')
Note
The SimpleOutputFormat feature is new to version 8 and makes the output more readable.
It also avoids listing properties that are intended to be hidden.

__ d. Exit from the wsadmin process by typing exit at the prompt.


__ e. Open the output file (DefaultApplication.props) in the current directory with a
text editor (such as dtpad) and look at the contents. Notice all the properties that
are available.
This step shows what some of the properties are that can be affected by using
the property file-based configuration.
__ 3. Install an application with a property file-based configuration.
Note
For the purposes of this exercise, the property file-based configuration that is used includes
only a small subset of the possible properties.

__ a. Using the administrative console, look at the list of applications that are currently
deployed in the cell (Applications > Application Types > WebSphere
enterprise applications):

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-13

Student Exercises

__ b. Install the BeenThere EAR file by copying the installBeenThere_linux.props


file from the /usr/software/prop_files directory into the
deploymentProperties directory. From a terminal window, change to the
deploymentProperties directory and use the following command:
cp /usr/software/prop_files/installBeenThere_linux.props .

__ c. Reopen the SystemOut.log file and notice the new log entries.Return to the
console window and look at the list of applications now deployed (refresh the
window if the console is already showing the list of applications).

__ 4. Use a property file to update the BeenThere application.


__ a. Copy the updateBeenThere_linux.props file from the
/usr/software/props_file directory into the deploymentProperties
directory.
Note
In this case, you are merely replacing the EAR file with the exact same EAR file. However,
in a real world example, a new EAR file, or the properties for the deployment, would be
different.

__ b. Notice the new output in the SystemOut.log file.

8-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Notice that the list of applications remains the same.


__ 5. Use a property file to remove the BeenThere application.
__ a. Copy the uninstallBeenThere.props file from the
/usr/software/props_file directory into the deploymentProperties
directory.
__ b. Notice the new output in the SystemOut.log file.
__ c. Notice that the list of applications in the console no longer lists the BeenThere
application.
Information
It is also possible to use property file-based deployments for any number of other functions.
View the file named updateSingleFile.props for an example of updating a single file.
Look at the file named updateMultipleFiles.props for an example of deploying multiple
files at the same time. Look at removeModule.props for an example of removing a single
module.

__ 6. Look through the log files.


__ a. Using a text editor, open the SystemOut.log log file. Scroll to the bottom and do
a reverse search for: CWLDD
Notice that the entries in the log file include messages about the drag-and-drop
actions other than just those containing the string CWLDD.
__ b. Using a terminal window, change directories to
<profile_root>/profile1/wstemp.
__ c. Look for the directory with a name that starts with dragdrop (if there is more
than one, choose the one with the latest date) and change to that directory.

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-15

Student Exercises

__ d. Notice that there is a report file for the installation, the update, and the uninstall
operations. Look at the contents of each file, and notice that the entries clearly
show what happened during that operation.

__ e. Delete the report files in the dragdrop directory.


__ f.

Copy the bad1_linux.props file from the /usr/software/props_file


directory into the deploymentProperties directory.

__ g. Reopen the SystemOut.log file for server1 and notice the various error
messages (including that the EAR file does not exist), but no report was
generated in the dragdrop directory under wstemp.

8-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
The drag-and-drop thread does a prevalidation check of the props file, including verifying
that the EAR file exists. If that prevalidation fails, the process does not get far enough to
generate a report.

__ h. Copy the bad2_linux.props file from the /usr/software/props_file


directory into the deploymentProperties directory.
__ i.

Reopen the SystemOut.log file and notice that the new entries show various
messages, which indicate that the installation failed. But also notice that the
dragdrop directory contains a report.

End of exercise

Copyright IBM Corp. 2012

Exercise 8. Monitored directory: Drag-and-drop deployment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

8-17

Student Exercises

Exercise review and wrap-up


This lab went through the process of using the monitored directory function to deploy an
application. It also looked at installing applications by dragging property files into the
monitored directory.

8-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 9. Problem determination


What this exercise is about
This exercise illustrates how to configure and view log and trace files.
Both the basic mode of logging and tracing and the new HPEL mode
are used. In addition to log and trace data, you learn how to gather
JVM-related dump files.

What you should be able to do


At the end of the exercise, you should be able to:
Use the administrative console to configure and view log data
Configure a server to use HPEL
Enable tracing on application server components
Use the HPEL Log Viewer to examine log and trace data
Enable verbose garbage collection for an application server
Enable memory leak detection for an application server
Describe how IBM Support Assistant tools can be used to analyze
JVM memory dumps

Introduction
The first step in problem determination is to collect diagnostic data.
This exercise focuses on how to gather runtime and application data
with the tools that WebSphere provides such as logging, tracing, and
JVM memory dumps. Analyzing the diagnostic data can best be done
by using specific tools. Many such tools are available from the IBM
Support Assistant. Though the IBM Support Assistant tools are not
used in the exercise, there is a brief overview in the last section of
some important tools for analyzing JVM memory dump data. This
exercise also uses an example application that is called BadApp that
can demonstrate common problems that an administrator
troubleshoots.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-1

Student Exercises

Requirements
To do this exercise, you must have a working WebSphere Application
Server server1, administrative console, and a running
PlantsByWebSphere application that is installed on profile1.

9-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Preface
This exercise focuses on how to gather diagnostic data for problem
determination with tools that are part of the WebSphere Application Server V8
product. The last part of the exercise provides an overview of specific tools that
can be used to help analyze the diagnostic data. All of the tools that are
presented here are available in the IBM Support Assistant Workbench.

Section 1: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Working with log files of the application server


In this section, you examine the configuration options for basic mode logging.
__ 1. Verify that server1 is running.
__ a. Using a terminal window, go to <profile_root>/profile1/bin
__ b. At the prompt, enter: ./serverStatus.sh server1 -username wasadmin
-password web1sphere
__ c. If the server is not running, enter: ./startServer.sh server1
Information
If the server is already started, you are challenged to provide a user ID and password when
running serverStatus commands. Enter wasadmin for the user ID and web1sphere for
the password.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-3

Student Exercises

__ 2. You can change the location, name, and other settings of log files from the
administrative console.
__ a. Use a web browser to start the administrative console.
__ b. Log in. Enter wasadmin for the user ID and web1sphere for the password.
__ c. In the navigation tree, select Troubleshooting > Logs and trace. In the pane on
the right, click server1.
Information
You can also reach the configuration area for Logging and Tracing by selecting Servers >
Server Types > WebSphere application servers > server1. Click Logging and Tracing
under the Troubleshooting section.

__ 3. Change the number of historical files and set the maximum size of the log file for
System.out. The number of historical files grows from zero to the value of the
maximum number of historical files field. The next rollover deletes the oldest
historical file.
__ a. Select JVM Logs.

9-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. You can view and modify settings from the Logging and tracing panel for
System.out and System.err logs.

Information
Use this page to view and modify the settings for the Java virtual machine (JVM)
System.out and System.err logs for a managed process. The JVM logs are created by
redirecting the System.out and System.err streams of the JVM to independent log files.
The System.out log is used to monitor the health of the running application server. The
System.err log contains exception stack trace information that is used for problem
analysis. One set of JVM logs exists for each application server and all of its applications.
JVM logs are also created for the deployment manager and each node manager. Changes
on the Configuration panel apply when the server is restarted. Changes on the Runtime
panel apply immediately.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-5

Student Exercises

__ c. Under General Properties for System.out, set the Maximum Size to 3 MB and
the Maximum Number of Historical Log Files to 2.

__ d. Click OK.
__ e. Save the changes to the master configuration.
__ 4. View the SystemOut.log and SystemErr.log files for server1 from the
administrative console.
__ a. Select Troubleshooting > Logs and trace > server1 > JVM Logs and select
the Runtime tab.
Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
captures, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

9-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click View to the right of the File Name field for System.out.

__ c. The default is to retrieve 250 lines in one step. You can specify the range of lines
that are retrieved at the top of the Logging and Tracing window. Retrieve lines
250400 by typing 250-400 and clicking Refresh.

__ d. Notice that several lines from the log file are shown. Scroll down to view the log
records.
Information
You can also go to the <profile_root>/profile1/logs/server1 folder to view the logs
with a text editor. Using an editor is preferable since you can use the search features of
your text editor.

__ 5. Configure the IBM service logs from the administrative console. Unlike the JVM
logs, the IBM service logs cannot be viewed within the administrative console. You
Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-7

Student Exercises

must use a tool such as the Log Analyzer, which is available in the IBM Support
Assistant.
__ a. Select Troubleshooting > Logs and trace > server1 > IBM Service Logs.

__ b. Check the box for Enable service log.


Note
In WebSphere Application Server Version 7 and earlier, the service log is enabled by
default. In WebSphere Application Server Version 8 and later, however, the service log is
disabled by default. If you do not intend to enable HPEL for version 8, then you can enable
the IBM service log to be consistent with earlier versions.

Information
The IBM service log contains both the application server messages that are written to the
System.out stream and special messages that contain extended service information that
you can use to analyze problems. One service log exists for all Java virtual machines
(JVMs) on a node, including all application servers and their node agent, if present. A
separate activity log is created for a deployment manager in its own logs directory. The IBM
Service log is maintained in a binary format. Use the Log Analyzer or Showlog tool to view
the IBM service log.
To find the value for $(LOG_ROOT), you can look to Environment > WebSphere
Variables. The name of the service log is activity.log, but the name can be changed
along with its location in the file system. Maximum file size can be set, and you can enable
9-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

or disable a correlation ID. You can use the correlation ID to correlate activity to a particular
client request. You can also use it to correlate activities on multiple application servers, if
applicable.

__ c. Click OK.
__ d. Save changes.

Section 4: Set up and configure HPEL


High Performance Extensible Logging (HPEL) is a new mode of logging and tracing. To
take advantage of this new log and trace framework, HPEL mode must be enabled. After
HPEL mode is enabled, the JVM logs (typically SystemOut.log and SystemErr.log), the
trace log (typically trace.log), and the service log (typically activity.log) are no longer
written to. Instead, log and trace content is written to a log data or trace data repository in a
proprietary binary format and, if configured, to a text log file. By disabling the text log file,
you gain the largest possible performance benefit of HPEL. A log viewing tool, Log Viewer,
is provided to allow for viewing, filtering, monitoring, and formatting the log and trace data
in the repositories.
In this section, you enable HPEL mode for server1. Then, you explore and modify the log
and trace configurations.
__ 1. Enable HPEL for server1In the administrative console, go to the Logging and tracing
panel for server1 by clicking Troubleshooting > Logs and trace > server1.
__ 2. Enable HPEL by clicking Switch to HPEL Mode.

__ 3. Click Save to save the configuration.


Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-9

Student Exercises

__ 4. Restart server1. It is necessary to restart a server for the HPEL mode to become
effective.
__ a. Go to the <profile_root>/profile1/bin folder and run the command:
./stopServer.sh server1 -username wasadmin -password web1sphere
__ b. After server1 stops, run the command:
./startServer.sh server1
__ 5. Configure HPEL for server1.
__ a. Go to the administrative console and log on if you are prompted.
__ b. Go to the Logging and tracing panel for server1 by clicking Troubleshooting >
Logs and trace > server1.

__ c. In the general properties section, you can see the current (default) configuration
for the three HPEL repositories. Each has a directory location, and cleanup
options for age and size of log files. Notice that the HPEL text log has a status of
Enabled. In the next step, you disable the text log.
__ 6. Disable the HPEL text log.
__ a. In the General Properties section, click the link Configure HPEL text log.

9-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Clear the box for Enable text log.

__ c. Click OK.
__ d. Click Save to save the configuration.
__ e. It is necessary to restart the server for this change to take effect. However, wait
until you make some other configuration changes before you restart server1.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-11

Student Exercises

__ 7. Explore the configuration for HPEL logging.


__ a. Go to the General properties tab and click the link Configure HPEL logging.

__ b. Notice the different options for configuring HPEL logging. Also, notice that log
buffering is enabled. Since buffering improves performance, it is a good practice
to keep it enabled.
__ 8. Modify the HPEL log configuration.
__ a. Change Maximum Log Size from 50 to 20 MB.
__ b. Click OK.
__ c. Click Save to save the configuration.

9-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 9. Explore the configuration for HPEL tracing.


__ a. Back in the General Properties tab, click the link Configure HPEL trace.

__ b. Notice that you have options to trace to a log directory or memory buffer. The
default is to trace to a log directory.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-13

Student Exercises

__ 10. Modify the HPEL Trace configuration.


__ a. Under Log record purging policies, configure when to begin cleanup of oldest
records by using the menu to select when oldest records reach age limit.
__ b. Next, set Log record age limit to 12 hours.

__ c. Click OK.
__ d. Click Save to save the configuration.
__ e. Restart server1 so that the new configuration is in effect.
__ 11. Verify new HPEL configurations.
__ a. Go to the administrative console and log on if necessary.
__ b. Click Troubleshooting > Logs and trace > server1.

__ c. Verify that all the configuration changes that you made are now in effect.

9-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 5: Use the Log Viewer in the administrative console to examine


log data and trace data
In this section, you use the Log Viewer in the administrative console to examine the log
messages for an application server. You use various filtering functions to customize what
log records are shown.
__ 1. Go to the Log Viewer for server.
__ a. Click Troubleshooting > Logs and trace > server1 > View HPEL Logs and
Trace.
__ 2. Select the latest instance of the application server.
Note
Some versions of Firefox, at times, seem to have issues with loading the data. If there is a
message that asks you to wait while the data is loaded, click in the background of the
console window to solve the problem.

__ a. Expand Content and Filtering Details.


__ b. Expand the Server Instance tree, and make sure that the latest instance of
server is selected (highlighted).

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-15

Student Exercises

Note
Since you enabled HPEL for server1, you do not see many instances of the server log
repository. An instance is created for each new start of the server and designated with a
time stamp. In this example, which uses the default configuration, the instances for each
day are stored in a folder that is designated with the date. Any instance can be viewed by
selecting it, and the log records are shown in the Log Viewer.

__ c. Collapse the Content and Filtering Details tree.


__ 3. Use the Log Viewer to explore the log records.
__ a. On the Log Viewer, click Next Page and Last Page to browse though the log
records. Then, click First Page.

__ b. Try clicking one or more Message ID links to see more details about a message.
__ 4. Filter records that are shown in message levels.
__ a. Expand Content and Filtering Details and select WARNING as the Minimum
level in the View Contents section.

9-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click Apply.
__ c. View the records in the Log Viewer. You notice that the records that are shown
have a minimum level of WARNING. Browse through the messages to see
whether there are any at a higher level such as SEVERE. Alternatively, select
SEVERE as the Minimum level in the View Contents section, and click Apply.
__ d. Clear the Minimum and Maximum level windows. Click Apply to see all the
records again.
__ 5. Show all records that are associated with a specific thread.
__ a. Browse through the records and look for any message of interest at level
WARNING, AUDIT, or SEVERE. Record the Thread ID for that record
______________.
__ b. Highlight any record with the same Thread ID and click Show Only Selected
Threads.

__ c. Browse through the resulting records, and you can see that only the messages
from the selected Thread ID are shown. Also, notice that those records are
shown in quasi-chronological order (the order in which the server emitted them).
__ d. After viewing the records for the selected thread, click Show All Threads.

Section 6: Enable tracing for an application server and view trace data
from the Log Viewer
In this section, you configure tracing on the session management components of server1.
Use the PlantsByWebSphere application to generate trace data, and view the trace data in
the Log Viewer.
__ 1. Configure the diagnostic trace for the session management components of server1.
__ a. In the administrative console, click Troubleshooting > Logs and trace >
server1.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-17

Student Exercises

__ b. Click Change log detail levels.

__ c. Select the Runtime tab, and enter the following trace strings. These strings are
for the components and trace levels that the IBM Support MustGather
documentation suggests for session management problems.
com.ibm.ws.session.*=all:
com.ibm.ws.webcontainer.srt.*=all:
WAS.j2c=all:
RRA=all:
WAS.database=all

__ d. Remember to add a colon (:) after the existing trace string *=info:
__ e. Click Apply.
__ 2. Access the PlantsByWebSphere application and generate some trace data.
__ a. Start a new browser and enter the web address:
http://localhost:9080/PlantsByWebSphere

9-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click the Trees tab on the Welcome page.

__ c. Select any tree that you like, and click Add to cart.

__ d. This activity is enough to generate some interesting trace data. Close the
browser.
__ 3. Use the Log Viewer in the administrative console to examine the trace data.
__ a. Click Troubleshooting > Logs and trace > server1 > View HPEL logs and
trace.
__ b. Expand the Contents and Filtering Details tree.
Information
In the View Contents section you can select System out, System err, or Logs and trace.
Selecting System out shows records that were sent to the System Out stream
with an API like System.out.println(...)
Selecting System err shows records that were sent to the System Error stream
from an API like System.err.println(...)
Selecting Logs and trace specifies that log and trace records are included in the
log view. Log and trace entries can be further specified to include a minimum or
maximum level.
Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-19

Student Exercises

Examples of log and trace filters:


- Selecting logs and trace and clearing minimum level and maximum level
fields results in the log view shows records with any log or trace level
(default).
- Selecting logs and trace and setting minimum level to WARNING results in
the log view that shows log records with levels WARNING, FATAL, or
SEVERE.
- Selecting logs and trace and setting maximum level to FINE results in the log
view that shows trace records with levels FINE, FINER, or FINEST.
- Selecting logs and trace and setting minimum level to DETAIL and maximum
level to AUDIT results in the log view that shows log records with levels
DETAIL, CONFIG, INFO, or AUDIT.

__ c. In the View Contents section, select FINEST as the Minimum level and FINE as
the Maximum level.

__ d. Click Apply.

9-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click Refresh View.

__ f.

Click Next Page and Previous Page to go through the trace data. The level of
all records is either FINE, FINER, or FINEST.

__ 4. Use the features of the Log Viewer to explore the trace data. Here are a few
suggestions that you might try.
__ a. Set both Minimum level and Maximum level to FINEST. This setting shows you
only the records at the FINEST level, if there are any.
__ b. Select (highlight) any Thread ID of interest and click Show Only Selected
Threads. Observe the number of different loggers that stream messages in that
thread.
__ c. Try filtering on message content. Look for key words among the message
details, such as getConnection or JSESSIONID. Use wildcards. Remember to
click Apply and Refresh View.

Section 7: Collecting JVM data


There are several common JVM-related problems such as hung threads, memory leaks,
and out-of-memory conditions. This section shows you how to collect diagnostic data to

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-21

Student Exercises

help troubleshoot these problems. First, you install an example application that is written to
illustrate several JVM-related problems.
__ 1. Install the badapp application.
__ a. In a command prompt window, go to <profile_root>/profile1/bin.
__ b. Enter the following command all on one line:
./wsadmin.sh -f /usr/software/Troubleshooting/install_badapp_linux.py
-username wasadmin -password web1sphere
__ c. Wait until you see the following message in the command window.
ADMA5013I: Application BadAppEARProject installed successfully.
__ 2. Verify that the application is installed and start it from the administrative console.
__ a. Go to the administrative console and click Applications > Application Types >
WebSphere enterprise applications.

__ b. Check the box for BadAppEARProject, and click Start.


__ c. Wait for the application to start successfully and its status is started (green
arrow).
__ 3. Prepare server1 to log garbage collection data.
__ a. Click Servers > Server Types > WebSphere application servers > server1.
__ b. On the configuration tab, scroll down to Server Infrastructure, expand Java
and Process Management, and click Process definition.

9-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Click Java Virtual Machine.

__ d. Check the box for Verbose garbage collection.

__ e. Click OK.
__ f.

Click Save to save the configuration.

__ 4. Configure memory leak detection on server1.


__ a. Click server1 in the breadcrumb trail.
__ b. On the configuration tab, scroll down to the Performance section and click
Performance and Diagnostic Advisor Configuration.

__ c. Check the box for Enable Performance and Diagnostic Advisor Framework.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-23

Student Exercises

__ d. Click OK. Click OK on the warning message.


__ e. Under Additional Properties, click Performance and Diagnostic Advice
configuration.

__ f.

Scroll down on the configuration tab to the entry for Memory Leak Rule.

__ g. Verify that the status is started (solid green arrow). When this rule is checked,
tuning advice is written to the JVM log files for a server when a possible memory
leak is detected.
__ h. Click Save to save the configuration.
__ i.

Restart server1.

__ j.

From a command window, change directory to: <profile_root>/profile1/bin

__ k. Enter the command:


./logViewer.sh -monitor
__ 5. Run the application.
__ a. From a web browser, enter the web address:
http://localhost:9080/BadAppWebProject

9-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Enter a 5 in the Bad Behavior Mode window, and click Submit.

__ c. The browser seems to hang for several minutes. During this time, examine the
Log Viewer messages in the command window. You see messages similar to the
following.

__ d. After about 5 minutes, you see the following error message in the web browser.
Return page for BadApp
Request status:OutOfMemoryException was thrown (was this error
expected?), see WebSphere Application Server logs

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-25

Student Exercises

Information
An OutOfMemoryException is thrown. If the application was not purposely written to show
the error message, you would see this symptom only if you examined the JVM logs of the
server.

__ e. Stop server1.
Important
It is likely that this OutOfMemory condition completely hung the application server, so that it
is unresponsive to a stopServer command. If so, for your server, locate the server1.pid
file in <profile_root>/profile1/logs/server1 and record the PID here __________.
To terminate the process forcefully, use the following command:
kill -9 <PID>

__ f.

Start server1.

__ 6. Examine the logs for server1.


__ a. Go to the administrative console.
__ b. Click Troubleshooting > Logs and trace > server1 > View HPEL logs and
trace.
__ c. Expand Content and Filtering Details, and select the previous server instance.

9-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. In the Filtering section, enter BadApp* in the Message contents field.

__ e. Click Apply.
__ f.

You now see the same messages that were shown in the command window.
Select (highlight) any of these messages, and click Show Only Selected
Threads.

__ g. You now have several pages of log records from the selected thread. Page
through these records by clicking Next Page on the Log Viewer. After you reach
the last BadApp message, you will see the stack trace that resulted from the
OutOfMemoryError.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-27

Student Exercises

__ h. In the View Contents section, enter WARNING for both Minimum and Maximum
levels.

__ i.

Clear the Message content field, and click Apply.

__ j.

Page through the warning messages to look for a message from the
Performance Advisor about memory leaks. It is possible that you might see a
message with the code TUNE90001W, depending on how unresponsive your
server was after the OutOfMemory exception.

__ k. If you do see this message, click the TUNE90001W link to see details.
__ 7. Examine other JVM-related diagnostic memory dumps. Typically a server is
configured to generate a Java core file and a heap memory dump on OutOfMemory
exceptions. The default location for these files is the profile root directory.
__ a. Using a file system explorer, go to <profile_root>/profile1. You can see at
least one Java core and heap dump file.

Information
Java core file
The Java core file, also known a thread dump file, is a text file and can be viewed with a
text editor. These files can be manually analyzed an experienced administrator, but it is
often better to use a tool such as the IBM Thread and Monitor Dump Analyzer. Using
Thread and Monitor Dump Analyzer, you can import several Java cores that are generated
over a period during which the server is hung. Thread and Monitor Dump Analyzer can
then do a comparative analysis of the threads over that period.

9-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Heap dump file


The heap dump file is a memory dump of all the Java objects on the JVM heap. It is a
binary (PHD) file and must be analyzed from a tool such as Heap Analyzer or Memory
Analyzer.

__ b. Using a file system explorer, go to <profile_root>/profile1/logs/server1


__ c. Use a text editor to open the native_stderr.log file. This file is the default
location for verbose GC data.
__ d. Search the verbose GC data for: JVMDUMP006I
This search takes you to the GC data that was logged at the time of the
OutOfMemory exception. Examine the allocation failure data just before the
exception was thrown. You can see how much heap was in use and how much
heap was free at that time.
Information
Verbose Garbage Collection (GC) data
The verbose GC data is in text format, and an experienced administrator can analyze the
file by hand. However, it is a good practice to use a tool such as Garbage Collection and
Memory Visualizer (GCMV) to analyze GC data.

Section 8: Clean up server1


The last section concludes the active exercise. The next section is read-only. Follow these
steps to clean up server1 and uninstall the BadApp application.
__ 1. Disable verbose garbage collection.
__ a. Click Servers > Server Types > WebSphere application servers > server1.
__ b. On the configuration tab, scroll down to Server Infrastructure, expand Java
and Process Management, and click Process definition > Java Virtual
Machine.
__ c. Clear the box for Verbose garbage collection.
__ d. Click OK.
__ e. Click Save to save the configuration.
__ 2. Disable the Runtime Performance Advisor.
__ a. Click server1 in the breadcrumb trail.
__ b. On the configuration tab, scroll down to the Performance section and click
Performance and Diagnostic Advisor Configuration.
Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-29

Student Exercises

__ c. Clear the box for Enable Performance and Diagnostic Advisor Framework.
__ d. Click OK.
__ e. Click Save to save the configuration.
__ 3. Uninstall the BadApp application.
__ a. Go to the administrative console.
__ b. Click Applications > Application Types > WebSphere enterprise
applications.
__ c. Select BadAppEarProject and click Uninstall.

__ d. Click OK.
__ e. Click Save to save the configuration.
__ f.

Restart server1.

Section 9: READ ONLY: Using IBM Support Assistant tools to analyze


JVM data
In this section, you can see and read about the analysis of JVM diagnostic data with
various tools available in the IBM Support Assistant.
Important
This section is for reference only. The IBM Support Assistant Workbench is not installed
on the VMware image that is used for this course. You cannot run any of the tools that are
described in the following section from the VMware image.

Information
For more details and education resources about IBM Support Assistant Problem
Determination Tools, visit the following websites:
IBM Support Assistant website
http://www.ibm.com/software/support/isa/

9-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The IBM Monitoring and Diagnostic Tools for Java, Memory Analyzer:
http://www.ibm.com/developerworks/java/jdk/tools/memoryanalyzer/
The IBM Monitoring and Diagnostic Tools for Java, Garbage Collection and
Memory Visualizer (GCMV):
http://www.ibm.com/developerworks/java/jdk/tools/gcmv/

Java core analysis


The javacore file that was dumped during the OutOfMemory condition, which the BadApp
application generated, was imported into the IBM Thread and Monitor Dump Analyzer
tool and analyzed.
IBM Thread and Monitor Dump Analyzer for Java allows you to find deadlocks, possible
hung threads, and resource contention through its heuristic engine and analysis of the
javacore.
Some of the features include:
Summary of javacore
Thread detail view
Monitor detail view
List of hang suspects
Thread compare view
Thread comparison summary
Monitor lock compare view
Garbage collector statistics for IBM JVM
Comparative analysis of multiple javacores

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-31

Student Exercises

After importing and analyzing a javacore, the tool provides a brief report, which shows the
javacore file name, the cause of the thread memory dump, and the process ID of the server
instance. One or more warnings might be seen, indicating that there are deadlocked
threads, that the heap is exhausted. The warning in this screen capture shows that the
Java heap is exhausted.

Right-clicking Analysis on the toolbar shows an analysis of the threads, monitors, or a


comparative analysis of multiple javacores. This screen capture shows the Thread
analysis. On the left is a sortable list of all threads, their state, and method where that
thread is running. Clicking any thread name gives you a stack trace of the method and

9-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

identifies what threads it is waiting on (if its state is Waiting), or what threads are possibly
waiting on it. There is also a table that summarizes the number of threads in each state.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-33

Student Exercises

Heap memory dump analysis


The heap dump file that the OutOfMemory condition generated from the BadApp
application was imported into the Memory Analyzer tool and analyzed.
The IBM Monitoring and Diagnostic Tools for Java Memory Analyzer is a fast and
feature-rich Java heap analyzer that helps you find memory leaks and reduce memory
consumption.
This tool can analyze memory dumps that contain millions of objects, providing the
following information:
The retained sizes of objects
Processes that are preventing the garbage collector from collecting objects
A report to automatically extract leak suspects
Suitable memory dump types include:
- Java heap dumps
- IBM Portable Heap Dump (.phd) binary file
- Oracle Java Virtual Machine (JVM) hprof binary heap dump
- System dumps that an IBM JVM generates (processed with jextract where
required)
- z/OS SVC dumps that an IBM 1.4.2 JVM generates

9-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

One or more leak suspects are identified. The description of the single suspect in this
analysis shows the class name and Java object, class loaders, and amount of heap
occupied (80.48%).

The shallow heap is the amount of memory that one object requires. A retained set is one
or more objects plus any objects that are referenced, directly or indirectly, only from those
original objects. The retained set is the set of objects that garbage collection would remove
when an object, or multiple objects, is garbage collected. The retained heap is the total
heap size of all the objects in the retained set. This value is the amount of memory that all
the objects that are kept alive by the objects at the root of the retained set require.

A tree of accumulated objects can be expanded and examined object by object. Each
object name is a link that can be clicked to reveal a menu of options for further analysis.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-35

Student Exercises

Verbose GC data
The IBM Monitoring and Diagnostic Tools for Java Garbage Collection and Memory
Visualizer is a verbose GC data visualizer. The GC and Memory Visualizer parses and
plots various log types, including verbose GC logs, -Xtgc output, and native memory logs
(output from ps, svmon, and perfmon).
It provides:
A graphical display of a wide range of verbose GC data values
Tuning recommendations and detection of problems such as memory leaks
Report, raw log, tabulated data, and graph views
Saving of data to HTML reports, .jpeg images, or .csv files (for export to
spreadsheets)
Viewing and comparing multiple logs

The line plot of the verbose GC data

The top line plots the Heap size and the bottom line plots the Used heap (after collection).
The vertical line at approximately 16 minutes represents a restart of the JVM, so the data
that is plotted here is for two instances of the application server. Both plots show a sudden
expansion of the heap size to near the maximum heap size of 250 MB, signaling
OutOfMemory exceptions.

9-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The report and recommendations

The tool provides a detailed report of object utilization and recommendations for tuning
garbage collection. It is possible that there are warnings about heap exhaustion, as shown
in this example.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-37

Student Exercises

Summary of GC data

The summary of the GC data shows the GC mode, gencon in this example, and detailed
statistics about the garbage collection that are helpful for tuning the performance of a JVM.
In general, tuning requires minimizing pause times and maximizing time between
collections. The largest memory request data might indicate a memory leak or the use of
overly large objects in the application.

End of exercise

9-38 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


In this exercise, you learned how to use the administrative console to configure and view
log data. You also learned how to configure a server to use HPEL and set up tracing on
application server components. You used the HPEL Log Viewer to examine log and trace
data. To gather diagnostic JVM-related data, you configured verbose garbage collection
and memory leak detection for the application server. Finally, you saw how specific IBM
Support Assistant tools can be used to analyze JVM memory dumps.

Copyright IBM Corp. 2012

Exercise 9. Problem determination


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

9-39

Student Exercises

9-40 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 10.Using wsadmin


What this exercise is about
In this lab exercise, you use the wsadmin command. You learn to
manipulate wsadmin objects from the command line and from scripts.
You also use the IBM Assembly and Deploy Tools to create, test, and
debug wsadmin scripts that are written in Jython.

What you should be able to do


At the end of the lab, you should be able to:
Use wsadmin to execute administrative commands interactively
and with scripts
Use the Jython editor to create and debug a simple script
Examine wsadmin settings

Introduction
The WebSphere Application Server wsadmin tool can be used to run
scripts for making configuration changes in the application server.
You can use the wsadmin tool to manage a WebSphere Application
Server installation. This tool uses the Bean Scripting Framework
(BSF), which supports various scripting languages to configure and
control your WebSphere Application Server installation. The wsadmin
tool supports the Jython and Jacl scripting languages. The Jython
syntax for the wsadmin tool is the strategic direction for WebSphere
Application Server administrative automation.
The wsadmin shell makes Java objects available through
language-specific interfaces. Scripts use these objects for application
management, configuration, operational control, and for
communication with MBeans running in the WebSphere server
processes.
Scripting is a nongraphical alternative that you can use to configure
and manage the WebSphere Application Server.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-1

Student Exercises

Requirements
To dot his exercise, you must have a working WebSphere Application
Server installed in your working environment and the IBM Assembly
and Deploy Tools available on the same or a different workstation from
the server.

10-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
The wsadmin tool supports two scripting languages, Jython and Jacl. The IBM Assembly
and Deploy Tools supports only Jython. This exercise covers scripting with Jython scripts.

Section 1: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Using wsadmin with Jython


When running scripts, the -f flag runs a script that is contained in a file, wsadmin runs the
appropriate language interpreter that is based on the file extension of the script. Jython is
used for scripts with a file type of .py, and Jacl is used for scripts with a file extension of
jacl.
The wsadmin shell typically does not require the -lang jython command-line option.
There are some options like -profile which still require you to specify the language that
is used in the file that contains the profile. If no -lang flag is specified, Jacl is the default
language. This requirement also applies when starting the wsadmin shell without passing a
file to run or when using wsadmin with the -c flag to pass and run a single command.
If Jython is preferred, the following command-line option is used for a one-time switch to
use Jython:
./wsadmin.sh -lang jython
Information
To use Jython as the default scripting language, edit the wsadmin.properties file found in
the <profile_root>/profile1/properties directory.
Look for the entry that contains com.ibm.ws.scripting.defaultLang=jacl and set it
equal to: jython

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-3

Student Exercises

This change is global to this profile. It is also possible to define a property file for individual
users or through an environment variable.

This section of the lab explores how to use wsadmin to run Jython commands. Activities
include starting wsadmin, getting help, and running various commands.
There are solution files in the /usr/software/wsadmin folder. You can continue with the
exercise and enter the commands by hand, or you can run the appropriate script.

Section 4: Start wsadmin


__ 1. Start WebSphere Application Server.
__ a. Open a command-prompt window and go to the
<profile_root>/profile1/bin directory.
__ b. Verify that the server is running:
./serverStatus.sh server1 -username wasadmin -password web1sphere
__ c. If the application server is not running, start the server by entering the command:
./startServer server1
__ 2. List the command-line options for wsadmin.
__ a. Get command-line help for wsadmin. From the <profile_root>/profile1/bin
directory, enter:
./wsadmin.sh -help

10-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The result shows a list of command-line options and descriptions of those


options.

__ 3. It is possible to run a single wsadmin command and exit the wsadmin shell. This
technique is not efficient because a JVM needs to be created every time wsadmin is
run. Enter following command:
./wsadmin.sh -lang jython -c "AdminControl.getPort()"
You are prompted to log in. Enter user ID wasadmin and password web1sphere

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-5

Student Exercises

Note
The first time wsadmin runs, the environment is set up. There are several messages about
processing new jar.

The port that wsadmin is using to connect to the application server is shown.
Important
Now that you are asking wsadmin to actually connect to a running server and retrieve some
information (the port number), you are challenged for a user name and password. The
administrative security must recognize these credentials. Enter wasadmin and
web1sphere to authenticate and continue. Ensure that there are no spaces after each
entry, or authentication will fail.

See the next section for alternatives on how to deal with security while using wsadmin.

Section 5: Dealing with security


In WebSphere Application Server V8, administrative security is turned on by default. These
security settings affect wsadmin in that a valid user ID and password must be used when
starting a wsadmin session. Providing this authentication information can be done in
several ways:
1. Supply user ID and password on the wsadmin command line.
2. Supply user ID and password on the window.
3. Save the user ID and password in the property files.
Options 1 and 2 require a person to enter the information every time wsadmin is started.
These options defeat the purpose of using wsadmin to automate configuration changes
since a human must be available. Option three allows you to enter the authentication
information one time, and then every time wsadmin starts it is authenticated with the
information in the property files.

10-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Next, you enter the authentication information for wsadmin in the soap.client.props file
and also encode the file to mask the password, which is entered initially in clear text.
__ 1. Add the user ID and password to the properties file.
__ a. Edit the soap.client.props file in the
<profile_root>/profile1/properties folder.
__ b. Find the entries:
com.ibm.SOAP.loginUserid=
com.ibm.SOAP.loginPassword=
__ c. To the right of the equals sign, enter wasadmin and web1sphere in the
corresponding fields.

Warning
This practice is a potential security problem.
First, this properties file contains the password. It can be encoded. Second, any
administrator who runs wsadmin has access to WebSphere as wasadmin without
authentication.

__ d. Save the file.


Information
If you are connecting to wsadmin with RMI instead of SOAP, the file to edit is
sas.client.props. This file is in the same folder as the file used for the SOAP connection.
The entries to change are:
com.ibm.CORBA.loginUserid=
com.ibm.CORBA.loginPassword=

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-7

Student Exercises

__ 2. Run the same command again:


./wsadmin.sh -lang jython -c "AdminControl.getPort()"
You are not prompted for authentication. Having the authentication information in the
property file also means that you can now stop the server without providing a user
name and password.
__ 3. If you are uncomfortable with leaving passwords visible in the properties file, a tool is
provided to encode the passwords.
Run the PropFilePasswordEncoder tool on the soap.client.props file.
__ a. From the command window on the <profile_root>/profile1/bin folder, start
the following command (all in one line, do not type <space>):
./PropFilePasswordEncoder.sh ../properties/soap.client.props
<space> com.ibm.SOAP.loginPassword -Backup
__ b. Open the file to see the changes.

Section 6: Starting wsadmin to run a script in a file


As mentioned previously, running wsadmin multiple times with the -c command-line
option is inefficient as the Java virtual machine (JVM) hosting wsadmin needs to be started
and shut down for every command.
It is much more efficient, and faster, to combine multiple commands into a single file which
can be run as a unit. The added benefit of this approach is that scripting logic can be
included to obtain runtime values dynamically.
__ 1. From a command prompt (not the wsadmin prompt), you can run wsadmin with the
-f <filename> option. This option gives you the ability to get wsadmin to load and
run a script file. The command to run a script is:
./wsadmin.sh -f /usr/software/wsadmin/listJDBCProviders.py
In the example above, the listJDBCProviders.py file is a script file that lists all the
JDBC providers that are defined on the server. This list includes application scoped
providers in the application.
Run the script now to view all the JDBC providers that are defined on the server:
1+1
=2

Example

WASX7209I: Connected to process "server1" on node was8host01Node01


using SOAP connector; The type of process is: UnManagedProcess
System information: Cell=was8host01Node01Cell
System information: Node=was8host01Node01
['"Default Grid Derby JDBC
Provider(cells/was8host01Node01Cell|resources.xml#JDBCProvider_128749
10-8 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

8003937)"', '"Derby JDBC Provider


(XA)(cells/was8host01Node01Cell/applications/commsvc.ear/deployments/
commsvc|resources.xml#builtin_jdbcprovider)"', '"Derby JDBC Provider
(XA)(cells/was8host01Node01Cell/nodes/was8host01Node01/servers/server
1|resources.xml#builtin_jdbcprovider)"', '"Derby JDBC Provider
(XA)(cells/was8host01Node01Cell|resources.xml#builtin_jdbcprovider)"'
, '"Derby JDBC
Provider(cells/was8host01Node01Cell/nodes/was8host01Node01/servers/se
rver1|resources.xml#JDBCProvider_1183122153343)"']

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-9

Student Exercises

__ 2. Open the /usr/software/wsadmin/listJDBCProviders.py file and examine its


contents to try and understand what the script did. The source code is also shown
here:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
19.
19.
20.
21.
22.
23.

#
# This script lists all defined JDBC providers
#
def showJdbcProviders():
providerEntries = AdminConfig.list("JDBCProvider")
# split long line of entries into individual entries in
list
providerEntryList = providerEntries.split(lf)
# print contents of list for provider in
providerEntryList:
print providerEntryList
AdminConfig.reset()
cell = AdminControl.getCell()
node = AdminControl.getNode()
lf = java.lang.System.getProperty("line.separator")
slash = java.lang.System.getProperty("file.separator")
print "System information: Cell=" + cell
print "System information: Node=" + node
showJdbcProviders()

A short explanation of the script:


The pound character # indicates that the line is a comment.
The keyword def on line five indicates that the following lines of code are a
subroutine. In Jython, indentation defines blocks of code. Every line that belongs
to the def is indented the same amount of white space. The colon at the end of
the line signifies the beginning of a block of code.
The first line of execution, on line 14, is the first non-indented line that is not a
def, in this case AdminConfig.reset(). As you recall, AdminConfig is one of
the administrative objects. The reset() method cancels any outstanding
configuration changes that are not saved.
Next, the cell and node are obtained with methods in the AdminControl object.
The line separator and slash characters change depending on the operating
environment, so it is always a good idea to obtain them at run time and not
hardcode them.
10-10 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The print command can be used as an informational or debugging aid. It can


print constants and runtime variables easily, as you can see on lines 20 and 21.
The last line, line 23, showJdbcProvider() calls the subroutine of the same
name. Here the AdminConfig object is used to obtain a list of JDBC providers.
The call returns a long string, which contains all the providers; between each
provider there is an lf character. The split function makes a list of the long
string with the lf character as the separator.
The next couple of lines iterate through the list and show each entry. The iterator
is implemented as a for loop. Also, the change in indentation for the line
indicates the body of the for loop.
__ 3. If you are comfortable working with Jython scripting, feel free to modify and rerun the
script.

Section 7: Work with wsadmin administrative objects


In this part of the exercise, you work within the wsadmin shell in the interactive mode.
When the wsadmin shell starts, you are presented with a command prompt where you can
run literally any valid command you want.
If you want to reduce the chances of making errors, you can open the
/usr/software/wsadmin/class_samples.py script and use it to copy and paste the
individual commands. Otherwise, type the commands.
__ 1. Start a wsadmin command session with the Jython language.
__ a. Verify that the directory is <profile_root>/profile1/bin
__ b. Enter:
./wsadmin.sh -lang jython
__ 2. There are five wsadmin administrative objects. They are:

Help
AdminControl
AdminConfig
AdminApp
AdminTask

Almost all server configuration can be done through these objects. Use wsadmin to
show the help that is provided for each of the administrative objects.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-11

Student Exercises

Information
The Help object is used to provide general help for the objects AdminApp, AdminConfig,
AdminControl, AdminTask, and Help. It is also the interface to obtain information about
MBeans (operations, attributes, and particular interface information about MBeans).

__ a. At the wsadmin prompt, enter the following command:


Help.help()

__ b. As you can see, the text is not formatted and is hard to read. Now try the
following command:

10-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

print Help.help()

Using the command print in front of nearly every other command produces
formatted text, which is much easier to read.
__ c. Now try to get help for the other administrative objects:
AdminConfig.help()
AdminControl.help()
AdminApp.help()
AdminTask.help()
__ 3. You can also request specific help on a particular command, or method, of an
administrative object. To see the command groups available for the AdminTask
object, enter the command:

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-13

Student Exercises

print AdminTask.help("-commandGroups")

10-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. Suppose that you are interested in the group of commands for configuring a cluster.
To show the commands available to configure a cluster, enter the command:
print AdminTask.help("ClusterConfigCommands")

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-15

Student Exercises

__ 5. For more information about the CreateCluster command, enter the command:
print AdminTask.help("createCluster")

__ 6. Use the AdminApp object to list applications and application module information.
Information
The AdminApp object is used to work with application objects that include functions such
as installing, uninstalling, listing, and editing.

__ a. At the wsadmin command prompt, enter:


print AdminApp.list()
All applications that are installed on the application server are listed.
1+1
=2

Example

wsadmin>print AdminApp.list()
DefaultApplication
ivtApp
query
wsadmin>

10-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
The list of installed applications in your environment can be different from the example
shown.

__ b. At the wsadmin command prompt, enter:


print AdminApp.listModules("PlantsByWebSphere")
A list of the installed web and EJB modules for the PlantsByWebSphere
enterprise application is shown.
__ 7. Use the AdminControl object to get information about the domain, cell, and host.
Information
The AdminControl object is used to run operational commands on live running objects. It
supports utility methods for tracing, reconnecting the server, and converting data types.

__ a. At the wsadmin command prompt, enter:


print AdminControl.getCell()
The cell name is shown.
__ b. At the wsadmin command prompt, enter:
print AdminControl.getNode()
The node name is shown.
__ c. At the wsadmin command prompt, enter:
print AdminControl.getHost()
The node name is shown.
__ 8. Use the AdminConfig object to modify the static configuration of a data source. You
modify the description of the data source in multiple steps with Jython commands,
wsadmin commands, and one variable.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-17

Student Exercises

Information
The AdminConfig object manipulates the static configuration data for a WebSphere
Application Server installation for all objects except applications. There are commands to
list, create, remove, display, and modify configuration data.

__ a. Verify the name of the data sources. At the wsadmin command prompt, enter:
print AdminConfig.list("DataSource")
The names of the data sources are shown.
__ b. At the wsadmin command prompt, enter:
datasrc=AdminConfig.getid("/DataSource:Default Datasource/")
datasrc is a variable name.
getid is an AdminConfig command that retrieves the configuration ID of
the data source object.
/DataSource:Default Datasource/ is the hierarchical containment path
of the configuration object, including the actual name of the object.

10-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. To see the result of the previous commands, enter:


print datasrc

__ d. To see the properties for the selected data source that is held by the datasrc
variable, enter:
print AdminConfig.show(datasrc)

__ e. Modify the description of the data source with the command


print AdminConfig.modify(datasrc, [["description", "Data source
used by default applications"]])
modify is an AdminConfig command that changes the description of the
data source in the configuration ID (which is stored in the variable
datasrc) to the value Data source that the application needs.
description is an attribute of server objects.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-19

Student Exercises

__ f.

Show the attributes of the data source and make sure that the change took
place:
print AdminConfig.show(datasrc)

__ g. Save the configuration changes:


AdminConfig.save()
__ 9. Use the AdminTask administrative object to get information about the node and
server.
Information
The AdminTask object is used to run administrative commands. Administrative commands
are discovered dynamically when you start wsadmin.

__ a. At the wsadmin command prompt, enter the following commands to gather


information about the node and server:
nodes=AdminTask.listNodes()
nodes is a variable name.
listNodes is an AdminTask command that shows all of the nodes
in the cell.
print AdminTask.listServerTypes(nodes)
listServerTypes is an AdminTask command that lists server
types for the value of nodes
print AdminTask.listServers()
listServers is an AdminTask command that lists the servers.
10-20 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

1+1
=2

Example

wsadmin>nodes=AdminTask.listNodes()
wsadmin>print AdminTask.listServerTypes(nodes)
APPLICATION_SERVER
GENERIC_SERVER
WEB_SERVER
wsadmin>print AdminTask.listServers()
server1(cells/was8host01Node01Cell/nodes/was8host01Node01/servers/s
erver1|server.xml)

__ 10. Use various commands to get information for the configuration and server.
__ a. At the wsadmin command prompt, enter the following commands:
cell=AdminConfig.list("Cell")
print cell
cell is a variable name.
list is an AdminConfig command that shows the cell.
cellname=AdminConfig.showAttribute(cell,"name")
print cellname
cellname is a variable name.
showAttribute is an AdminConfig command that shows all of the
attributes of the cell.
nodes=AdminConfig.list("Node",cell)
print nodes
nodes is a variable name.
list is an AdminConfig command that shows all of the nodes in
the cell.
nodename=AdminConfig.showAttribute(nodes,"name")
print nodename
nodename is a variable name.
showAttribute is an AdminConfig command that shows all of the
attributes of the nodes in the cell.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-21

Student Exercises

print AdminConfig.showall(AdminConfig.list("Node"))
node is a variable name.
showall is an AdminConfig command that shows all of the
attributes of the specified configuration object.
server=AdminConfig.list("Server")
print server
server is a variable name.
list is an AdminConfig command that shows the servers in the
cell.
AdminTask.showServerInfo(server)
showServerInfo is an AdminTask command that shows the
information about the server.

10-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

1+1
=2

Example

wsadmin>cell=AdminConfig.list("Cell")
wsadmin>print cell
was8host01Node01Cell(cells/was8host01Node01Cell|cell.xml#Cell_1)
wsadmin>cellname=AdminConfig.showAttribute(cell,"name")
wsadmin>print cellname
was8host01Node01Cell
wsadmin>nodes=AdminConfig.list("Node",cell)
wsadmin>print nodes
was8host01Node01(cells/was8host01Node01Cell/nodes/was8host01Node01|
node.xml#Node_1)
wsadmin>nodename=AdminConfig.showAttribute(nodes,"name")
wsadmin>print nodename
was8host01Node01
wsadmin>print AdminConfig.showall(AdminConfig.list("Node"))
[discoveryProtocol TCP]
[hostName was8host01]
[maxFilePermissionForApps
.*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755]
[name was8host01Node01]
[properties []]
wsadmin>server=AdminConfig.list("Server")
wsadmin>print server
server1(cells/was8host01Node01Cell/nodes/was8host01Node01/servers/s
erver1|server.xml#Server_1183122130078)
wsadmin>AdminTask.showServerInfo(server)
'[ [cell was8host01Node01Cell] [serverType APPLICATION_SERVER]
[com.ibm.websphere.baseProductVersion 8.0.0.0] [node
was8host01Node01] [server server1] ]'

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-23

Student Exercises

Section 8: Work with applications


Use wsadmin to uninstall the ivtApp application. Stop the application that is going to be
uninstalled. After an application is stopped, you can uninstall it.
__ 1. Enter the following commands that stop the ivtApp application, and uninstall the
application.
__ a. This command provides the name of the application manager MBean for the
applications that the server is running.
appManager=AdminControl.queryNames("type=ApplicationManager,
cell="+cellname+",node="+nodename+",process=server1,*")
print appManager
Note
The variables cellname and nodename were created in the previous step.

10-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. This command gets the application detail and assigns it to a variable.


app=AdminControl.queryNames("type=Application,cell="+cellname+",
node="+nodename+",process=server1,J2EEName=ivtApp,*")
print app
__ c. This command gets the application name and assigns it to a variable.
appName=AdminControl.getAttribute(app,"name")
print appName
__ d. This command stops the ivtApp.
AdminControl.invoke(appManager,"stopApplication",appName)
__ e. This command uninstalls the ivtApp.
AdminApp.uninstall(appName)
Information
Look for the message that indicates the application ivtApp uninstalled successfully.

__ f.

Save the configuration to the repository. This command updates the repository
with the information about the uninstalled ivtApp application.
AdminConfig.save()

1+1
=2

Example

wsadmin>appManager=AdminControl.queryNames("type=ApplicationManager
,cell="+cellname+",node="+nodename+",process=server1,*")
wsadmin>print appManager
WebSphere:name=ApplicationManager,process=server1,platform=proxy,no
de=was8host01Node01,version=8.0.0.0,type=ApplicationManager,mbeanId
entifier=ApplicationManager,cell=was8host01Node01Cell,spec=1.0
wsadmin>app=AdminControl.queryNames("type=Application,cell="+cellna
me+",node="+nodename+",process=server1,J2EEName=ivtApp,*")
wsadmin>print app
WebSphere:name=ivtApp,process=server1,platform=dynamicproxy,node=wa
s8host01Node01,J2EEName=ivtApp,Server=server1,version=8.0.0.0,type=
Application,mbeanIdentifier=cells/was8host01Node01Cell/applications

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-25

Student Exercises

/ivtApp.ear/deployments/ivtApp/deployment.xml#ApplicationDeployment
_1183122155437,cell=was8host01Node01Cell,spec=1.0
wsadmin>appName=AdminControl.getAttribute(app,"name")
wsadmin>print appName
ivtApp
wsadmin>AdminControl.invoke(appManager,"stopApplication",appName)
''
wsadmin>AdminApp.uninstall(appName)
ADMA5017I: Uninstallation of ivtApp started.
ADMA5104I: The server index entry for
WebSphere:cell=was8host01Node01Cell,node=was8host01Node01 is
updated successfully.

Information
This sequence of commands is a typical example of what you would put in a
general-purpose Jython script. As you try the individual commands and debug them, you
can put all the commands in a file that is called uninstall.py and use it every time that
you need to uninstall an application. You modify the commands slightly to accept the name
of the application through a command-line parameter to the script.

__ 2. Verify that the application is uninstalled by looking at the administrative console.


__ a. Go to the administrative console. Log on with the user ID wasadmin and the
password web1sphere
__ b. Expand Applications and Application Types. Select WebSphere enterprise
applications. The ivtApp application is no longer listed.

10-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Reinstall the ivtApp application and verify that it is running. The ivtApp.ear file can
be found in the <was_root>/installableApps directory.
__ a. Copy the ivtApp.ear file from the <was_root>/installableApps directory to
the <profile_root>/profile1/installableApps directory.
__ b. Enter the following command to install and start the ivtApp application:
AdminApp.install("../installableApps/ivtApp.ear",["-appname
ivtApp"])
This command installs the ivtApp.ear application and names it ivtApp. The
-appname parameter is an installation option.
Information
Make sure that there is a space between -appname and ivtApp when you enter the
command. Look for the message to indicate that the application ivtApp installed
successfully.
You might see a message about Java EE security. If an EAR file contains a was.policy
file, its contents are shown when you install the application. This feature tells the
administrator that the policy file exists. It is a reminder to check this policy file. It is
important to check that the privileges provided in the policy file do not violate organizational
security policies.

__ c. This command saves the configuration to the repository.


AdminConfig.save()
__ d. This command starts the newly installed application.
AdminControl.invoke(appManager,"startApplication",appName)
__ 4. Verify that the application is installed by using the administrative console.
__ a. Go to the administrative console, if needed, or refresh the current administrative
console.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-27

Student Exercises

__ b. Expand Applications and Application Types. Select WebSphere enterprise


applications. The ivtApp application is listed and running. If the application is
not shown in the list, log out of the administrative console and log on again.

Information
You can also obtain the application status with the following wsadmin command:
print AdminControl.completeObjectName("type=Application,name=ivtApp,*")
If the ivtApp application is running, then an MBean is created and prints text; otherwise, the
command returns nothing.

__ c. Log out of the administrative console.

Section 9: Exploring the scripting libraries


Many scripting operations are simple and straightforward. However, other operations might
require a bit of investigation, reading, and trial and error, making it difficult for some users to
take full advantage of scripting in their environments. To help users overcome the
complexity of scripting, a new set of script libraries was introduced in WebSphere
Application Server V7.
In this part of the lab, you take an initial look at the available libraries and explore what they
provide.
__ 1. Open a File Manager and go to the following folder:
<was_root>/scriptLibraries

10-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. Open each of the subfolders and discover the names of the libraries:
Table 5: Scripting libraries
Directory location
application/V70
resources/J2C/V70
resources/JDBC/V70
resources/JMS/V70
resources/Provider/V70
security/V70
servers/V70
system/V70
utilities/V70
perfTuning/V70
osgi

Script library
AdminApplication
AdminBLA
AdminJ2C
AdminJDBC
AdminJMS
AdminResources
AdminAuthorizations
AdminClusterManagement
AdminServerManagement
AdminNodeGroupManagement
AdminNodeManagement
AdminLibHelp
AdminUtilities
ApplyPerfTuning
osgiApplicationConsole

Note
The libraries use the administrative objects that you looked at in the previous part of this
exercise. All of these libraries are loaded when wsadmin starts and are readily available
from the wsadmin command prompt, or to be used from your own scripts. Even though
source code is provided, it is not meant for the user to modify this code. Users of the
libraries call code in the libraries from their own scripts. You can copy parts of the library
code to other files and modify the copied code to improve it or better suit your needs.

__ 3. You can open the libraries in a text editor and look at the code. This code is
documented, and exceptions and other errors are handled smoothly by providing
meaningful error messages to the calling scripts. Use a text editor to open the
AdminJDBC script library:
<was_root>/scriptLibraries/resources/JDBC/V70/AdminJDBC.py

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-29

Student Exercises

In each library, after the usual copyright and disclaimer statement, there is a list of
procedure examples. The AdminJDBC library has 13 example functions:
Ex1: createJDBCProvider
Create a JDBC provider in your environment.
The script returns the configuration ID of the new JDBC provider.
Ex2: createJDBCProviderUsingTemplate
Use a template to create a JDBC provider.
Ex3: listJDBCProviderTemplates
Show a list of configuration IDs for the JDBC provider templates.
Ex4: createDataSource
Create a data source in your configuration.
The script returns the configuration ID of the new data source.
Ex5: createDataSourceUsingTemplate
Use a template to create a data source in your configuration.
The script returns the configuration ID of the new data source.
Ex6: listDataSourceTemplates
Show a list of configuration IDs for the data source templates.
Ex7: listJDBCProviders
Show a list of configuration IDs for the JDBC providers.
Ex8: listDataSources
Show a list of configuration IDs for the data sources.
Ex9: help
Show AdminJDBC script library online help.
Ex10: createJDBCProviderAtScope
Create a JDBC provider at scope.
Ex11: createJDBCProviderUsingTemplateAtScope
Use the template at scope to create a JDBC provider.
Ex12: createDataSourceAtScope
Create a data source at scope.
Ex13: createDataSourceUsingTemplateAtScope
Use the template at scope to create a data source.

10-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Go to Example 7: listJDBCProviders. These functions provide operations at a


higher level than the administrative objects provide. In addition, these scripts
provide a better abstraction to the script writer.

Examine the example functions that the library provides. Close the file when you are
done examining it.
__ 4. A similar listing of functions available in a library can be obtained with the help()
method. At the wsadmin prompt, enter:
print AdminJDBC.help()
__ 5. As with the administrative objects, you can get help on a specific method. Enter:
print AdminJDBC.help("listJDBCProviders")

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-31

Student Exercises

__ 6. Not only can you use these commands in your own scripts, but you can run the
commands directly. Enter:
print AdminJDBC.listJDBCProviders()
As with any new library system, it takes a while to become familiar and comfortable
with the functions available. By combining these library functions with your own
scripting logic in your Jython scripts, you can write scripts to configure your
application servers.

Section 10:Using IBM Assembly and Deploy Tools to code, test, and
debug Jython scripts (demonstration only)
PROCEED TO SECTION 14:
This section uses the IBM Assembly and Deploy Tools for WebSphere Administration,
which is not available on AIX. It is therefore not possible to go through these steps on your
lab workstation. Instead, a demonstration is available at the following URL:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the wsadmin demonstration. You can follow along with the
following instructions.

The following section was performed in a demonstration:

You are not able to run this section in your lab environment. Watch the
demonstration instead. These steps are presented for reference only.

REFERENCE ONLY:
Writing and debugging scripts can be made much easier when using an effective integrated
development environment (IDE). The IBM Assembly and Deploy Tools is enhanced with
features designed to provide a rich environment for development and testing of Jython
scripts.
In this section of the lab, you write a simple script to set the value of one of many
WebSphere environment variables. In this example, you set the variable that defines the
path to the DB2 Universal JDBC driver.
__ 1. Start IBM Assembly and Deploy Tools by clicking Start > Programs > IBM
Software Delivery Platform > IBM Assembly and Deploy Tools for WebSphere
Administration 8.0 > IBM Assembly and Deploy Tools for WebSphere
Administration.

10-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. The Workspace Launcher window opens. The workspace field identifies the
directory that your workspace uses. Scripts and other application files are saved in
the workspace. It is good for you to open the same workspace as the
PlantsByWebSphere application assembly exercise used.
Make sure that the workspace is: C:\software\Assemble\PlantsByWebSphere
If the folder does not exist, create it. Click OK.

Information
You can use any workspace. Some organizations have a workspace that is dedicated to
holding scripts.

__ 3. After the tool opens, switch to the Java EE perspective if it is not open.
Note
To get to the Java EE perspective, click Window > Open Perspective > Other. Select
Java EE (default) and click OK.

__ 4. Define the runtime environment.


__ a. On the bottom pane of the Java EE perspective, click the Servers tab.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-33

Student Exercises

__ b. If a server is already defined, proceed to the next step (creating a folder to


contain your scripts).

__ c. If this section is empty, proceed by using a right-click in the empty Servers view
to show the menu.

__ d. Select New > Server.


__ e. On the New Server pane, verify that the following fields are populated with these
values:
- Server host name: localhost
- Select the server type: WebSphere Application Server v8.0
- Server name: WebSphere Application Server v8.0 at localhost

10-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Click Next.

__ g. Click Next.
__ h. On the next pane, make sure that the fields are populated with the following
values:
- Name: WebSphere Application Server v8.0
- Installation directory: <was_root>
__ i.

Click Next.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-35

Student Exercises

__ j.

On the WebSphere Application Server Settings pane, accept the defaults:


- WebSphere profile name: profile1
- The following options are selected:
Automatically determine connection settings
Security is enabled on this server
- User ID: wasadmin
- Password: web1sphere
- WebSphere server name: server1

__ k. Click Finish.

10-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 5. Create a folder to contain your scripts, called Scripts.


__ a. From the main menu, click File > New > Other.
__ b. From the list of available project types, expand the Jython folder and select
Jython Project. Click Next.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-37

Student Exercises

__ c. Enter Scripts for the Project name and click Finish.

__ 6. Create a Jython script file under the Scripts folder.


__ a. On the left side, in the explorer view, right-click the Scripts folder to open the
menu. Click New > Other.
__ b. From the list of available project types, select Jython > Jython Script File. Click
Next.

10-38 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Enter setWASEnvVariable.py for the file name. Click Finish.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-39

Student Exercises

__ d. The file opens in the Jython source editor on the upper right view of the Java EE
perspective.
You also see the file in the workspace structure under the Scripts folder. If the file
is not visible, select the Scripts folder and right-click to open the menu. Click
Refresh. The file is seen in the list. Now you are ready to write the script.

Section 11:Creating the script (demonstration only)


PROCEED TO SECTION 14:
This section uses the IBM Assembly and Deploy Tools for WebSphere Administration,
which is not available on AIX. It is therefore not possible to go through these steps on your
lab workstation. Instead, a demonstration is available at the following URL:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the wsadmin demonstration. You can follow along with the
following instructions.

The following section was performed in a demonstration:

You are not able to run this section in your lab environment. Watch the
demonstration instead. These steps are presented for reference only.

REFERENCE ONLY:
The application server uses many of its own environment variables to consolidate
information, such as paths, in one place. After the environment variable is set, it is used in
many places instead of entering the information that is contained in the variable many
times. This technique reduces maintenance because if the information held in the variable
ever changes, it needs to be changed in only one place. All the users of that information get
it by referencing the environment variable and not the location directly.
10-40 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

One variable is used when accessing DB2 database drivers. The server needs to know
where to find the drivers so that it can add this information to its class path.
This script sets the DB2UNIVERSAL_JDBC_DRIVER_PATH environment variable, but it can be
used to change any variable.
__ 1. On the Jython editor view, enter the following code, which makes up the main of
the script.
Ask the AdminControl object for the node name with the getNode() method. When
typing this line of code in the editor, stop typing after entering:
nodeName = Admin

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-41

Student Exercises

Information
If you are not familiar with the term main, it is a method, or entry point, in a program that
starts the process. Procedural languages are started from first line of code encountered. In
C, C++, and Java there is a method actually called main which is run after the program is
loaded. In Jython, the first line run is not necessarily the first line of the program or a
method called main. Python starts at the first unindented line that is not designated as a
subroutine with the def keyword. Other languages use other conventions.

__ 2. Press Ctrl+Space; this key combination calls command completion. From the list,
double-click to select AdminControl.

10-42 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Type a period and press Ctrl+Space. This time all the methods for the AdminControl
object are shown on the list.
Continue typing and see how the list narrows as you enter characters. Type get
and you see just the getter methods. Type an N, and select getNode from the list.

You now have the complete line in the editor:


nodeName = AdminControl.getNode()
__ 4. Enter the rest of the code with help from the command completion. Experiment to
see when it works and when it does not. Make sure to use the forward slash as you
enter the directory path. If you do not want to type all the code, you can copy it from
\usr\software\wsadmin\setWASEnvVariable.py
varName = "DB2UNIVERSAL_JDBC_DRIVER_PATH"
newVarValue = "C:\Program Files\IBMSQLLIB\java"
lf=java.lang.System.getProperty("line.separator")
changeEnvValue(varName, newVarValue)
print ("Saving configuration")
AdminConfig.save()
__ 5. Note the line of code that is shown here:
changeEnvValue(envVarName, envVarValue)
This code represents a subroutine call to the method changeEnvValue().
In Jython, subroutines must be listed in the program before the code that calls them.
This requirement is a Jython interpreter restriction. Write the method now, starting at
the top of the file before the code you wrote in the previous step:

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-43

Student Exercises

Important
Be careful when entering the code to maintain the indentation shown. Indentation (leading
white space) determines blocks of code in Jython. You can use spaces or tabs to achieve
the level of indentation that you want.
Enter lines, which are shown split, in one single line with the editor.
If you do not want to type all the code, you can copy it from:
\usr\software\wsadmin\setWASEnvVariable.py

Line 1: def changeEnvValue(envVarName, envVarValue):


Line 2:

print("Setting variable " + varName + " on node " +


nodeName + ", to " + newVarValue)

Line 3:

nodeId = AdminConfig.getid("/Node:"+nodeName+"/")

Line 4:

varSubstitutions =
AdminConfig.list("VariableSubstitutionEntry",nodeId)
.split(lf)

Line 5:

for varSubst in varSubstitutions:

Line 6:

curVarName =
AdminConfig.showAttribute(varSubst,
"symbolicName")
if curVarName == envVarName:

Line 7:

print AdminConfig.showall(varSubst, "value")

Line 8:

AdminConfig.modify(varSubst,[["value",
newVarValue]])

Line 9:

break

Even though the code seems complex, with a little explanation it becomes clearer as
to how it sets the environment variable:
The subroutine is called from the main code, passing it two parameters: the
name of the variable to change and the new value of the variable.

10-44 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The first line prints an information message that indicates the variable name and
the new value for the environment variable. It also prints the name of the node
where the variable is changed.
The next line gets the node ID and uses the node name as a parameter to the
AdminConfig.getid() method.
The next line does two operations. First, it gets a list of all variable substitution
entries. These entries are not returned in a true list that can be manipulated, but
instead are returned in a long string that contains all the entries, with a line feed
character between each entry. The returned string must be converted into a true
list object. This action splits the string with the line feed character as the
delimiter. The line feed character is obtained at run time since it changes
between operating systems. This action was done in the main of the script.
Now that you have a list, you can iterate through the list with a for loop. In the
loop, each value in the list is assigned to the varSubst variable.
The first line inside the loop uses the showAttribute() method of
AdminConfig to retrieve the actual name of the environment variable, which is
printed on the next line.
Changing the value is accomplished by using the modify() method of
AdminConfig.
If the variable was found and changed, the loop breaks on the keyword break.
If the variable was not found, in this iteration the loop continues until all the
environment variable names are looked up.
__ 6. Save the file by pressing Ctrl+S.
Information
To get the line numbers that are shown on the left of the window from the menu, click
Window > Preferences > General > Editors > Text Editors. Check the box in front of
Show line numbers and click Apply. Click OK.

__ 7. Run the setWASEnvVariable script.


__ a. Make sure that the server1 instance is running.
__ b. Right-click on the script name and select Run As > Administrative Script from
the menu.
__ 8. The first time that you attempt to run the script, you must provide some configuration
parameters on the Edit configuration and launch pane.
__ a. From the Scripting runtime environment menu, select WebSphere
Application Server v8.0.
Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-45

Student Exercises

__ b. From the Profile name menu, select profile1.


__ c. Under Security, select the As defined in soap.client.props or
sas.client.props file option. You set the user ID and password in the properties
file earlier in this exercise (if not, choose Specify and enter wasadmin and
web1sphere as the user ID and password).

__ d. Click Apply.
__ e. Feel free to explore the other tabs of the pane to see what is available. For
example, you can pass a command-line parameter under the Arguments tab.
__ f.

Click Run. After this initial setup, you can click Run from the toolbar. The tool
remembers these values.
The tool attempts to run the script in wsadmin. Any errors or output is on the

10-46 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

Console view on the lower right pane of perspective. The Console view is
opened automatically as required.

EXempty

__ g. Make sure the script runs without any errors. Initially there are numerous
packaging messages that are seen in red. They can be ignored.
Note
There are times when the console seems to disappear, and a different console is shown.
This action happens because there are multiple consoles that are viewable. To see the list
and select the console for the script, select the Display Selected Console menu, and
choose setWASEnvVariable.py.

You see:
WASX7209I: Connected to process "server1" on node was8host01Node01 using
SOAP connector; The type of process is: UnManagedProcess
Setting variable DB2UNIVERAL_JDBC_DRIVER_PATH on node was8host01Node01,
to C:\Program Files\IBM\SQLLIB\java
[value ${LOG_ROOT}/server7]
Saving configuration

Section 12:Using the Jython debugger (demonstration only)


PROCEED TO SECTION 14:
This section uses the IBM Assembly and Deploy Tools for WebSphere Administration,
which is not available on AIX. It is therefore not possible to go through these steps on your
lab workstation. Instead, a demonstration is available at the following URL:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the wsadmin demonstration. You can follow along with the
following instructions.
Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-47

Student Exercises

The following section was performed in a demonstration:

You are not able to run this section in your lab environment. Watch the
demonstration instead. These steps are presented for reference only.

REFERENCE ONLY:
Sometimes logic errors prevent your script from producing the expected results. In those
cases, it is useful to run the script with the Jython source debugger. Using the debugger,
you are able to set breakpoints, examine variable values, cycle through the code
step-by-step and, in most cases, figure out where the problem is.
Sometimes it is useful to run a script through the debugger to figure out how it works. This
practice is useful when you are given a script that someone else wrote and you need to
maintain it.
A good way to start is to place a breakpoint at the first executable line of the script. The
marker bar is the dark vertical bar located along the left side margin of the Jython editor
view.

__ 1. From the Jython editor, set a breakpoint on the line that contains the code:
nodeName = AdminControl.getNode()

10-48 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Locate the line in the script. Place the mouse pointer so that it is on top of the marker
bar and aligned with the line of code where you want to apply the breakpoint.
Right-click, and select Toggle Breakpoint (you can also double-click).
Information
To turn on line numbers, right-click in the vertical bar to the left of the code and select Show
Line Numbers from the menu.

__ 2. Select the setWASEnvVariable script on the Enterprise Explorer view. Right-click


to open the menu. From the menu, click Debug As > Administrative Script.
__ 3. Switch to the Debug perspective. The script is started and then suspended after the
breakpoint is reached.

Examine the Debug perspective:


There are five panes; the default views are: Debug, Variables, Source, Outline,
and Console. There are other views accessible through tabs on the panes.
The toolbar on the Debug view controls execution of the script and allows you to
Stop (Terminate), Run to the next breakpoint, Step into subroutine, Step over
subroutine, Return from subroutine. These controls give total control over the
execution of the script. The function keys F5F8 are assigned these same
functions.
Below the toolbar, you see the execution stack. It shows the calling sequence
that ran.
The Variables view allows you to examine the value of the variables that are in
the scope of the breakpoint; that is, global variables and variables local to the
subroutine you are in. At the moment, you cannot change the value of the shown
variable.
Sharing the pane of the Variables view is the Breakpoints view. There you can
control the various breakpoints of the script, enabling, and disabling as
necessary.
Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-49

Student Exercises

The Source view shows the script. From the menu on this view, you have access
to a useful function: Run to Line. You can place the cursor anywhere on the
source and click Run to Line, and the debugger runs code to that line. It
effectively is a temporary breakpoint.
The Outline view shows the methods and loops in the script, allowing you to
quickly find and jump to areas of interest.
The Console view shows errors and other messages from the script and server.
Feel free to experiment in the different views and discover the details of what is
available.
__ 4. Press the F6 key, or click the corresponding button on the Debug view toolbar to
step over the statement where the debugger is stopped. This advances execution
one statement at a time.
__ 5. Watch the Variables view and look for the newly assigned variable and its value.
__ 6. Step three more lines, watching the Variables view.

Note how the type and value of the selected variable are shown, in detail, at the
bottom of the view.
__ 7. The next line is the call to the subroutine:
changeEnvValue(varName, newVarValue)
__ 8. This time press F5, or click the corresponding button on the Debug view toolbar to
step into the subroutine.
__ 9. Continue to press F6 to run through the subroutine and its loop. Observe when a
matching variable is found from the list of environment variables, how the value is
changed and how the loop ends when the break statement is run.
__ 10. After the subroutine ends, control is returned to the main part of the script where a
message is printed and the configuration is saved.
__ 11. Advance one more step, and the thread terminates. If you must run through the
program again, you can relaunch from a terminated thread. From the Debug view,
select the terminated thread and right-click to open the menu. Select Relaunch.
You now have the basic skills for writing, testing, and debugging Jython scripts. There is
much more to it than this short exercise. Probably the most complex task ahead is to
10-50 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

become familiar with what the administrative objects can do. There are many examples
and excellent topics in the information center and on the WebSphere Developer website.
For a good resource to learn about the methods available in the information center, see the
pages named:
Using the AdminConfig object for scripted administration
Commands for the AdminConfig object
These pages exist for all other administrative objects; substitute their names for
AdminConfig and search the information center.

Section 13:Using console command assist (demonstration only)


PROCEED TO SECTION 14:
This section uses the IBM Assembly and Deploy Tools for WebSphere Administration,
which is not available on AIX. It is therefore not possible to go through these steps on your
lab workstation. Instead, a demonstration is available at the following URL:
https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/
WebSphere%20Education%20Wiki/page/Course%20Demonstrations
Use your local browser to run the wsadmin demonstration. You can follow along with the
following instructions.

The following section was performed in a demonstration:

You are not able to run this section in your lab environment. Watch the
demonstration instead. These steps are presented for reference only.

REFERENCE ONLY:
Sometimes it is challenging to figure out what wsadmin commands are needed to use. One
useful tool is the console itself. The administrative console, in some cases, can show the
command that it uses to effect certain configuration changes. You can then copy these
commands and use them in your scripts.
Information
Not all configuration commands are shown in this version. With each new release, the
number of administrative console actions that show these commands increases.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-51

Student Exercises

To further simplify this process, if the IBM Assembly and Deploy Tools is running, it can
communicate directly with the administrative console, receive the wsadmin commands,
and make them available for inserting into your scripts.
In this exercise, you set up the administrative console and IBM Assembly and Deploy Tools
to communicate with each other.
__ 1. Make sure that the server is running and go to the administrative console.
__ 2. From the main menu on the left, expand System administration and select
Console Preferences.
__ 3. On the Console preferences window, select both:
Enable command assistance notifications
Log command assistance commands

__ 4. Click Apply.
__ 5. IBM Assembly and Deploy Tools is probably still open from the previous section. If it
is not, open it using the same workspace that you previously used.
__ a. Make sure that you are on the Java EE perspective.
__ b. From the main menu, select Window > Show view > Other.

10-52 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Expand Server and select WebSphere Administration Command.

__ d. Click OK.
__ e. In the WebSphere Administration Command view, click the Select Server to
Monitor drop-down arrow and click WebSphere Application Server v8.0 at
localhost.

Information
If the server name is not available on the list, switch to the Servers view and make sure
that the server is running.

__ 6. On the administrative console, expand Applications and Application Types. Click


WebSphere enterprise applications.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-53

Student Exercises

__ 7. On the far right, under Help, click View administrative scripting command for
last action.

This action opens a new browser window where the last few administrative
commands can be seen and also where you can control the behavior of command
assistance.
__ 8. Expand Preferences. If not already selected, check both command assistance
preferences:
Enable command assistance notifications
Log command assistance commands

Click Apply.
__ 9. Return to the IBM Assembly and Deploy Tools window and check for the results.
__ a. In the IBM Assembly and Deploy Tools window, look at the bottom view and
select the WebSphere Administration Command tab.

10-54 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Notice that there is now an entry that shows the AdminApp.list() command.

__ 10. From the administrative console, complete the following sequence of commands. As
you do each command, switch between the Administrative Scripting Commands
browser page and the IBM Assembly and Deploy Tools WebSphere Administration
Command view to see which commands show up in the windows:

From the navigation menu, expand Resources and JDBC.


Click JDBC providers.
Click DB2 Universal JDBC Driver Provider (XA).
From the navigation menu, click Data sources.
Click Plants.
Change the description of the data source to: Used by Plants application
Click OK.
Save the change.

__ 11. View the IBM Assembly and Deploy Tools WebSphere Administration Command
view.

Select a command in the list and right-click to open the menu. There are three
options available:

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-55

Student Exercises

- Insert
Insert that command at the cursor position of a Jython script open in the
Jython editor.
- wsadmin Command Help
Get help on the command.
- Remove
Remove the command from the list.
When requesting help, a web browser view opens in IBM Assembly and Deploy
Tools and shows the information center page for that command or administrative
object.
__ 12. Feel free to experiment with the console, inserting commands into a Jython script.
__ 13. Exit IBM Assembly and Deploy Tools.

Section 14:Using properties file-based configuration


WebSphere Application Server V7 provides a new set of utilities for working with server
configuration with properties files. You can create a properties file of human readable key
value pairs that are based on your environment. Modify that properties file. Finally, apply
the updated properties to a server. The objective of this portion of the lab is to provide you
with a basic understanding of this technique for administering your environment.
You extract the EndPoint resource for server1 that contains the list of port name-value
pairs.
__ 1. Using wsadmin, extract the properties for the server1.
__ a. Go to the bin directory of the profile1: <was_root>/profiles/profile1/bin
__ b. Start wsadmin.
./wsadmin.sh -lang jython
__ c. Properties files can be extracted for various configuration attributes at different
levels: a cell, a node, a server, one container in that server, and others. If you
know what type of properties you want to modify, you can extract a properties file
for your server with an object type filter. In this case, you are going to extract the
resource type EndPoint for server1 into a properties file called endpoint.props.
Enter the command:
AdminTask.extractConfigProperties("-propertiesFileName
endpoint.props -configData Server=server1 -filterMechanism
SELECTED_SUBTYPES -selectedSubTypes [EndPoint]")

10-56 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. The properties file is in the current directory, in this case,


<profile_root>/profile1/bin. Open the endpoint.props file with a text
editor (such as dtpad). Look for the entry SIB_MQ_ENDPOINT_ADDRESS. Note the
port number ___________.
__ e. Open the administrative console. From the navigation tree, expand Servers and
Server Types. Click WebSphere application servers.
__ f.

From the server list, click server1 to open the configuration work area. Under
Communications, click Ports. Look for the entry: SIB_MQ_ENDPOINT_ADDRESS
Note the port number _____________.

__ g. Compare the port values from the properties file with the ports listed on the
administrative console. You are going to change the port value for
SIB_MQ_ENDPOINT_ADDRESS. Click server1 from the breadcrumb trail and return
to the configuration tab for server1. Leave the administrative console open.
__ 2. Modify the endpoint.props file.
__ a. Locate the port and value pair for SIB_MQ_ENDPOINT_ADDRESS. Change the port
value, currently 5558, to 15558
__ b. Save the updated file, but do not close it.
__ c. Validate the updated properties file.
__ d. From the wsadmin command line, enter:
AdminTask.validateConfigProperties("-propertiesFileName
endpoint.props")
__ e. If the file validation is successful, true is shown.
__ 3. Apply the updated properties file to the configuration.
__ a. From the wsadmin command line, enter:
AdminTask.applyConfigProperties("-propertiesFileName
endpoint.props")
__ b. If the configuration is updated successfully, two quotation marks are shown.
__ 4. Save the changes.
__ a. From the wsadmin command line, enter:
AdminConfig.save()
__ 5. From the administrative console, click Ports. Notice that the port value for
SIB_MQ_ENDPOINT_ADDRESS is now 15558, reflecting the change that you made in
the properties file.

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-57

Student Exercises

__ 6. Change the port value for SIB_MQ_ENDPOINT_ADDRESS back to 5558.


__ a. Modify the properties file and change the port value for
SIB_MQ_ENDPOINT_ADDRESS to 5558. Save and close the properties file.
__ b. Validate the updated properties file.
AdminTask.validateConfigProperties("-propertiesFileName
endpoint.props")
__ c. Apply the updated properties file to the configuration.
AdminTask.applyConfigProperties("-propertiesFileName
endpoint.props")
__ d. Save the changes.
AdminConfig.save()
__ e. Verify the change by checking the port values from the administrative console.
SIB_MQ_ENDPOINT_ADDRESS now has a port value of 5558.
__ f.

Log out of the administrative console.

__ g. Exit wsadmin.

Section 15:Using SWING with Jython (optional)


When creating wsadmin scripts, it might be useful to add a graphical interface. Doing so is
not trivial, but it is possible. Look at the following example if you are interested in examining
a script that uses the Java SWING libraries from within Jython to create a graphical user
interface.
__ 1. Using wsadmin, run the GUIconsoleTimeout.py script.
__ a. From the command line, from the server1 bin directory, run the following
command:
./wsadmin.sh -f /usr/software/wsadmin/GUIconsoleTimeout.py
This script is similar to the consoleTimeout.py script, which is used in an
earlier exercise, except that it adds a graphic interface. Functionally, it allows you

10-58 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

to set the console timeout value for an application server or deployment


manager. However, in this case, it performs this function graphically.

Note
The interface does the same function multiple times. Each box uses a different type of
graphical widget to set the console timeout value. Feel free to explore the different options.

__ b. If you are interested, open the script file with an editor and investigate how the
graphical interface is coded.
__ c. Press Enter in the command window to end the script.

End of exercise

Copyright IBM Corp. 2012

Exercise 10. Using wsadmin


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

10-59

Student Exercises

Exercise review and wrap-up


In this lab, you learned to manipulate wsadmin objects from the command line with the
Jython languages.
You experimented with IBM Assembly and Deploy Tools to create and step through a
wsadmin script that is written in Jython.
Finally, you set up the WebSphere administrative console to communicate with IBM
Assembly and Deploy Tools to pass any administrative commands that the administrative
console uses back to IBM Assembly and Deploy Tools.

10-60 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 11.Creating a federated cell


What this exercise is about
In this lab exercise, you experience the process of creating a
WebSphere cell through the generation of a deployment manager
profile and by the federation of application server profiles.

What you should be able to do


At the end of the lab, you should be able to:
Create a deployment manager profile
Back up the deployment manager configuration
Use the deployment manager administrative console
Federate a node into the deployment manager cell
Create an additional custom profile
Create an unmanaged web server node
Use the administrative console to start and stop a web server
Map an application to a web server

Introduction
This exercise goes through the process of creating and federating a
cell. The initial steps include creating two more profiles, the first of
which is a deployment manager profile. After the deployment manager
profile is created, profile1 is federated into the cell. Then, a custom
profile is created and federated at the same time.
This exercise demonstrates the process of creating a cell and
prepares the lab environment for other important steps, including
creating a node to manage a remote web server, and clustering an
application server.

Requirements
To do this exercise, you must have the application server named server1 started.
DefaultApplication and PlantsByWebSphere Application must be installed and running on
server1.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-1

Student Exercises

Exercise instructions
During this exercise, you change your stand-alone application server environment to a cell
environment that contains two federated nodes and an unmanaged node for a web server.
It is important as you progress through the exercise that you have a good understanding of
what you are creating.
As you begin the exercise, you have one stand-alone application server, named server1,
contained in a node, named was8host01Node01.
When you complete the exercise, you have a cell, named was8host01Cell01, containing
the following nodes:
Deployment manager node, named was8host01CellManager01
A federated node, named was8host01Node01, containing a node agent and an
application server, named server1
A federated node, named was8host01Node01, containing only a node agent
An unmanaged node, named ihsnode, containing an IBM HTTP Server
administrative process and a web server, named webserver1

Section 1: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Create a deployment manager profile by using the Profile


Management Tool
During this section of the exercise, you create a deployment management profile that
defines a cell, named was8host01Cell01, containing a deployment manager node, named
was8host01CellManager01. The existing application server, server1, continues to be a
stand-alone server that is contained in the node was8host01Node01.

11-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The Profile Management Tool is part of the WebSphere Customization Toolbox, and is a
GUI tool for creating WebSphere profiles. Using the profile wizard, you can create an
application server profile, deployment manager profile, custom profile, or cell profile (which
creates both a deployment manager and managed node). First, create a deployment
manager profile.
__ 1. Start the Profile Management Tool. This wizard is the same one you used earlier to
create profile1.
__ a. The command to run the Profile Management Tool is:
/usr/IBM/WebSphere/AppServer/bin/ProfileManagement/pmt.sh
Information
It is also possible to create profiles from the command line by using the manageprofiles
-create script that is in the <was_root>/bin directory.
./manageprofiles.sh -create -profileName profile2
-profilePath "<profile_root>/profile2"
-templatePath "<was_root>/profileTemplates/default"
-nodeName was8host01Node02 -cellName was8host01Cell02
-hostName was71host01

__ b. The Profile Management Tool opens. Click Create.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-3

Student Exercises

__ 2. Create a deployment manager profile called Dmgr.


Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
capture, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

__ a. From the Environment Selection panel, select Management and click Next.

11-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. From the Server Type Selection panel, select Deployment manager. Click Next.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-5

Student Exercises

__ c. Select Advanced profile creation to specify your own configuration values


during profile creation. Click Next.

__ d. Ensure that the Deploy the administrative console (recommended) check


box is selected. The administrative console is needed for this class. Click Next.

__ e. From the Profile Name and Location panel, provide the following name and
location information:
- Profile name: Dmgr
- Profile directory: /usr/IBM/WebSphere/AppServer/profiles/Dmgr
- Do not select the Make this profile the default option.

11-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Click Next.

Information
The default profile is the first profile created. It is also possible to change which profile is
designated as the default with the Profile Management Tool or the manageprofiles
command.
When running commands from the <was_root>/bin directory, commands are run against
the runtime environment that the default profile defines. It is also possible to specify a
particular profile by using the -profileName argument.

__ g. The Node, Host, and Cell Names panel allows you to set the node name, cell
name, and host name. Enter was8host01CellManager01 for the Node name,

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-7

Student Exercises

was8host01 for the Host name, and was8hostCell01 for the Cell name. Click
Next.

__ h. From the Administrative Security panel, you choose whether to enable


administrative security. Verify that the Enable administrative security option
check box is selected. Enter the following information:
- User name: wasadmin
- Password: web1sphere

11-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ i.

Click Next.

__ j.

From the Security Certificate (part 1) panel, accept the default selections:
- Create a default personal certificate
- Create a root signing certificate

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-9

Student Exercises

__ k. Click Next.

Note
The Issued to distinguished name and the Issued by distinguished name on the
Security Certificate (Part 2) panel have a common name (CN) that can take different forms,
depending on your environment:
IP address (such as 192.168.192.128)
Fully qualified domain name (FQDN) (such as was8host01.localdomain or
was8host01.ibm.com)

11-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ l.

Accept the Security Certificate (part 2) panel defaults. Click Next.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-11

Student Exercises

__ m. The Port Values Assignment panel allows you to set any ports for the
deployment manager to prevent conflicts with other profiles. Accept the default
port values (which can be different from the example shown).
Information
Note the administrative console port for the deployment manager. This port is used later in
this exercise.
Ordinarily, the administrative console port would use port 9060. However, since a
stand-alone application server is installed, the Profile Management Tool avoids reuse of
any ports. It uses port 9061 instead.

11-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ n. Click Next.

Note
Depending on which UNIX operating system is being used, there might be a window
offering to run the deployment manager as a service. In that case, do not allow the process
to run as a service. Click Next.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-13

Student Exercises

__ o. The Profile Creation Summary panel shows all of the choices you made on
previous panels. Verify the summary information with what you entered
previously. Click Create.

11-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Creation of the profile usually takes several minutes to complete.

__ p. The profile creation completes and the Dmgr profile is created. Notice that the
Launch the First steps console check box is selected. Click Finish and the
First steps console launches.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-15

Student Exercises

__ 3. The First steps console is associated with the deployment manager profile, Dmgr,
that was created. Each profile has its own First steps console. Click Installation
verification from the console.

11-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ a. The installation verification test tool runs and shows messages to indicate
verification status. Use the scroll bar to scroll to the bottom to see all the
messages. The following messages are shown if the installation verification was
successful:
IVTL00701: The Installation Verification Tool verification
succeeded.
IVTL00801: The installation verification is complete.
Information
It is possible that there might be several warnings shown. These messages can be ignored.

__ b. Close the First steps output - Installation verification window.


__ c. Click Exit to close the First steps console.
__ d. Click File > Exit to close the Profile Management Tool.

Section 4: Back up the Dmgr profile configuration


Before continuing, it is a good practice to back up the configuration for the Dmgr profile that
was created.
__ 1. In a previous lab, the backupConfig command was used to create a backup. There
is another WebSphere tool that makes backups of a profile as well (other than
operating system-level backups). The backupConfig tool backs up only the
configuration directory of a profile. The command manageprofiles
-backupProfile backs up the configuration directory and other metadata.
Information
From the information center: -backupProfile
This attribute forms a file system backup of a profile folder and the profile metadata from
the profile registry file. Any servers that use the profile that you want to back up must first
be stopped before starting the manageprofiles command with the -backupProfile
option. The -backupProfile parameter must be used with the -backupFile and
-profileName parameters, for example:
./manageprofiles.sh -backupProfile -profileName <profile_name>
-backupFile <backupFile_name>

__ a. In a command-prompt window, navigate to the <profile_root>/Dmgr/bin


directory.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-17

Student Exercises

__ b. Verify the status of the deployment manager process by entering the following
command:
./serverStatus.sh -all
Specify the user ID wasadmin and password web1sphere in the dialog box
when you are prompted.

11-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Stop the deployment manager process if it is running by issuing the following


command:
./stopManager.sh
Specify the user ID wasadmin and password web1sphere in the dialog box
when prompted.
__ d. After the deployment manager stops, issue the following command to back up
the entire profile:
./manageprofiles.sh -backupProfile -profileName Dmgr -backupFile
/usr/software/backups/Dmgr_initial_backup.zip
Wait for the message:
INSTCONFSUCCESS: Success: The profile backup operation was
successful.
__ 2. Since profile1 is federated later, create a backup for it as well.
__ a. From the <profile_root>/profile1/bin directory, stop server1:
./stopServer.sh server1
__ b. Make sure to issue the manageprofiles command from the
<profile_root>/profile1/bin directory. After server1 stops, issue the
following command to back up the entire profile:
./manageprofiles.sh -backupProfile -profileName profile1
-backupFile /usr/software/backups/Profile1_prefederation.zip
Wait for the message:
INSTCONFSUCCESS: Success: The profile backup operation was
successful.
__ 3. Start server1.
__ a. From the <profile_root>/profile1/bin directory, issue the command:
./startServer.sh server1
__ 4. Start the deployment manager.
__ a. In a command-prompt window, navigate to <profile_root>/Dmgr/bin and run
the startManager command to start the deployment manager:
./startManager.sh

Section 5: Federate profile1 into the cell of the deployment manager


During this section of the exercise, you federate the application server node that is defined
by profile1 (named was8host01Node01), into the cell named was8host01Cell01, defined

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-19

Student Exercises

by the deployment manager profile. The federation process adds a node agent to the
application server node.
__ 1. Ensure that both the deployment manager and server1 are running.
__ 2. Open the administrative console for the deployment manager.
The port in this case is not the default port, but instead is port 9061. This difference
is because the system already has profile1, which is using port 9060, for its
administrative console port. The profile creation process therefore chose the next
available port (9061) for the Deployment Manager administrative console.
__ a. Open a web browser and specify the following address:
http://localhost:9061/ibm/console
__ b. If prompted, accept any certificates that are offered and dismiss any warnings.
__ c. Log in to the administrative console as user wasadmin with a password of
web1sphere
__ 3. Federate a node into the cell.
This process takes the existing application server within profile1 and federates it to
the deployment manager. This action means that it no longer is a stand-alone
application server, but instead is part of the newly created cell.
Information
In this lab environment, synchronizing clocks is not an issue since the cell is running on a
single computer. But, when federating distributed computers, it is necessary to make sure
that the clocks on all nodes are within 5 minutes of each other.
.

__ a. From the deployment manager administrative console navigation tree, expand


System administration. Click Nodes.

11-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click Add Node.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-21

Student Exercises

__ c. The Managed node option is selected as default. Keep this setting. A managed
node contains a WebSphere Application Server and a node agent. The
application server runs as part of the network deployment environment. Click
Next.

__ d. Specify your host name was8host01 for the host. Specify security user names
and passwords for both profile1 and the deployment manager. The user name
and password are wasadmin and web1sphere

11-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Select the options to Include applications and Include buses. Keep all
remaining defaults.

__ f.

Click OK.
Information

The port number is the JMX connector port of the node you want to federate to the cell.

The federation process can take several minutes to complete.


__ g. When the federation is complete, you see a completion message:
ADMU0003I: Node was8host01Node01 has been successfully federated.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-23

Student Exercises

__ 4. Verify the cell configuration.


__ a. Click System Administration > Nodes. Two nodes are listed: the deployment
manager (was8host01CellManager01), and the was8host01Node01 node that
was added.

__ b. Verify that the node agent on was8host01Node01 started. From System


administration, click Node agents. The status of the node agent is Started.

11-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 5. Start the application server and test the Snoop servlet.


__ a. From the navigation tree, click Servers > Server Types > WebSphere
application servers.
__ b. Select server1 and click Start. The status for server1 is started.
__ c. Verify the DefaultApplication is running. From the navigation tree, go to
Applications > Application Types > WebSphere enterprise applications.
Check the status for the DefaultApplication.
__ d. Open another browser window and enter the following address:
http://localhost:9080/snoop
__ e. Verify that the Snoop servlet works.

Section 6: Create a custom profile and federate it into the deployment


manager cell
During this section of the exercise you are going to create a custom profile, profile2, that
defines a node, named was8host01Node02. The custom profile is automatically federated
into the cell, was8host01Cell01.
A custom profile is useful because it does not create any application servers on the node; it
creates the configuration and the node agent only. This means that no server1 is created
on that node. This feature is helpful for expanding clusters.
__ 1. Start the Profile Management Tool.
__ a. The command to run the Profile Management Tool is:
<was_root>/bin/ProfileManagement/pmt.sh
__ 2. Create a custom profile named profile2, and federate it to the deployment
managers configuration.
__ a. Click Create from the Profiles list panel.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-25

Student Exercises

__ b. On the Environment Selection panel, click Custom profile. Click Next.

__ c. On the Profile Creation Options page, select Advanced profile creation to


specify your own configuration values during profile creation. Click Next.

11-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. For the profile name and location, enter profile2 and


/usr/IBM/WebSphere/AppServer/profiles/profile2
Click Next.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-27

Student Exercises

__ e. Enter was8host01Node02 for the Node name (notice that it has Node02 at the
end) and was8host01 for the Host name. Click Next.

Information
For these labs, use the short name for your host. Although it is acceptable to use another
form of the host name, it is important to be consistent. Since the short name was used in
the initial WebSphere installation lab, the short name is used here as well.

11-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

On the Federation panel, enter the following information:


-

Deployment manager host name: was8host01


User name: wasadmin
Password: web1sphere
Do not click the Federate this node later check box.

__ g. Click Next.

Information
By not selecting Federate this node later, the wizard process federates the node now.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-29

Student Exercises

__ h. Accept the defaults on the Security Certificate (Part 1) panel. Click Next.
__ i.

Accept the defaults on the Security Certificate (Part 2) panel. Click Next.

__ j.

Accept the default on the Port Values Assignment panel. Click Next.

__ k. On the Profile Creation Summary panel, click Create.


__ l.

After a couple of minutes, the profile creation is complete.

__ m. On the Profile Creation Complete panel, clear the Launch the First steps
console option. Do not use the First steps console for profile2. Click Finish to
exit the wizard.
__ n. Close the Profile Management Tool.

11-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. The node was8host01Node02 is automatically federated into the deployment


managers configuration. Verify these new configuration changes.
__ a. Using the deployment manager administrative console, list the nodes. From the
navigation tree, expand System administration. Click Nodes. The federated
node was8host01Node02 is listed. Updates sometimes require a console
relogin.

Information
Using a custom profile does not create a server instance. This feature is useful when
adding nodes to a cell. The intention of federating a new node into a cell is normally to
either add cluster members to the node or create servers named something other than
server1.
.

__ 4. Verify that both node agents started.


__ a. From the navigation tree, click Node agents.
__ b. If any of the node agents need to be started, use the command:
<profile_root>/profileX/bin/startNode.sh (where X is 1 or 2)

Section 7: Add the IBM HTTP Server to the cell


During this section of the exercise you add an unmanaged node, ihsnode, to the cell
was8host01Cell01. You also add a web server, webserver1, to the unmanaged node.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-31

Student Exercises

Information about the web server is communicated to the deployment manager through the
IBM HTTP Server administrative process.
Create a node and add the web server to the node. When adding a node, you can create
either a managed node or an unmanaged node. A managed node contains a WebSphere
Application Server and a node agent. An unmanaged node does not have a node agent
and is used for defining remote web servers in the topology.
__ 1. Create a new unmanaged node for the web server.
The web server definition uses this new node definition to define the host on which it
lives.
__ a. In the navigation tree, expand System administration and click Nodes.
__ b. Click Add Node.
__ c. In the Add Node window, select Unmanaged node and click Next.

__ d. In the Nodes window, enter configuration information for the node:


- Name: ihsnode
- Host Name: was8host01
- Platform Type: AIX

11-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click OK.

__ f.

Save the changes.

__ g. The node ihsnode is now shown in the list of nodes.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-33

Student Exercises

Section 8: Add the web server to the configuration


In this step, the web server definition is added to the ihsnode.
__ 1. Add the web server to the ihsnode configuration.
This action allows the web server to be managed from the administrative console.
__ a. From the navigation tree, go to Servers > Server Types > Web servers.
__ b. Click New to add a web server.
__ c. On Step 1 of creating a web server, enter the following information:
- Select ihsnode from the Select node list.
- For Server name, enter: webserver1
- Select IBM HTTP Server from the Type list.
Information
The web server name must match the name that was assigned during the IBM HTTP
Server installation. You can check the web server name by looking in
/usr/IBM/WebSphere/Plugins/config/
.

Click Next.

11-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. On Step 2, specify the web server template. Ensure that IBM HTTP Server is
selected and click Next.

__ e. On Step 3, specify the properties for the new web server. Enter the following
information in the fields as provided.
Table 6: Web server configuration details
Field Name
Value
Port
80
Web server Installation location
/usr/IBM/HTTPServer
Plug-in installation location
/usr/IBM/WebSphere/Plugins
Application mapping
All
Port
8008
User name
ihsadmin
Password
web1sphere
Confirm password
web1sphere
Warning
The plug-in installation location defaults to an incorrect value.
The default value is /usr/IBM/HTTPServer/Plugins, but the correct value is:
/usr/IBM/WebSphere/Plugins

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-35

Student Exercises

Important
Make sure that you modify the default value for the plug-in installation location to the
correct location.

__ f.

Click Next when complete.

__ g. On Step 4, the summary, click Finish.


__ 2. Save the changes.

11-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Stop and start the web server by using the administrative console.
__ a. Select webserver1 and click Stop. The web server status is now stopped.

Note
It is possible to check whether the web server processes are running with the following
command:
ps -ef | grep -i httpd
If the web server or IBM HTTP Server administrative process is not running, they can be
started with the following commands:
/usr/IBM/HTTPServer/bin/apachectl start
/usr/IBM/HTTPServer/bin/adminctl start

__ b. Start the web server before continuing. Select the web server and click Start.
__ c. To verify that the server started, open a web browser and connect to the IBM
HTTP Server welcome page. Specify the following address:
http://localhost

Section 9: Mapping modules to servers


Each module of an application is mapped to one or more target servers. The target server
can be an application server, a cluster of application servers, or a web server. Web servers
that are specified as targets have the routing information for the application that is
generated in their plug-in configuration files.
This mapping usually takes place during application deployment. But, since the
DefaultApplication was already deployed at the time this particular web server was added,
the DefaultApplication still needs to be mapped to your new web server. That, in fact, was
Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-37

Student Exercises

done for you during the last step of defining the web server properties when All was
selected for the Application mapping to the web server. That step mapped all installed
applications to the new web server.
This section of the lab verifies that the applications are correctly mapped to the new web
server.
__ 1. Using the deployment manager administrative console, verify the mapping of the
DefaultApplication modules to the web server.
__ a. From the navigation tree, expand Applications and Application Types.
__ b. Click WebSphere enterprise applications.
__ c. From the list of applications, click DefaultApplication.
__ d. Under Modules, click Manage Modules.

11-38 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Notice that the Default Web Application module maps to both the application
server server1 and the webserver01. This page can also be used to modify the
mappings manually if they do not exist.

__ f.

Click DefaultApplication from the breadcrumb trail to return to the configuration


window.

__ g. Under Detail Properties, click Target specific application status.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-39

Student Exercises

__ h. This view shows the mapping of a deployed object to servers.

Section 10:Working with the plug-in configuration file


The plug-in configuration file contains routing information for all applications that are
mapped to the web server. The plug-in configuration file must be regenerated and
propagated to the web server whenever changes are made to the WebSphere
configuration that affect how requests are routed from the web server to the application
server.
__ 1. Regenerate the plug-in configuration file.
This process generates a plug-in configuration file that is specific to the web server
that is defined within the cell. If multiple web servers are defined within the cell, you
can generate customized plug-in configuration files for each of those web servers.
__ a. From the administrative console navigation tree, expand Servers and Server
Types. Click Web servers.

11-40 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Select the web server. Click Generate Plug-in.

Information
This step is not necessary because the default behavior is to automatically generate a new
plug-in configuration file whenever an update is made. However, this step confirms that the
setup is working correctly.

__ c. Verify that the generation was successful by viewing the messages.

__ 2. View the plug-in configuration file, plugin-cfg.xml, from the administrative


console.
This plugin-cfg.xml file is specific to the web server. If you had multiple web
servers, it is possible for each plugin-cfg.xml file to be unique.
__ a. Click webserver1.
__ b. Under Additional Properties, click Plug-in properties.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-41

Student Exercises

__ c. Under Plug-in properties, click View to see the plugin-cfg.xml file.

__ d. The next window shows the plug-in configuration file. Verify that the element
<UriGroup Name="default_host_server1_was8host01Node01_Cluster_URIs">
includes the element
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid"
Name="/snoop/*/>
This element ensures that the plug-in recognizes URLs containing /snoop and that
they get forwarded to the application server.

__ e. Look through the list of URIs for the /PlantsByWebSphere entry.


11-42 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. After a plug-in configuration file is regenerated, it needs to be propagated to the web


server. You can propagate manually by copying the file from the application server to
the web server, or you can do it from the administrative console.
Information
The default is to automatically generate the plug-in configuration file and to propagate the
plug-in to the web server (if the propagation is configured). These settings can be viewed
by using the administrative console. From the navigation tree, expand Servers and Server
Types. Click Web servers and webserver01. Under Additional Properties, click Plug-in
properties.

__ a. From the navigation tree, expand Servers and Server Types. Click Web
servers. You can also go directly to the window by clicking Web servers from
the breadcrumb trail.
__ b. Select the web server and click Propagate Plug-in.

__ c. Verify that the propagation was successful by viewing the messages.

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-43

Student Exercises

Section 11:Test the plug-in configuration


By default, the web server plug-in module checks for a new configuration file every 60
seconds. You can wait for the plug-in to find the changes, or you can restart the web server
to pick up the changes immediately.
__ 1. Verify that the application server, server1, is running.
__ 2. Verify that the IBM HTTP Server is running.
__ 3. Access the Snoop servlet.
__ a. Open a web browser.
__ b. Specify the following address:
http://localhost:9080/snoop
By using the port 9080, you are bypassing the external IBM HTTP Server.

__ c. The details are visible in the Snoop servlet.


__ 4. Verify that the web server is forwarding requests to the application server.
__ a. Using a browser, specify the following address:
http://localhost/snoop

11-44 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

This request first goes to the web server.

__ b. The details are visible in the Snoop servlet.

End of exercise

Copyright IBM Corp. 2012

Exercise 11. Creating a federated cell


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

11-45

Student Exercises

Exercise review and wrap-up


In this lab exercise, you experience the process of creating a WebSphere cell through the
generation of a deployment manager profile, and then the federation of application server
profiles.

11-46 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 12.Clustering and workload management


What this exercise is about
This exercise covers the creation of a cluster. While creating the
cluster, two cluster members are added. After the cluster is created,
the PlantsByWebSphere application is configured to run in the cluster.
A replication domain is set up to use the memory-to-memory
replication mechanism, and the application is tested to ensure that
session failover works as expected. Testing is achieved by stopping
one of the two servers in the cluster and watching the requests fail
over to the remaining running server.

What you should be able to do


At the end of the lab, you should be able to:
Create a cluster and add cluster members
Map modules to clusters and web servers
Test load balancing and failover between two cluster members
Configure a data replication domain for session management

Introduction
Up to this point you worked with WebSphere Application Server
Version 8 in a single server environment. In this lab, after federating,
you work with a cell and use the deployment manager. You create a
cluster so that the workload can be managed between two servers,
one on each node you already have.
You also set up a memory-to-memory replication domain so that HTTP
sessions can be shared in case of failure of one of the servers.

Requirements
The lab requires that you successfully complete the previous lab on
federation.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-1

Student Exercises

Exercise instructions
Preface
To do this exercise, you must complete the Federating a cell exercise as it sets up the
environment of the nodes, node agents, and servers that are clustered in this exercise.

Section 1: Resetting the WebSphere environment


Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Check nodes and node agents


Before you can begin creating the cluster, make sure that both node agents are running
and the nodes are synchronized.
__ 1. Log in to the deployment managers administrative console by using wasadmin and
web1sphere
__ 2. Make sure that both federated nodes, was8host01Node01 and was8host01Node02,
are up, running, and synchronized.
__ a. Select System Administration > Node agents.

12-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Select System Administration > Nodes.

Information
If the node agents need to be started, use the startNode script from a command window
to start them. Make sure that you are in the correct bin folder for the profile you are trying
to start.

Section 4: Creating the PlantsCluster cluster


In this step, you create the cluster that contains the cluster members that participate in
workload management of the Plants application.
A cluster is composed of two or more servers in a cell, which are assigned to run the same
applications.
Clusters are logical abstractions that are equivalent to servers.
__ 1. Create a cluster called PlantsCluster.
This cluster is created based on the existing server1 application server. This action
means that all of the applications that are already deployed to server1 are included
in the cluster.
__ a. Select Servers > Clusters > WebSphere Application Server clusters.
__ b. Click New.
__ c. Enter PlantsCluster for the Cluster name.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-3

Student Exercises

__ d. Select Prefer local and Configure HTTP session memory-to-memory


replication. Click Next.

__ e. Under Select basis for first cluster member, click Create the member by
converting an existing application server, and from the list, select the existing

12-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

server1 server. Note how the Member name and Select node fields are now
filled with the information from the existing server. Click Next.

__ 2. Add a server that is named server2 to the cluster. This server is created in node
was8host01Node02. Additional cluster members can be created either during or
after the cluster creation process.
__ a. Enter server2 for the Member name. This name becomes the name of a new
server that is created.
__ b. Select was8host01Node02 from the list for the node name. This node was
created in the previous lab by using a custom profile.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-5

Student Exercises

__ c. Make sure that Generate unique HTTP ports is selected. Click Add Member.

Information
Notice that the first server of the cluster is already listed at the bottom of the page. As new
servers are added to the cluster, they are also listed here.

12-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Notice that the new server now shows at the bottom of the page. Additional
cluster members can be created now or after cluster creation.

__ e. Click Next, and then click Finish on the Summary page.


__ f.

Before saving the changes, if not already done, set the console preferences to
synchronize configuration changes with the nodes when saving. Click the
Preferences link.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-7

Student Exercises

__ g. On the Preferences page, select Synchronize changes with Nodes.

__ h. Click Apply, and then click Save to save and synchronize with the nodes.
Information
From now on, any saves are automatically synchronized with the nodes during a save.
Preferences settings are persistent and are retained throughout browser invocations.

__ i.

Click OK on the Synchronize changes with Nodes page.

__ 3. Modify the default_host virtual host configuration.


This action allows browsers to have direct access to server2 without being forced to
use the external IBM HTTP Server.
__ a. View the HTTP Transport for server2. In the administrative console click Servers
> Server Types > WebSphere application servers > server2.
__ b. Expand Ports under Communications.

12-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The ports for server2 are listed. The WC_defaulthost for server2 is 9081. You
need to add this port number to the host aliases list for the default_host.

__ c. In the administrative console, select Environment > Virtual Hosts >


default_host. Click Host Aliases under Additional Properties. The host
aliases for default_host are listed.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-9

Student Exercises

__ d. If 9081 is not already defined, add it by clicking New. Leave the default * for the
host name and specify 9081 for Port. Click OK and Save the changes.

__ e. Click OK on the dialog to confirm that the nodes are synchronized.

12-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. Verify that the new cluster is added to the server configuration.


__ a. Select Servers > Clusters > WebSphere Application Server clusters. The
PlantsCluster cluster is shown on the page.

__ 5. Start PlantsCluster.
Starting the cluster has the same result as starting all the application servers which
are cluster members.
__ a. Select PlantsCluster and click Start to start the servers on the cluster.
Information
Ripplestart is used when you want to restart a cluster without having all members go down
at the same time. This function restarts the individual cluster members one at a time,
ensuring that the other members are available to handle requests.

__ b. Make sure that both application servers in the cluster started.


This operation can take a few minutes. You can look at the Servers > Server
Types > WebSphere application servers console page to see the status of the
cluster members.
__ c. Verify that the applications are in a started state.

Section 5: Set the applications to run on the cluster


Now that the cluster is defined, the next step is to configure the applications to run on the
cluster, rather than on individual servers. Since the web server is used to workload manage
the web containers, the web server also needs to be mapped to the applications. This step
Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-11

Student Exercises

is important as it allows the customized plugin.cfg.xml files to include the appropriate


URIs for each of the applications they are supposed to host.
__ 1. For the PlantsByWebSphere application, verify the next series of steps to map the
modules to the PlantsCluster cluster and the webserver1 web server.
__ a. Select Applications > Application Types > WebSphere enterprise
applications.
__ b. Click PlantsByWebSphere. Under Modules, click Manage Modules.
Information
WebSphere automatically mapped the application to the cluster and web server since there
are no other reasonable choices. For the sake of doing it, the exercise still goes through the
process.

__ c. Select all the modules of the application. Then, in the Clusters and servers list,
select both the PlantsCluster cluster and the webserver1 web server (use the
Ctrl key to select multiple servers).

__ d. Click Apply. This action creates the mapping.


__ e. Click OK.
__ f.

Make sure that the modules are mapped to both the PlantsCluster and the web
server.

__ g. Save the configuration changes.


12-12 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 2. Start the application if necessary.


__ 3. Regenerate and propagate the web server plug-in configuration file.
Although this process happens automatically, do it manually so that you can see the
status results and verify that the propagation succeeded.

Section 6: Create a cluster scoped JDBC resource


When creating the first cluster member from the existing server1, all resources that are
already defined at the server and node scope are maintained. Unfortunately, when adding
the second server on the was8host01Node02 node, the resource definitions from server1
and was8host01Node01 are not automatically defined. You now have a problem: since
both servers run the same applications, by virtue of being on the same cluster, they both
need access to the same resources.
One solution is to re-create the resources at the node scope for each additional node as its
servers are added to the cluster. That action works, but the disadvantage is that you must
do it every time a new node server is added to the cluster. A better solution is to define
resources at the cluster scope.
Information
Resources can be added at the cluster scope only if the cluster members are running in
similar operating environments. Since many resources require pointers to a file system
location, it does not work to define resources at the cluster scope for cluster members that
run in both Windows and Linux. In that case you must define the resources at the node
level.

__ 1. Remove the existing node scoped DB2 Universal JDBC Driver Provider (XA)
provider.
__ a. Using the administrative console, expand Resources > JDBC > JDBC
Providers.
__ b. Select the existing providers that are defined earlier at the
Node=was8host01Node01 scope, and click Delete.
Information
Cluster scope takes precedence over node scope, so node scoped resources do not have
to be deleted. However, deleting them does avoid ambiguity.
Deleting the JDBC provider also deletes any data sources that are defined under it.

__ c. Save your changes.


Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-13

Student Exercises

__ d. Click OK on the dialog to confirm that the nodes are synchronized.


__ 2. Create a cluster-scoped JDBC provider and data source.
__ a. Using the administrative console, expand Resources > JDBC > Data sources.
__ b. From the Scope list, select Cluster=PlantsCluster.
__ c. Click New.
__ d. Enter Plants for the data source name and
jdbc/PlantsByWebSphereDataSource for the JNDI name. Click Next.

__ e. Since you do not yet have a cluster-scoped JDBC provider, select Create new
JDBC provider. Click Next.

12-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
The Create a data source wizard temporarily goes to the Create new JDBC provider
wizard.

__ f.

Select DB2 for the Database type, DB2 Universal JDBC Driver Provider for the
Provider type, and XA data source for the Implementation type. Click Next.

__ g. On the next step, enter the database class path information in both boxes. The
path is:
/opt/IBM/db2/V9.5/java

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-15

Student Exercises

__ h. Click Next.

__ i.

Enter the database-specific properties for the data source:


Driver type: 4
Database name: PLANTS
Server name: dbhost
Port number: 50000

12-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

Click Next.

EXempty

__ j.

From the Component-managed authentication alias list, select


<nodename>/PlantsApp. Click Next.

__ k. Click Finish.
Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-17

Student Exercises

__ l.

Save your changes.

__ 3. Test the data source connection.


__ a. Using the administrative console, expand Resources > JDBC > Data sources.
__ b. Make sure the Cluster=PlantsCluster scope is selected.
__ c. Select the Plants data source and click Test connection.

Note
For the test to succeed, DB2 and the node agents must be running.
This exercise also assumes that the dbhost definition is added to your hosts file. This
procedure was part of a previous exercise. If not, add dbhost as an alias for your host.

__ d. Check the messages that are generated to make sure that both node agents
were able to connect (ignore any warnings).

__ 4. Disable the HTTPOnly setting.


__ a. In the administrative console, select Security > Global Security.
__ b. On the right side, under Authentication, expand Web and SIP Security and
click Single sign-on (SSO).

12-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Clear the box to Set security cookies to HTTPOnly.

__ d. Click OK and Save the changes.


Note
This setting is enabled by default to help limit the ability of javascript to access your
cookies. Although this setting is beneficial from a security perspective, it prevents you from
seeing the JSESSIONID cookie, which is interesting to see later in this exercise.
This setting is not something that you would typically want to disable in your production
environment.

Section 7: Test the application


In this section of the exercise the application is tested in a clustered environment. The
application is served from both application servers (cluster members) until the application
creates an HTTP session object. At that point, affinity is established. This condition means
that from that point on, all requests are directed to the same application server. This action
is done so that the users session information is available locally.
If the cluster member that is holding the user session becomes unavailable, the web server
plug-in reroutes the request to another cluster member. However, this situation presents a
problem because the new application server does not (by default) have access to the
session information.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-19

Student Exercises

The exercise initially demonstrates this problem, but then later configures a solution that
allows the cluster members to share their session information. This means that even if a
cluster member fails, users are still able to access their session through another cluster
member.
__ 1. Restart your environment. Although technically this action is not necessary, for the
sake of this exercise it is best to start in a good state.
__ a. Using the console, stop all the application servers (Servers > Server Types >
WebSphere application servers).
__ b. Using the console, stop all the node agents (System administration > Node
agents).
__ c. Using the console, stop the deployment manager (System administration >
Deployment manager).
__ d. Start your cell by using the startManager and startNode scripts in the bin
directories. Or, use the following script which starts the deployment manager and
both node agents:
/usr/software/scripts/start_cell_aix.sh
__ e. Use the administrative console to Start the PlantsCluster.
__ f.

Verify that the web server is running.

__ 2. Access the PlantsByWebSphere application.


__ a. Open a new Firefox window or tab and access the PlantsByWebSphere
application by using the following URL:
http://was8host01/PlantsByWebSphere
Important
It is important to note that the URL does not include a port number. This means that the
request is going to go through the external web server. This condition is important because
it is the WebSphere plug-in that is running within the web server process that has the
intelligence to route the requests to the various cluster members.

12-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click Flowers in the upper left.

__ c. Click any of the available flowers, and then click Add to cart.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-21

Student Exercises

__ d. This action takes you to the Shopping Cart. Notice the flower that you selected
is listed.

__ e. Click the Trees tab in the upper left, select a tree entry, and add it to your cart.
Notice that both your flower and your tree are in your shopping cart.
Information
How does this work? Based on the content of the JSESSIONID cookie, the web server
plug-in knows which server is hosting your information. Given that affinity, the plug-in
makes sure to route all of your requests to the same server (or cluster member).
This feature allows the server to store what is in your shopping cart and make it available
as you continue to shop.

__ 3. Look for the session cookie.


__ a. In the URL field of the PlantsByWebSphere browser window, type in the
following value:
javascript:alert(document.cookie)
Information
The value of the JSESSIONID cookie contains various pieces of information, including the
cluster member (called the CloneID) for which you have affinity. In some cases, the
CloneID is obscured because it actually contains a list of CloneIDs.

12-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. View the server runtime information. This information is useful to understand the
failover testing that is done later in this exercise.
__ a. To view the runtime server information, click Help in the navigation bar at the top
of the screen.

__ b. On the Help page, click the View Server Info link near the bottom of the page.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-23

Student Exercises

__ c. On the server information page, notice that the Process field shows the server
name and that the Session Data and Session Created fields are null.

__ d. Take note of the server name in the Process field: _____________


Important
This information is important because this server is the server to which your browser
currently has affinity. This means that the session information is stored specifically on that
server. If that server fails, your session information can be lost.

__ 5. Continue shopping.
__ a. Click the HOME link in the top navigation bar of the View Server Info page.

__ b. Add several more items to your shopping cart.

12-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Notice that the shopping cart continues to include your previously added items.

__ d. Return to the View Server Info page (Help > View Server Info) and notice that
server name in the Process field remains the same. This information does not
change because of the affinity with that server.

__ 6. Cause a server failure.


__ a. Leave your browser window to PlantsByWebSphere open.
__ b. Open a new tab in your Firefox window and return to the administrative console.
__ c. Select Servers > Server types > WebSphere application servers, select the
server to which you have affinity, and click Stop.
Information
This action simulates a server failure and forces a failover to the other cluster member.

__ d. Make sure that the server is stopped before returning to the PlantsByWebSphere
window.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-25

Student Exercises

__ e. Click the Status refresh icon until the Status shows a complete stop.

__ f.

Return to the PlantsByWebSphere browser window and click Home. Then,


click Shopping Cart.

__ g. Notice that the shopping cart is empty.

Information
Why is the shopping cart information lost?
The PlantsByWebSphere application is not coded to store the shopping cart in the session
information. This means that a server failure causes the loss of the shopping cart contents.
If the failover of your session information is important, it is necessary to design your
application with session failover in mind. There are a number of different possible designs,
but that discussion is outside of the scope of this course.
One possible approach is to store the contents of the shopping cart in the HTTP session
object. This approach is demonstrated in the next part of this exercise.

Section 8: Verify session replication settings


In order for members of a cluster to share session information, a strategy to share session
data must be put in place. WebSphere Application Server provides various mechanisms to
achieve this goal. The main strategies are database and memory-to-memory replication.
12-26 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Setting up either of these mechanisms is straightforward. In this exercise,


memory-to-memory replication is set up to handle session data replication.
Session management must be configured on each of the servers in the cluster. However,
this action was already done for you when you created the cluster. If you recall, earlier in
this exercise, when you created the PlantsCluster, you selected Configure HTTP session
memory-to-memory replication.

In this next section, you confirm that these required settings are enabled. Had you not
selected this option, you would be required to do this action manually.
__ 1. Check the memory-to-memory session replication settings for the cluster members.
__ a. Select Servers > Server Types > WebSphere application servers.
__ b. Click the hyperlink for either one of the servers.
__ c. Under Container Settings, click Session management.

__ d. Under Additional properties, click Distributed environment settings.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-27

Student Exercises

__ e. Notice that the Memory-to-memory replication is already selected. Click the


Memory-to-memory replication hyperlink.

__ f.

Notice that the Replication domain is set to PlantsCluster and the Replication
mode is set to Both client and server.

Information
If your application required failover for stateful session beans, further configuration would
be needed to set up that memory-to-memory replication.

Section 9: Test the application for session failover


In this section, you test the failover of the session information. Although the
PlantsByWebSphere application was not designed to fail over the shopping cart, you can
store content in the session object. After that is done, you stop the application server that is
holding session information to demonstrate that the information does indeed fail over to the
other cluster member.
__ 1. Using the administrative console, make sure that both cluster members are running.
__ a. Select Servers > Server types > WebSphere application servers, select any
stopped application servers, and click Start.
__ b. Wait for all application servers to start.
__ 2. Continue shopping in the PlantsByWebSphere application.
__ a. Return to the browser window or tab that accesses PlantsByWebSphere. Click
Help and proceed to the View Server Info page.
12-28 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Take note of the server name in the Process field: ________________


__ c. Click Home and browse through the store. Add a couple of items to your
shopping cart.
__ d. Return to the View Server Info page and confirm that the server name is the
same.
__ 3. Add some content to the HTTP session object. Now, you have objects in the
shopping cart and know to which server you have affinity.
__ a. From the View Server Info page, enter your name into the Session Data field
and click Update.
__ b. Notice that not only does the data show in the Session Data field, but the time
that the session object was created is shown in the Session Created field.

__ c. Take note of the time that is shown in the Session Created field:
_____________
__ d. Click HOME and add several items to your shopping cart.
__ e. Return to the View Server Info page (through the Help page) and notice that the
session data and time created are not changed.
__ 4. Simulate a server failure.
__ a. Return to the administrative console window or tab, and Stop the server to which
you have affinity.
__ b. Wait for the server to stop completely.
__ 5. Verify the session data failover.
__ a. Return to the browser tab or window that you used for accessing the
PlantsByWebSphere application.
__ b. Click Home and then click Shopping Cart. Notice that the shopping cart is
empty. This condition is expected.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-29

Student Exercises

__ c. Return to the View Server Info page. Notice that the server name changed to
the other cluster member. Also, notice that the Session Data and Session
Created fields stayed the same.

Information
What does this exercise demonstrate?
Since you already understand that the shopping cart for PlantsByWebSphere does not fail
over, the fact that the shopping cart is empty after a failure is not a surprise. However, this
last section demonstrates the use of an HTTP session object within the code, and the fact
that the cluster members can fail that data over between the cluster members.
The other thing to note is that your browser now has affinity to the new server.

End of exercise

12-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


The first part of the exercise looked at creating a cluster of two servers, each in its own
node.
Next, you configured the applications to run on the cluster by assigning the modules of the
applications to the web server and the cluster.
Finally, you thoroughly tested the application in the clustered environment, and created
failover scenarios by stopping one of the servers.
To make failover work when session data is involved, the Data Replication Service used
memory-to-memory replication.

Copyright IBM Corp. 2012

Exercise 12. Clustering and workload management


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

12-31

Student Exercises

12-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 13.Configuring the service integration


bus
What this exercise is about
This exercise shows you how to create a service integration bus and
add a cluster as a member of the bus. You also learn how to configure
the bus and JMS resources necessary to support an application that
uses messaging. You install two applications, a message-sending
simulator and a transaction processor. You use these applications to
explore messaging behavior by using the high availability messaging
engine policy.

What you should be able to do


At the end of the exercise, you should be able to:
Configure the service integration bus, the messaging engine, and
different bus destinations in WebSphere Application Server
Configure JMS queues and activation specifications for
message-driven beans
Install and test the messaging features in the Trade Processor
application

Introduction
There are many changes to the way WebSphere default messaging is
configured in WebSphere Application Server V8. There are new
wizards to assist you in configuring how the messaging engines
behave depending on the messaging engine policies. It is now
possible to configure for high availability, providing automatic failover
mechanisms. You might also configure for scalability where
messaging engines can split the volume of messages and share the
processing load. There is also a preconfigured policy for a combination
of high availability and scalability.
Operating a secured messaging bus is also simplified by improving the
way users and groups are assigned the different roles necessary to
send, receive, and connect to a messaging bus.
In this exercise, you configure both JMS and service integration bus
resources to support two applications. The first application creates
simulated transactions that represent buying and selling stocks. On a
Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-1

Student Exercises

web page in the application, you can select the number of transactions
of each type (buy or sell). Each transaction places messages on a
JMS queue.
The second application uses an MDB to listen to the same queue and
receives the messages that the simulator sends. The transactions are
displayed on a table. Every 30 seconds the oldest transaction is
removed from the table.

Requirements
To run this exercise, you must first complete Exercise 12: Clustering
and workload management. Additionally, this exercise assumes that
HPEL is enabled for the application servers. HPEL is enabled in
Exercise 9: Problem determination.

13-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Applications that are used in this exercise


The two applications that you install for this exercise require you to set up both service
integration bus (SIBus) and JMS resources.
Table 7: Applications and their function
Application

Message Sender Simulator


MSGSenderSimulator.ear

Copyright IBM Corp. 2012

Function
This application simulates the function of
buying and selling stocks. You can select
how many shares to buy or sell. For each
operation, a message is placed on a JMS
queue. Each message has a transaction
number that includes the name of the server
that produced it and a sequence number.
You can view the action of placing the
message on the queue in the SystemOut log
file.

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-3

Student Exercises

Table 7: Applications and their function


Application

Function
A message-driven bean EJB (MDB) drives
this application. This bean listens on the
same queue on which the simulator places
messages. As the MDB receives messages,
the messages are listed in a table on a web
Trade Processor Application
page and displayed to the user. Every 30
TPApplication.ear
seconds the oldest message is assumed to
be processed and is removed from the table.
As messages are received and discarded,
trace entries are written to the SystemOut
log file.
Below you see the user interface for both applications:

13-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

From the Monitor web page, you can create Buy messages and Sell messages and
send them to a server for processing.

From the same Monitor web page, you can see which server received the messages for
processing. The Transaction column shows what server sent the message and the order in
which the message was received.
Later in this exercise you install and configure these applications. You also configure the
JMS and SIBus resources to make messaging work. Then, you try different messaging
engine policies to see how you can change the behavior of the applications when running
in a cluster to take advantage of scalability and high availability.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-5

Student Exercises

Section 4: The messaging environment that is created in the exercise


You create the SIBus objects and the JMS objects that are required to support the two
messaging applications. You do the following tasks in this exercise.

1. Create and secure an SIBus named: msgBus


2. Add the PlantsCluster as a member of the bus. As soon as the PlantsCluster
is a member of the bus, the messaging engine (PlantsCluster.000-msgBus)
becomes active in one of the cluster members, Server1, or Server2.
3. Create the bus destination named: TradeQueueDestination
4. Create the JMS objects that the messaging applications require: connection
factory, destination queue, and activation specification. These objects are
Java objects that are scoped to the cluster and are given JNDI names.
5. Install the messaging applications to the PlantsCluster.
In addition to creating this environment, you configure and test two messaging policies:
High availability
High availability with the option Always activate MDBs in all servers enabled

Section 5: Setting up the service integration bus


In this section, you:
1. Create a secured service integration bus

13-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

2. Add the PlantsCluster as a bus member


3. Configure an SIBus destination. In addition, specific users and groups need to be
authorized for the different bus roles.

__ 1. Create a secured service integration bus named msgBus.


__ a. Make sure that the deployment manager is up and running. If not, open a
command prompt, change to the directory <profile_root>/Dmgr/bin, and
issue the ./startManager.sh command.
__ b. Log in to the administrative console as user ID wasadmin with password
web1sphere
__ c. If server1 and server2 are running, stop them now.
__ d. If the node agents for profile1 and profile2 are running, stop them now. Since
you do much configuration in the following steps, stopping the node agents
saves time during node synchronization.
__ e. From the administrative console navigation menu on the left, expand Service
integration and click Buses.
__ f.

On the Buses page, click New.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-7

Student Exercises

__ g. On Step 1 of the wizard, enter msgBus for the name of the bus. Also, make sure
that Bus security is checked. Click Next.

__ h. In the next page of the wizard, you configure bus security. This task is a
multiple-step process. Step 1.1 is the introduction. Read the information and
then click Next.

13-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ i.

The next step in setting up bus security is to configure whether you need to use
SSL for the transport. Since you are in a secured, isolated network, you do not
require SSL. Clear the check box for Require clients use SSL protected
transports. Click Next.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-9

Student Exercises

__ j.

Next, you choose which security domain to use for authenticating bus users. For
this exercise, select Inherit the cell level security domain. Click Next.

__ k. Read the confirmation page and click Next.


__ l.

On the final page, click Finish to complete the creation of the new bus. Wait a
few minutes for the creation of the new bus.
Note

To run with bus security enabled, global security must be enabled. The wizard
automatically enables global security if you request the creation of a secure bus. Notice
that this configuration did not require an SSL transport. Starting with WebSphere
Application Server Version 7, an authentication alias is not required for inter-engine
communications (if all messaging engines are running on version 7 or higher).

__ m. Save the changes to the master configuration.

13-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ n. Verify that the new bus is created and security is enabled.

Important
Make sure that you are using the Firefox browser.
The Internet Explorer browser requires Adobe SVG to support the messaging engine policy
assistance wizard. You can download Adobe SVG from
http://www.adobe.com/svg/viewer/install/ and install it on Internet Explorer.
The Firefox browser has SVG support that is built in, so use Firefox for this lab exercise.

__ 2. Assign the PlantsCluster as a bus member and configure the high availability
messaging engine policy.
__ a. On the Buses page, click msgBus.
__ b. On the next page, under Topology click Bus members.
__ c. On the Bus members page, click Add.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-11

Student Exercises

__ d. Select the Cluster radio button. The only defined cluster, PlantsCluster, is
preselected.

__ e. Click Next.
Information
In previous versions of WebSphere Application Server, setting up the core group policies
that determine how messaging engines behave in a clustered environment was a complex
task. Starting in version 7, you can enable messaging engine policy assistance and use
wizards in the administrative console to assist you in selecting and maintaining messaging
engine policies. In this exercise you configure and test two policies, first high availability
and then scalability.

13-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Configure the high availability message engine policy.


__ a. The policy wizard displays a diagram of the default messaging engine policy.

Notice that the diagram shows the suggested configuration of the bus member,
PlantsCluster, for the high availability messaging engine policy.
__ b. Click Next at the bottom of the messaging engine policy assistance settings
window.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-13

Student Exercises

__ c. Select File store. This file store is used to make sure that any messages can be
persisted. Click Next.

__ d. Notice that one messaging engine named PlantsCluster.000-msgBus is


created. Failover is enabled, and the preferred order of servers is server1 first,
server2 second. However, the message store still needs more configuration.

__ e. In the previous step you select the type of message store, File store. Now you
need to specify where to locate the log files. Click the
PlantsCluster.000-msgBus link.

13-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Enter ME_logs for the Log directory path and ME_store for the Permanent
store directory path.

These settings cause new directories named ME_logs and ME_store to be created
under <profile_root> for each of the cluster members.
__ g. Click Next.
__ h. Verify that you now see Yes in the column: Is the message store configured?

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-15

Student Exercises

__ i.

Click Next again.

__ j.

Accept the default heap sizes and click Next.

__ k. Read the Summary page and click Finish. The bus member is now fully
configured and available.
__ l.

Save the changes to the master configuration.

__ m. Verify that the messaging engine policy is enabled for high availability.

13-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 4. Create a bus destination called TradeQueueDestination.


This destination is a queue to which messages on the bus can be sent. It is going to
be assigned to the PlantsCluster that is going to be hosted.
__ a. On the breadcrumb trail, click msgBus.
__ b. Under Destination resources, click Destinations.
__ c. Click New.
__ d. In the Create new destination wizard, select Queue and click Next.

__ e. Enter TradeQueueDestination for the Identifier and click Next.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-17

Student Exercises

__ f.

On Step 2 of the wizard, ensure that the bus member is Cluster=PlantsCluster.


There is no other choice as there is only one bus member that is defined on the
bus. Click Next.

__ g. Read the confirmation page and note that this process creates the queue points.
Click Finish.
__ h. Save the changes to the master configuration.
__ i.

Verify that the new SIBus destination is created.

Information
When running a service integration bus with security enabled, you must configure which
users and groups are authorized for the different roles that the bus requires. In the
following steps, you assign users to security roles. However, before the actual bus security
authorization can be configured, you need two other settings:
Create a J2C alias that the resources use to authenticate with the server.
Create a user in the user registry that matches the J2C alias so authentication
can succeed.

13-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 5. Create a J2C alias.


The bus uses this J2C authentication alias to define its identity.
__ a. On the administrative console, click Security > Global security.
__ b. Under Authentication, expand Java Authentication and Authorization service
and click J2C authentication data.
__ c. Click New.
__ d. Enter SIB User for the Alias. Enter busUser for the User ID and web1sphere
for the Password. Add an optional description if you like. Click OK.

__ e. Save the changes to the master configuration.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-19

Student Exercises

__ f.

Verify that the new J2C alias is created.

__ 6. Create a user in the current user registry that matches the attributes of the J2C
alias.
If the SIBus attempts to use the new J2C authentication alias to authenticate, that
user needs to exist in the user registry.
__ a. On the administrative console, click Users and Groups > Manage Users.
__ b. Click Create.
__ c. Enter busUser for the User ID. The First name and Last name can be anything;
use SIBus and User. Enter web1sphere for the passwords.

__ d. Click Create. Click Close.


13-20 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Verify that the new user was created.

__ 7. Configure SIBus security.


__ a. On the administrative console, click Service integration > Buses.
__ b. Under Security, click the Enabled link.

__ c. Under Authorization Policy on the right, click Users and groups in the bus
connector role. To connect to the bus, valid credentials must be presented.
__ d. Click New.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-21

Student Exercises

__ e. On the first page of the wizard, select Users and click Next to search for all
defined users.

__ f.

A list of defined users in the current user registry is displayed. From the list,
select busUser and click Next.

__ g. Read the summary page and click Finish.


__ h. Save the changes to the master configuration. The user, busUser, is now
assigned to the bus connector role.
13-22 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 6: Configuring the JMS resources


Now that the service integration bus is configured, it is necessary to configure the JMS
resources so that the applications can produce and consume messages.
There are three JMS resources that need to be configured for the applications to work; they
are:
JMS connection factory
JMS queue
JMS activation specification

Remember that applications have no knowledge of the service integration bus itself. The
applications use JMS to place and retrieve messages that use, in this case, a JMS queue.
__ 1. Create a connection factory called Trade Connection Factory.
The connection factory defines how the JMS messages reach the bus.
__ a. In the administrative console, go to Resources > JMS > Connection factories.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-23

Student Exercises

__ b. From the Scope menu, select Cluster=PlantsCluster.

__ c. Click New.
__ d. Select Default messaging provider. Click OK.
__ e. Change only the following values; accept the defaults for all the rest.
Table 8: Fields and values for the connection factory
Field
Value
Name

Trade Connection Factory

JNDI name

jms/tradeCF

Bus name

msgBus

Mapping-configuration alias

DefaultPrincipalMapping

Container-managed
authentication alias

was8host01CellManager01/SIB User

__ f.

Click OK when you are done entering all of the values.

__ g. Save the changes to the master configuration.


__ h. Verify that the connection factory was created.

__ 2. Create a queue named: Trade Processor Queue

13-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

This object is a JMS queue that is being created. The configuration gives it a JNDI
name, defines it to exist on the msgBus, and maps it to the internal bus queue
destination that was created earlier in this exercise.
__ a. On the administrative console, click Resources > JMS > Queues.
__ b. From the Scope menu, select Cluster=PlantsCluster.
__ c. Click New.
__ d. Select Default messaging provider. Click OK.
__ e. Change only the following values; accept the defaults for all the rest.
Table 9: Fields and values for the queue

__ f.

Field

Value

Name

Trade Processor Queue

JNDI name

jms/tradeprocq

Bus name

msgBus

Queue name

TradeQueueDestination

Click OK when you are done entering all of the values.

__ g. Save the changes to the master configuration.


__ h. Verify that the queue was created.

__ 3. Create the activation specification.


The activation specification defines how the JMS messages can be read from the
bus. The activation specification has a JNDI name so that the application can locate
it, but also has the JNDI name of the queue from which it reads messages.
__ a. From the administrative console, click Resources > JMS > Activation
specifications.
__ b. From the Scope menu, select Cluster=PlantsCluster.
__ c. Click New.
__ d. Select Default messaging provider. Click OK.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-25

Student Exercises

__ e. Change only the following values; accept the defaults for all the rest.
Table 10: Fields and values for the activation specification

__ f.

Field

Value

Name

Trade Processor Activation Spec

JNDI name

jms/tradeAS

Destination type

Queue

Destination JNDI name

jms/tradeprocq

Bus name

msgBus

Authentication alias

was8host01CellManager01/SIB User

Click OK when you are done entering all of the values.

__ g. Save the changes to the master configuration.


__ h. Verify that the activation specification was created.

Section 7: Installing the messaging applications


As mentioned at the beginning of this exercise, two applications are used to demonstrate
messaging on the service integration bus. The first application generates messages that
are placed on a queue, and the second application consumes those messages. Now that
the message bus and the JMS resources are configured, you must install the applications.
The installation is straightforward since limited configuration is required.

13-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 1. Install the MSGSenderSimulator application.


Since this application is writing messages to the bus, it needs to know how to find
the connection factory that was previously defined. It also needs to know how to find
the JMS queue.
__ a. From the administrative console, click Applications > New Application.
__ b. On the New Application wizard, click New Enterprise Application.
__ c. Select Local file system.
__ d. Click Browse to the right of the Full path entry field.
__ e. Navigate to the folder /usr/software/Messaging.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-27

Student Exercises

__ f.

Select the file MSGSenderSimulator.ear and click Open.

__ g. Click Next.
__ h. Select Detailed - Show all installation options and parameters and click
Next.

__ i.

Click the link for Step 2: Map modules to servers.

__ j.

Check the box for the MSGSenderWeb module.

__ k. Under the Clusters and servers window, select (highlight) PlantsCluster.

__ l.

Click Apply.

13-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ m. Verify that the MSGSenderWeb module is mapped to the PlantsCluster.

Note
Notice that the steps to map modules to servers is not necessary because WebSphere
maps the modules automatically. However, it is worth verifying that the mapping is correct.

__ n. Click the link for Step 6: Bind message destination references to


administered objects.
__ o. In this step you map the reference that the code uses to access the queue, to the
JNDI name of the JMS queue you previously configured. Enter jms/tradeprocq
in the Target Resource JNDI Name entry field.

__ p. Click Next to get to Step 7: Map resource references to resources.


__ q. Here you configure the authentication alias that the connection factory uses, and
you map its name to the resource reference used in the application. Select the
MSGSenderWeb module.
__ r.

Click Modify Resource Authentication Method to define which J2C alias to


use.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-29

Student Exercises

__ s. The page expands to show the different options for authentication. Select Use
default method and from the menu select was8host01CellManager01/SIB
User. Click Apply.

__ t.

Select the MSgSenderWeb module again and click Browse in the Target
Resource JNDI Name column of the table to see all defined JNDI names for
connection factories.

13-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ u. There is only one connection factory configured. Select it and click Apply.

__ v. Verify that the JNDI name and the authentication method are set correctly.

__ w. Click the link for Step 13: Summary. Read the summary and click Finish.
__ x. Wait for the application to install successfully, and click Save to save it to the
master configuration.
__ y. The wizard returns to the first page, where you can install the next application.
__ 2. Install the Trade processor application.
This application consumes the messages, so it needs to know how to find the
activation specification (already coded into the application).
__ a. Select Local file system.
__ b. Click Browse to the right of the Full path entry field.
__ c. Navigate to the folder /usr/software/Messaging

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-31

Student Exercises

__ d. Select the file TPApplication.ear and click Open.

__ e. Click Next.
__ f.

Select Fast Path - Prompt only when additional information is required and
click Next.

__ g. Click the link for Step 4: Summary.


__ h. Read the summary and click Finish.
__ i.

Wait for the application to install successfully.

__ j.

Click Save to save the changes to the master configuration.

__ 3. Verify that both applications were installed successfully.

13-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ a. From the administrative console, click Applications > Application Types >
WebSphere enterprise applications.

The application status that you see depends on whether the node agents and
application servers are started. You start all the required servers in the next part
of the exercise.
Note
Most likely you see more applications that are installed on your lab workstation; it depends
on what you installed in previous lab exercises.

Section 8: Testing the applications and exploring messaging engine


policies
In this part of the exercise, you test the applications under different messaging engine
policies. Also, you explore the effects of configuring different activation specification
options and queue options. The first configuration you test is a single messaging engine
that uses the high availability policy and all other default options.
Before you can test the applications, both node agents and both cluster members need to
be started.
__ 1. Start the node agents.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-33

Student Exercises

__ a. In a command window, change directory to <profile_root>/profile1/bin


and type the ./startNode.sh command.
__ b. Wait until the node agent is running.
__ c. Start the second node agent, change directories to
<profile_root>/profile2/bin and type the ./startNode.sh command.
__ d. Wait until the node agent is running.
__ e. Using the administrative console, verify that both node agents are started by
clicking System administration > Node agents.

__ f.

Select System administration > Nodes, and Synchronize both nodes.

__ 2. Start the cluster.


__ a. Using the administrative console, click Servers > Clusters > WebSphere
application server clusters.
__ b. Check the box for PlantsCluster and click Ripplestart.

13-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Note
Ripplestart stops servers (if they are running) and then starts all servers in a cluster, waiting
for each of the servers to start before moving on to the next server. Ripplestart alleviates
the load on the processor because only one server is ever starting at a time.

__ c. Wait for the Status indicator to turn to a solid green arrow (it can take several
minutes) signifying that all servers in the cluster are started. (You might need to
click the refresh icon several times.)
__ d. Verify that both servers are started by clicking Servers > Server Types >
WebSphere application servers.

__ e. If either of the servers is not yet started, select the server and click Start.
__ 3. Ensure that both the applications you installed earlier are running.
__ a. In the administrative console, click Applications > Application Types >
WebSphere enterprise applications.
__ b. Verify that both applications are in a started state.

Note
If either of the applications is not running, and does not start upon selecting it and clicking
Start, check the SystemOut logs to determine what is preventing the application from
Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-35

Student Exercises

starting. Check the steps that you went through when you installed the applications. The
problem is most likely related to the resolution of resource references or authentication
aliases not being applied to the resource references. If after checking these settings you
still have a problem, contact your instructor.

13-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
There are two applications that are installed, a message producer and a message
consumer. The message simulator application is the message producer; the trade
processor application is the consumer of messages. Since the applications are installed in
a cluster, each server in the cluster runs both applications.
When using the high availability messaging engine policy, only one messaging engine
is started in the cluster. A WebSphere component that is called the high availability
manager decides which server in the cluster gets to run the messaging engine (usually the
first server that is started in the cluster). If the server that runs the messaging engine fails,
the high availability manager chooses another cluster member and starts the messaging
engine there. In this configuration, the messaging engine can fail over to another cluster
member, thus providing high availability.
Producers in any cluster member can generate and place messages on a queue. However,
only the consumer that is on the same server as the running messaging engine gets to
consume and process the messages. In the next few steps, you prove these points.

__ 4. Start the Monitor HTML page. The web page is provided as part of the Trade
processor application to more easily demonstrate the interactions between the
application servers and messaging engines.
__ a. Open a new browser and enter the web address:
http://localhost:9080/Trade/processor/Monitor.html

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-37

Student Exercises

__ b. Since you run the Monitor repeatedly throughout the rest of this exercise, you
might want to bookmark the web address in your browser.

The page has four frames:


Upper left: message producer simulator that runs on server1
Upper right: trade processor that runs on server1
Lower left: message producer simulator that runs on server2
Lower right: trade processor that runs on server2
In the message sender applications you can select how many messages of each kind, buy
or sell, are sent to the queue.
Note
You can use port 9081 for the web address of the monitor. Doing that would serve the
page from server2 instead of server1.

__ 5. Determine which server is currently running the messaging engine.

13-38 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ a. From the upper left frame of the Monitor web page (Sending messages from
server: server1), leave the default values (one message) for Buy and Sell
messages, and click Send messages.

__ b. Observe which server processed the messages: server1 or server2.


__ c. Record the server name here ________________________. In the high
availability policy, only one server in the cluster is running the messaging engine.
__ d. From the lower left frame of the Monitor web page (Sending messages from
server: server2), leave the default values (one message) for Buy and Sell
messages and click Send messages.
__ e. Record the server name here ________________________. The same server is
processing messages that are sent from both server1 and server2.
__ f.

Examine the log files for whatever server processed the messages in the last few
steps. If you did not enable HPEL for that server, open its SystemOut.log file

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-39

Student Exercises

with a text editor. If HPEL is enabled, use the Log Viewer and go to the last page
of the logs. Look for messages similar to the following.

Note
The application that receives the messages is the one running on the server where the
messaging engine is active. You can verify this behavior by looking at the logs for both
cluster members and looking for the message that indicates the messaging engine is in the
Started state:
Messaging engine PlantsCluster.000-msgBus is in state Started.
The other server in the cluster has a message which indicates that the message engine is
in the Joined state:
Messaging engine PlantsCluster.000-msgBus is in state Joined.

__ g. Close the browser in which the Monitor is running.


__ 6. Test messaging engine failover.
__ a. From the administrative console, stop the server in which the messaging engine
is currently running (server1 or server2).
__ b. Wait for the server to stop; then examine the logs for the server that is still
running and look for the following message near the end of the log.

13-40 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. This message indicates that the messaging engine is started on the server that is
still running.
__ d. From the administrative console, start the server that you stopped in Step (a).
__ e. Wait for the server to start; then open a browser and enter the Monitor web
address: http://localhost:9080/Trade/processor/Monitor.html
__ 7. Now check which server is processing the messages as you did before.
__ a. From the upper left frame of the Monitor web page (Sending messages from
server: server1), leave the default values for Buy and Sell messages and click
Send messages.
__ b. Observe which server processed the messages, server1 or server2.
__ c. Record the server name here ________________________. In the high
availability policy, only one server in the cluster is running the messaging engine.
__ d. From the lower left frame of the Monitor web page (sending messages from
server: server2), leave the default values (one message) for Buy and Sell
messages and click Send messages.
__ e. Record the server name here ________________________. The same server is
processing messages that are sent from both server1 and server2.
__ f.

You can observe that even though the messaging engine failed over to the other
server, when the original server is running again, the messaging engine
continues to run on the server it failed over to. The high availability policy has
failover but not fail back.

__ g. Close the browser in which the Monitor is running.


Information
High availability: Pros and cons
The fact that only one of the message consumers in a cluster gets to process messages
might be just what you want. This configuration is called for when messaging order is
important and messages must be processed in the same sequence in which they were
produced (to ensure message order, more configuration might be required).
If message order is not important, this configuration is not efficient in a clustered
configuration. All servers in the cluster are running the message consumer application, but
only one of those servers actually processes them.
There are at least two solutions to get more message consumers that process messages
from the queue. In the next steps, you first configure the activation specification to allow
all consumers in the cluster to get messages. Later, you change the messaging engine
policy from high availability to scalability to provide workload management of the
messaging engine.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-41

Student Exercises

__ 8. Configure the activation specification to start all MDBs in the cluster. There is an
option to configure an activation specification to activate message-driven beans
(MDBs) in all the servers, not just the server with the running messaging engine.
The result of this configuring option is that all consumers in all cluster members
receive messages.
__ a. From the administrative console, click Resources > JMS > Activation
specifications.
__ b. Click the link for the Trade Processor Activation Spec.
__ c. Near the bottom of the page, in the Advanced section, select Always activate
MDBs in all servers, and click OK.

__ d. Save the changes to the master configuration.


__ 9. Ripplestart the PlantsCluster.
__ a. From the administrative console, click Servers > Clusters > WebSphere
application server clusters.
__ b. Check the box for PlantsCluster and click Ripplestart.
__ c. Wait for the Status indicator to turn to a solid green arrow (it can take several
minutes) signifying that all servers in the cluster are started. (You might need to
click the refresh icon several times.)
__ d. Verify that both servers are started by clicking Servers > Server Types >
WebSphere application servers.
__ 10. Test whether MDBs are active in both servers that use the Monitor web page.
__ a. Start a new browser and enter the web address:
http://localhost:9080/Trade/processor/Monitor.html

13-42 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Make sure that both Trade processor applications have no pending transactions.
You can quickly clear the table of pending transactions if necessary by selecting
Reset from the Refresh menu.

__ c. Leave the default values of 1 Buy and 1 Sell messages and click Send
messages in the upper left frame.

__ d. Which processor application displayed the messages? You can see similar
behavior in your own browser. Server 1 processed one message, the Buy
message; and Server2 processed the other message, Sell. As a result of the
Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-43

Student Exercises

configuration of the activation specification that you just completed, there is now
an active MDB on each server that can consume messages.
__ e. Now from the lower left frame, send three Buy messages and two Sell
messages.

13-44 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Notice the distribution of messages between the two processor applications.


They each might, or might not, receive an equal number of messages.

__ g. Try sending some more messages from the producers in both servers and see
which consumer picks up the messages.
__ h. Close the browser in which the Monitor is running.
Information
Possible performance issues
One of the problems with this activation specification configuration is that the single active
messaging engine is now sending messages to queue points in multiple servers. In a local
network with a small volume of messages, there might not be any performance issues. But
in a widely distributed environment, with heavy volume of messages, it can cause
performance problems because of network traffic.
To provide better scalability, you can change the messaging engine policy to Scalability
which requires a messaging engine in each cluster member.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-45

Student Exercises

Section 9: Read only: Configure the scalability messaging engine policy


In this section, the steps for changing the messaging policy to scalability are described.
This configuration involves creating another messaging engine that runs on the second
cluster member.

Two different messaging engines run on their preferred server unless that server fails; then
its messaging engine fails over to the other server.
Use the messaging engine policy assistance wizard to configure the Scalability policy.

13-46 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

The wizard guides you through adding the second messaging engine and correcting the
policy for scalability. When the configuration is completed, the wizard displays the new
Scalability policy.

Interpreting the diagram, there are now two messaging engines,


PlantsCluster.000-msgBus (000) and 001. Messaging engine 000 runs only on its
preferred server, server1, and does not fail over to server2. Similarly, messaging engine
001 runs only on its preferred server, server2, and does not fail over to server1.
Recall that for the High Availability policy, there was an option to enable Always activate
MDBs in all servers on the activation specification. This option is no longer required for
the Scalability policy since this behavior is now automatic.
With this messaging engine policy, messages are consumed on the same server where
they are produced. However, if you prefer to have messages that are consumed across
your servers, regardless of where they are produced, you can do some additional
configuration on the queue definition. A feature that was introduced in WebSphere
Application Server V7 is the capability to control the local queue point behavior. You might,

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-47

Student Exercises

or might not, prefer a local queue point. This choice depends on the requirements of your
application. This option is part of the JMS queue configuration.

The default behavior is to prefer to send messages to a local queue point.

End of exercise

13-48 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


In this exercise, you configured the service integration bus and JMS resources as the
Trade Processor and Message Sending Simulator applications require. This included
configuring the bus members, bus destination, JMS connection factory, JMS queue, and
JMS activation specification.
You then experimented with different configurations of the service integration bus and JMS
resources, including messaging engine policies and settings in the JMS queue and
activation specification that control the production and consumption of messages.

Copyright IBM Corp. 2012

Exercise 13. Configuring the service integration bus


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

13-49

Student Exercises

13-50 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 14.Configuring WebSphere security


What this exercise is about
This exercise starts by ensuring that the WebSphere administrative
security is enabled. With administrative security turned on (the default
is that it is enabled during profile creation), there are several effects.
These effects include the fact that administrative tools such as the
administrative console, wsadmin, and many of the scripts (stopServer,
serverStatus) require correct authentication and authorization to run.
The exercise then goes through the process of defining new
administrative users, granting them specific access to parts of the
administrative console, and verifying that access is limited to certain
functions. To do this process, you first log in to the administrative
console as the user that was created during the profile creation. This
specific user has, by default, implicit rights to the WebSphere
administrative console as it is the initial user created. This exercise
creates more users and defines which rights they have within the
administrative console.
This exercise then configures fine-grained access for both the
PlantsByWebSphere and the DefaultApplication. Fine-grained access,
a new console feature in WebSphere Application Server V7, is done
by defining administrative authorization groups. These groups map
specific scopes or objects to console users and roles, thus allowing
those users that role access to those specific objects. When console
users attempt to access other objects for which they have no
fine-grained, configured access, they have only the same access role
level that is defined for them at the global level.
Finally, security domains are explored. These domains allow the
administrator to define security attributes at scope other than just at
the cell level. For example, with the use of security domains, it is
possible to define a cell level user registry, but then define an
alternative user registry for a specific cluster, node, or application
server.

What you should be able to do


At the end of the exercise, you should be able to:
Enable WebSphere security
Configure administrative security by configuring access to
administrative functions
Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-1

Student Exercises

Configure fine-grained administrative security

Introduction
This lab configures access to the administrative console by defining a
number of roles and mapping those roles to existing users. To test the
configuration, you attempt various functions from the different users
and verify that the security configurations correctly limit access to
various functions.
The last part of this lab defines fine-grained access from different parts
of the WebSphere environment.

Requirements
This exercise requires a workstation with WebSphere Application
Server V8 installed and the successful completion of the previous
exercises.

14-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Verify administrative security


This exercise configures security access to the administrative tools. Before any security
access takes effect, administrative security must be enabled. By default, security is
enabled during the creation of a profile (but can easily be disabled).
In this section of the lab, the state of administrative security is verified.
__ 1. Check the state of administrative security.
__ a. Log in to the administrative console with the user wasadmin and the password
web1sphere
Information
You already know the answer to whether administrative security is enabled. The fact that
the administrative console prompted for a user name and password verifies that.

__ b. In the administrative console, click Security > Global security.


__ c. Verify that the Enable administrative security option is checked.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-3

Student Exercises

Information
If administrative security is not enabled, you need to check the box, save your changes,
and make sure that all nodes are synchronized. Then, restart all of the WebSphere
processes (deployment manager, node agents, and application servers).

Section 4: Defining WebSphere administrative console users


When WebSphere Application Server is installed and profiles are created, administrative
security is enabled by default. Initially, the only user that has access to the administrative
console is the primary user that is specified during the profile creation. In these exercises,
that would be the wasadmin user. So initially, in the case of these labs, the only user that
can access the administrative console is wasadmin.
In a real environment, it is desirable to have multiple administrative users and possibly
have different rights for each user.
This section of the lab creates users and maps them to different levels of console access.
__ 1. Create WebSphere users for testing purposes.
__ a. In the administrative console, expand Users and Groups and click Manage
Users.
__ b. Leave the defaults and click Search. This search provides a list of current
WebSphere administrative users.

__ c. The wasadmin user was created during the profile creation, and the busUser
user was created in a previous exercise. To create more users for this lab, click
Create.

14-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
Other users might also exist, depending on which exercises are already completed.

__ d. Enter the User ID: wasadm


You can enter anything for the First name and Last name. Enter web1sphere
for the Password and Confirm password. Finally, click Create.

__ e. Click Create Like to create more users. Repeat this process for the following
additional user IDs:
wascfg
wasmon
wasoper
Again, enter anything for the First name and Last name, but use web1sphere for
the passwords.
__ f.

Click Close when you complete the last user.


Information

These user IDs are being created inside of the WebSphere file-based user repository, not
in the local operating system user registry or in LDAP.

__ 2. Map these new user IDs to their appropriate administrative console roles.
__ a. Under Users and Groups in the administrative console, select Administrative
user roles.
Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-5

Student Exercises

__ b. Click Add.

Information
Notice that the wasadmin entry listed is mapped to Primary administrative user name.
This mapping means that it is the security user that is defined during the profile creation. As
such, it has implicit mappings to all security roles.

__ c. Click Search to view the list of available users. Select wasadm from the
Available column near the bottom of the screen and click the right arrow to
move it to the Mapped to role column. Next, select the Administrator role near

14-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

the top of the screen. Click OK to create the mapping between the wasadm user
and the Administrator role.

Information
Depending on what components are installed, there can be more roles within the list.
Depending on which labs are completed, your list of users might be different from the
screen capture that is shown.

__ d. Repeat these last two steps for wasoper, wascfg, and wasmon (mapping each
user to the appropriate role).

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-7

Student Exercises

__ 3. When all four users are mapped, save the changes.

__ a. In the administrative console, click System administration > Save changes to


the master repository.
__ b. Click Save.
__ c. Select System administration > Nodes, and select nodes was8host01Node01
and was8host01Node02. Click Full Resynchronize.
Information
Since these particular users are stored within the WebSphere configuration information, it
is a good idea to do a full resynchronize with the nodes after creating new users.

__ 4. Extra credit (optional): Go back and add a console user that is called wassecmgr
and map it to the Admin Security Manager role.
This user can now be used to map security roles for console users. The only user
that has this ability so far would be wasadmin because it is the primary user (and
therefore has this ability implicitly).

Section 5: Authenticate to the WebSphere administrative console and


test mapped users
In this section of the lab, access to the console is granted to only correctly mapped users.
And depending on the role to which they are mapped, the administrative console allows
those users to use only certain functions.

14-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
By default, the user that is used to define the authentication mechanism has implicit access
as an administrator role.

__ 1. Start a new browser and log in to the administrative console.


__ a. Log in as wasadm

__ 2. Verify that full access to administrative functions is available.


__ a. Check the functions available by clicking Applications > Application Types >
WebSphere enterprise applications.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-9

Student Exercises

__ b. Notice that all standard functions are available.

__ 3. Now verify the available functions for other users.


__ a. Log out from the administrative console.

__ b. Log back in to the administrative console as wasoper, and notice what functions
are available on the Enterprise applications.

__ c. Notice that not all the same functions are available. Now, only Start, Stop, and
Rollout Update are available.
__ 4. Log in as wascfg and wasmon and notice what functions are available.
__ 5. Close all web browsers. Closing the browsers ensures that there are no existing
session cookies when starting the next section of the exercise.
14-10 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Section 6: Enabling fine-grained control


Now that users with different types of access to the administrative console exist, it might be
interesting to control the access more specifically. For example, in the following example
the exercise creates two new administrative users. The first (PlantsAppAdmin) is
configured to have rights on only the PlantsByWebSphere application. The second
(DefaultAppAdmin) is configured to have rights on only the DefaultApplication.
By creating this setup, the exercise demonstrates how fine-grained access controls can be
granted to administrative users. These types of controls can be granted on many different
types of objects, not just applications.
The fine-grained access is defined by mapping administrative authorization groups to
administrative console users. The administrative authorization groups point at specific
scopes or objects. When an administrative user attempts to access an object, and does not
have global access, the access that the administrative authorization groups define for the
object is checked.
The users that have fine-grained administrative access require a minimum of global
Monitor access.
__ 1. As in the previous section of this exercise, create two new users (PlantsAppAdmin
and DefaultAppAdmin) and map them to the monitor role.
__ a. Ensure that you are logged in to the administrative console with a user that gives
you Admin Security Manager role access (this role provides permission to map
console roles for console users and groups), like wasadmin. Since wasadmin is
the primary user, it has Admin Security Manager access implicitly.

__ b. In the administrative console, expand Users and Groups in the left navigation
menu and select Manage Users.
__ c. Leave the defaults and click Search. The list of current WebSphere
administrative users is displayed. Click Create.
__ d. Enter the user ID: PlantsAppAdmin
Enter anything for the First name and Last name. Enter web1sphere for the
Password and Confirm password. Next, click Create.
__ e. Repeat this process to create the DefaultAppAdmin user.
__ 2. Map the two new users to the global monitor role. Any console user or group that is
used for fine-grained access requires a minimum role mapping of monitor. This
requirement means that they can view any objects, but can have more rights on
specific objects that administrative authorization groups define.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-11

Student Exercises

__ a. Under Users and Groups in the administrative console, select Administrative


user roles. Click Add.
__ b. Click Search to view the list of available users. Select both PlantsAppAdmin
and DefaultAppAdmin (hold down the control key to multi-select) from the
Available column and click the right arrow to move them to the Mapped to role
column. Select the Monitor role near the top of the screen and click OK.
__ c. Save the changes. Wait for the nodes to synchronize and click OK.

__ 3. Create the administrative authorization groups for the PlantsAppGroup and


DefaultAppGroup.
__ a. In the administrative console, click Security > Administrative Authorization
Groups.

14-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click New to create the authorization group.

__ c. Enter PlantsAppGroup for the Name.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-13

Student Exercises

__ d. Under Resources, expand all the entries and the subentries. Take note of all of
the different levels that can be defined in an administrative authorization group.
Expand Applications; select the box next to PlantsByWebSphere.

__ e. Click Apply.
__ f.

On the right, under Additional Properties, click Administrative user roles.

14-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Information
In some cases, the Additional Properties are not rendered, and a browser refresh does
not seem to solve the problem. In such cases, try:
Save the changes, go back through Security > Administrative Authorization
Groups, and click PlantsAppGroup.
Close the console browser and start a new console window in a new browser.

__ g. Click Add to map the administrative console PlantsAppAdmin user.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-15

Student Exercises

__ h. Select the Administrator role and then click Search to show all known users.
Select PlantsAppAdmin and then click the right arrow to move the user from
the Available column to the Mapped to role column.

__ i.

Click OK.

__ j.

Save the changes and make sure that the nodes are synchronized.

__ k. Repeat these steps to create the DefaultAppGroup and map


DefaultAppAdmin to the Default Application. Start by clicking Security >
Administrative Authorization Groups and clicking New.

14-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ l.

Save the changes. Wait for the nodes to synchronize and click OK. The final list
looks like:

Information
There are now two new administrative users, which are called PlantsAppAdmin and
DefaultAppAdmin. Both have Monitor access to the cell. This means that using the
console, they can view the contents of the cell, but they cannot modify anything.
Additionally, there are two new Administrative Authorization Groups that are called
PlantsAppGroup and DefaultAppGroup, scoped at the PlantsByWebSphere and
DefaultApplication applications. These groups define what other administrative rights can
be available for those two applications.
Finally, the PlantsAppAdmin user is mapped to PlantsAppGroup, and the
DefaultAppAdmin user is mapped to DefaultAppGroup.
The result is that these two new users have Monitor access to everything in cell.
Additionally, they also have Administrative rights, but only to their specific applications.

Section 7: Test the fine-grained access


Now that the new administrative console users are created, and the administrative
authorization groups are added and mapped to the applications, access by the users to the
applications needs to be verified.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-17

Student Exercises

__ 1. Open a new administrative console window and log in as: PlantsAppAdmin

__ 2. When logged in, browse through various parts of the console. Notice that the
PlantsAppAdmin user has only monitor rights to most areas. But, also notice that

14-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

the PlantsAppAdmin user has complete administrator rights to only the


PlantsByWebSphere enterprise application.

__ 3. Log out of the administrative console, and log in again as DefaultAppAdmin


__ 4. Again, browse through various parts of the administrative console and notice that
this user has Monitor access only. Go to the enterprise application list and notice

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-19

Student Exercises

that this user has administrative access to the DefaultApplication, but not to anything
else.

Section 8: Look at security domains


In the previous section, fine-grained access control was configured, thus allowing
administrators the ability better control over which administrators have access to which
portions of a cell.
Security domains, however, allow administrators to define alternative security
configurations for a cell. Historically, security configurations were defined only at a cell
level. This restriction meant that if something like a user registry was defined within a cell, it
applied to the whole cell. There was no ability to define an alternative configuration for
specific sections of a cell. This ability is what security domains allow.
This section takes a quick look at how to use security domains to create alternative security
configurations.
__ 1. Define a new security domain.
__ a. Use the wasadmin account to access the administrative console.

14-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Browse to Security > Security domains.

__ c. Click New to create a security domain and name it: PlantsSecurityDomain


Click OK.

__ d. Click PlantsSecurityDomain to access the details.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-21

Student Exercises

__ 2. Define the security domain details by associating a scope with specific security
attributes.
__ a. There are two main sections on this screen. The first is the Assigned Scopes.
Expand the Cell and then the Clusters.

Information
Security domains allow you to assign security configurations to defined portions of a cell.
By assigning the scope, you are defining which portion of the cell is affected.

__ b. Select PlantsCluster.
__ c. Explore the other available scopes.
__ d. Move down to the Security Attributes section of the screen and explore the
various security attributes that are available to associate with the previously
selected scope.

14-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Expand the Application Security section. Notice that it is possible to enable


Application Security for only the selected scope (in this case, server1).

__ f.

Expand the Java 2 Security section. Notice that it is possible to enable Java 2
Security for only the selected scope.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-23

Student Exercises

__ g. Expand the User Realm section. Notice that it is possible to define an alternative
user registry for only selected scopes.

__ 3. Cancel the security domain settings. The intention of this section was to show what
some of the possibilities are for security domains and not to actually create one.
Cancel the changes if you did not yet save.
__ a. Click Cancel if available.
__ b. At the top of the next screen, you have the opportunity to Save the changes.
Instead, click Review.
__ c. To ensure that no changes are saved, click Discard and click Yes to confirm.
__ d. Finally, click OK to complete the process of dismissing the changes.
__ 4. Log out of any administrative console windows and close all browsers.

End of exercise

14-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


The exercise looked at setting up security for accessing the administrative console. You set
up this security by creating new administrative console users and mapping them to global
access roles. Then, you mapped two new console users to administrative authorization
groups to create fine-grained access to the PlantsByWebSphere Application and the
DefaultApplication.
Finally, you explored the process of creating security domains.

Copyright IBM Corp. 2012

Exercise 14. Configuring WebSphere security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

14-25

Student Exercises

14-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 15.Configuring application security


What this exercise is about
This exercise uses WebSphere application security to secure the
administration module of the PlantsByWebSphere application. The
application is tested with application security enabled. An explanation,
through exploration of configuring application security in IBM
Assembly and Deploy Tools, is also provided.

What you should be able to do


At the end of the exercise, you should be able to:
Define Java EE security roles
Define access for resources in an application
Enable and verify application security

Introduction
This lab deals with using the administrative console and the IBM
Assembly and Deploy Tools to configure application security for the
PlantsByWebSphere application.

Requirements
This exercise requires a workstation with WebSphere Application
Server V8 installed and completion of the previous exercises.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-1

Student Exercises

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Enabling application security


In a previous exercise, administrative security was configured. This exercise enables and
configures application security. The application security allows WebSphere to provide
authentication and authorization for the enterprise applications. So, unlike administrative
security (which secures the administrative interfaces), application security controls who has
access to which parts of the enterprise applications that run within the application servers.
In this section of the lab, WebSphere application security is enabled through the
administrative console.
__ 1. Configure the application security setting.
__ a. Make sure that you are logged in to the administrative console with a user that
gives you administrator privileges, such as wasadmin or wasadm
__ b. Click Security > Global security.

15-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Check the box next to Enable application security and click Apply.

Information
WebSphere administration security is already enabled during profile creation. All that is
being done is the enabling of application security. As such, there is no need to define user
registries or authentication mechanisms.

__ d. Save the changes and make sure to synchronize the nodes.


__ 2. Restart all WebSphere Application Server processes.
__ a. Using the administrative console, select Servers > Clusters > WebSphere
Application Server clusters.
__ b. Select the PlantsCluster and click Ripplestart.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-3

Student Exercises

Information
In older versions of WebSphere, all processes within the cell required a restart. Because
global security is already enabled at profile creation time, the inclusion of application
security only required the restarting of the application servers.

Section 4: Securing the PlantsByWebSphere application


When running with application security enabled, enterprise applications can take
advantage of role-based application security to restrict access to servlet and EJB
resources. The PlantsByWebSphere application administration module is already
configured to take advantage of application security by having a security role that is called
SampAdmin and mapping to the administration module. All that the administrator still
needs to do is to map the SampAdmin security role to the users or groups that exist in the
runtime environment.
Information
Java 2 security can also be used to provide fine-grained access to system resources,
such as ports, sockets, and file systems. Java 2 security is orthogonal to J2EE or Java EE
security and does not require the enforcement of administrative security. In this exercise,
you do not use Java 2 security.

__ 1. Create a user named PlantsUser to use for application authentication.


__ a. In the administrative console, expand Users and Groups and click Manage
Users.
__ b. Leave the defaults and click Search. This search displays the list of current
administrative users.
__ c. Click Create.

15-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Enter the User ID: PlantsUser


Enter anything for the First name and Last name. Enter web1sphere for the
Password and Confirm password fields and click Create.

__ e. Click Close.
__ 2. Test the application before mapping the roles to users and groups.
__ a. Close all of your current browser windows.
__ b. With all the servers up and running, use a new browser to access the admin
servlet by going to the following address:
http://localhost:9080/PlantsByWebSphere/admin.html
You can also access this servlet by going to the PlantsByWebSphere home
page and clicking the Help link. From there, you can click Admin Home.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-5

Student Exercises

Important
Existing browsers might already have authentication information for connection to the
administrative console, which can interfere with attempts to log in to the
PlantsByWebSphere application.
To solve this problem, either close all current browser windows or clear the current browser
information. To clear any authentication in a Firefox window, try selecting Tools > Clear
Recent History, and click Clear Now.
Other solutions include the use of a second browser type or configuring Firefox profiles.

__ c. You are prompted to authenticate. Attempt to log in using PlantsUser with a


password of web1sphere

__ d. Notice that you are not authorized to access this page (with some browsers, you
might be prompted repeatedly and not get an error). You are not authorized

15-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

because the user PlantsUser does not have access to the PlantsByWebSphere
application.

Information
Note: only the administration part of the application is enabled for security. The rest of the
application can be accessed just as before application security was enabled.

__ 3. Create a registry group and user which can be mapped to the PlantsByWebSphere
application.
Information
It would be easiest to map the application security role to a list of users. However, it is a
much better practice to use a group instead.

__ a. Log back in to a new administrative console window and expand Users and
Groups. Click Manage Groups.
__ b. Click Search. This search displays the list of current WebSphere administrative
groups. You can see that there are not any groups yet.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-7

Student Exercises

__ c. Click Create. Enter PlantsGroup for the Group name and anything for the
Description. Click Create.

__ d. Click Close.
__ e. Click PlantsGroup.

15-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Click the Members tab.

__ g. Click Add Users.


__ h. On the next screen, click Search. The result shows the list of known users.

__ i.

Select PlantsUser and click Add.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-9

Student Exercises

__ j.

Click Close to verify that the PlantsUser is added to the PlantsGroup.


Information

You created a user called PlantsUser. This user is added to the newly created
PlantsGroup.
Next, you map the PlantsGroup to the PlantsByWebSphere application, thus granting any
members of the PlantsGroup access to the restricted parts of the Plants application.

__ 4. Map users and groups to Java EE security roles that are defined within the
enterprise application.
The SampleAdmin role exists inside of PlantsByWebSphere, along with mappings to
various methods. The task now is to allow the runtime environment to be aware of
which users or groups are part of that SampAdmin role in your particular
environment.
__ a. Click Applications > Application Types > WebSphere enterprise
applications.
__ b. Click the PlantsByWebSphere application link.

15-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Under Detail Properties, click Security role to user/group mapping. Note:


currently, there are no users or groups that are mapped to the SampAdmin
security role.

Information
There are four types of users: Everyone, All authenticated, Mapped users, and Mapped
groups. The first two do not apply to this exercise as you do not want Everyone to access
the administration module; and since there was no previous opportunity to authenticate,
that rules out All authenticated.
The mapped entries refer to users and groups in the current user registry.

__ d. Select the SampAdmin role and click Map Groups.

__ e. Make sure that the Search String is * and click Search. The Available list fills
up with the group defined within the WebSphere user registry.
Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-11

Student Exercises

__ f.

Select PlantsGroup and click the right arrow to move the entry to the Selected
list.

__ g. Click OK.

15-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ h. Click OK again. (Note: The changes do not get set until the second OK.)
__ i.

Save the changes.

__ 5. Ensure that the nodes are fully synchronized.


__ a. Click System administration > Nodes.
__ b. Select both the nodes in the cluster and click Full Resynchronize.

__ 6. Close all web browser windows. Open a new web browser to access the admin
servlet.
__ a. Close the existing browsers.
__ b. Open a new browser (or clear all state information for the existing browser).
Information
It is also possible to clear any authentication in the browser. To clear authentication in a
Firefox window, select Tools > Clear Recent History and click Clear Now.

__ c. Access the PlantsByWebSphere admin servlet page through the Help > Admin
Home link or though the following URL:
http://localhost:9080/PlantsByWebSphere/admin.html
__ 7. Log in using PlantsUser and web1sphere

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-13

Student Exercises

Warning
By default, the application server has a 10-minute authentication cache timeout. Therefore,
if information is still cached, it might not time out for up to 10 minutes.
If this possibility is a problem, you can either wait until the timeout happens or restart the
application server.
To view you security authentication timeout settings, go to Security > Global security >
Authentication cache settings (which is under Authentication mechanisms).

__ 8. This time, you are authenticated properly and allowed access.

__ 9. Click Supplier Configuration to explore further.

15-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 10. Click the Home link to return to the main part of the PlantsByWebSphere
application.
__ 11. Disable application security.
__ a. Return to the global security screen in the administrative console and clear the
box next to Enable application security.
__ b. Click Apply, and Save the changes.
__ c. Synchronize the nodes.
__ d. Restart the application servers.

Section 5: How does it work? (optional - read only)


To complete this part of the exercise, you need to start the assembly and deploy tool to the
workspace you created earlier in this class. The assembly and deploy tool is used to
explore the EAR file to explore how security is configured.
Instruction on using the assembly and deploy tool itself is short and to the point; you are
already familiar with the assembly and deploy tool from previous exercises.
The assembly and deploy tool is not available on AIX, so these instructions describe the
steps that are taken on a Windows system.
__ 1. Start the assembly and deploy tool and point it to a new workspace where you
explore the security attributes.
__ a. To start IBM Assembly and Deploy Tools, use Start > Programs > IBM
Software Delivery Platform > IBM Assembly and Deploy Tools for
WebSphere Administration 8.0 > IBM Assembly and Deploy Tools for
WebSphere Administration.
__ b. When prompted for a workspace, enter:
C:\temp\security-workspace

__ c. Click OK.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-15

Student Exercises

__ 2. Import the PlantsByWebSphere EAR.


__ a. Click File > Import > Java EE > EAR file.
__ b. Click Next.
__ c. Browse to C:\software\ears\EnhancedPlantsByWebSphere.ear.
__ d. Click OK.
__ e. Click Finish.
__ 3. Switch to the Java EE perspective, if it is not already set.

__ 4. The first interesting questions on your mind probably are: Why does browsing to the
Admin Actions page (/adminactions.html) cause an authentication challenge, and
how does the application know what challenge type to use?
__ a. If there are warnings and errors, do not worry, as you are exploring only the
contents of the EAR.
__ b. In the Enterprise Explorer, expand PlantsByWebSphereWeb > WebContent >
WEB-INF. Double-click web.xml, which represents the deployment descriptor.
The Web Application Deployment Descriptor Editor for this module opens on the
editor pane on the upper right corner of the window.

15-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Double-click the web.xml tab to maximize the Web Application Deployment


Descriptor Editor. Maximizing the editor allows you to view the web application
structure more easily.

Click Login Configuration in the web application structure.

You might see errors that are detected at the top of the page. These errors can be
ignored.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-17

Student Exercises

Note
The Authentication Method is set to BASIC. This setting means that when authentication is
needed for a page, the browser is sent a message to challenge the user with a basic
authentication dialog box. Perhaps a better alternative is to use a FORM-based challenge.
This alternative allows the developer to specify a specific form-based login page that is
used to challenge the user.

When a non-authenticated user accesses a protected resource, WebSphere


Application Server presents the login challenge instead of the requested resource. After
successful authentication, the originally requested resource is served.
__ 5. The next question is: How are resources protected or secured?
__ a. Click Security Constraint in the web application structure of the editor.

Notice the role name SampAdmin in the Authorization Constraint area.

15-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Click the Web Resource Collection (under Security Constraint) in the web
application structure of the editor.

In the Details section of the Web Resource Collection, you see a set of HTTP
access methods and URL patterns, which can be assigned to an Authorized role.

In this case, you see that one of the URL patterns is /adminactions.html.
Information
What are you seeing here?
The /adminactions.html URL pattern is associated with both a web module
(PlantsByWebSphereWeb) and a security role (SampAdmin). You also see that a basic
login type is associated with the web module. But how does the login type translate to the
application security?
The answer to that question is all in the WebSphere runtime environment. When a user
attempts to access a protected URL (in this case, /adminactions.html), the runtime
environment interrupts the process to verify that the user has the required authority to
proceed. In this case, users (PlantsUser) must be authenticated (a basic authentication
Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-19

Student Exercises

challenge is issued if a user is not already authenticated) and their user ID needs to be
mapped to the security role (SampAdmin). In this case, the user PlantsUser is part of the
PlantsGroup, which in turn is mapped to the SampAdmin role.
If initial authentication is unsuccessful, users do not gain access to the URL and are
instead returned a message which indicates that they were unable to authenticate.
If the authentication is successful, but the users are not mapped to the security role (either
directly or through a group), the users again do not gain access to the URL. Instead, the
users are returned a message which indicates that they are not authorized to access the
URL.

__ 6. Close IBM Assembly and Deploy Tools when you finish exploring.

End of exercise

15-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


The first part of the exercise looked at setting up security for accessing the WebSphere
administrative console. Then, application security was enabled and access to the
PLantsByWebSphere application was tested.
Finally, an explanation of how Java EE security is configured in the assembly and deploy
tool was presented.

Copyright IBM Corp. 2012

Exercise 15. Configuring application security


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

15-21

Student Exercises

15-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 16.Configuring SSL for WebSphere


What this exercise is about
This exercise explores some of the features and configurations within
the WebSphere SSL environment. It creates a profile and then
examines the certificates that are created specifically for the node
within the profile. It then explores some of the administration tasks that
are required for managing the certificates within a cell.
Finally, in an optional part of the exercise, the IBM HTTP Server is
configured to use a self-signed certificate to secure the
communications between a browser and the web server.

What you should be able to do


At the end of the lab, you should be able to:
Identify the SSL settings for WebSphere Application Server
Configure a web server to use SSL
Generate a security report from the administrative console

Introduction
WebSphere Application Server V8 configures and manages many of
the SSL configurations that are required to secure communication
within a cell. It is important to understand how this infrastructure works
so that it can be maintained correctly. This exercise creates a profile
and examines the certificates and keystores that are created for that
new profile or node. The exercise then looks at the interfaces that deal
with expiring certificates. It also examines the log files and security
reports that are helpful in tracking when certificates are about to
expire.
Another important step in managing a WebSphere environment is
propagating keystores out to the web server plug-in. This lab goes
through the steps to view the plug-in generated keystore, followed by
propagating them out to the web server.
As an optional part of the lab, the last section configures the IBM
HTTP Server for inbound SSL. iKeyman is used to generate a new
keystore and self-signed certificate. IBM HTTP Server is then
configured to use the newly created certificate to support HTTPS
communications.
Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-1

Student Exercises

Requirements
This lab requires a computer that is properly set up with WebSphere
Application Server V8 installed, IBM HTTP Server installed, and the
necessary startup and program files.

16-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Section 1: Resetting the WebSphere environment
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Section 3: Create a backup


Since this exercise changes the existing environment which, if done incorrectly, can cause
problems for the rest of the exercises, doing a backup is a good idea.
__ 1. Create a backup for the deployment manager.
__ a. In a terminal window, browse to the <profile_root>/Dmgr/bin directory.
__ b. Stop the deployment manager process if it is running by issuing the following
command:
./stopManager.sh -username wasadmin -password web1sphere
Note
Do not be concerned if your display differs slightly from the screen captures that are shown
in your exercise book. Most of the screen captures were taken from a Linux system and will
therefore have minor differences in appearance.
One noticeable difference is the root directory for the application server. In the Linux screen
captures, the directories typically start with /opt. On your AIX systems, the equivalent
directories start with /usr.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-3

Student Exercises

__ c. When the deployment manager is stopped, issue the following command to back
up the entire profile:
./manageprofiles.sh -backupProfile -profileName Dmgr -backupFile
/usr/software/backups/pre-SSL.zip

Section 4: Create a profile


To better understand the various pieces of the SSL puzzle within the WebSphere
Application Server environment, a new custom profile is created. Creating a custom profile
helps demonstrate how and where the various keystores and certificates are managed.
__ 1. Restart the deployment manager.
__ a. From a command window, in the bin directory for the deployment manager,
issue the ./startManager.sh command.
__ 2. Create a custom profile named SSL and federate it to the deployment manager.
__ a. Start the Profile management tool by issuing the following command in a terminal
window:
/usr/IBM/WebSphere/AppServer/bin/ProfileManagement/pmt.sh
__ b. The WebSphere Customization Toolbox 8.0 window starts. Click Create on
the right to create a profile.
__ c. Select the Custom profile option and click Next.
__ d. On the Profile Creation Options page, select Advanced profile creation and
click Next.

16-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. For the profile name and location, enter: SSL and <profile_root>/SSL
Click Next.

__ f.

On the Node name and Host name screen, verify that the values are
was8host01Node03 and was8host01. Click Next.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-5

Student Exercises

__ g. On the Federation window, enter was8host01 for the deployment manager host
name. The default SOAP port (8879) is shown. Enter wasadmin for the security
user name and web1sphere for the password. Be sure that the Federate this
node later option is not selected. The node is automatically federated to the cell
during creation. Click Next.

__ h. On the next screen, accept the defaults for creating the default personal
certificate and a new root signing certificate. Click Next.

16-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ i.

The next screen specifies the node certificate information. Accept the defaults
and click Next. Make sure to read the information block, as it explains the
importance of these entries and how they relate to SSL.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-7

Student Exercises

Information
Unlike in older versions of WebSphere Application Server, each node (or profile) no longer
gets a single self-signed certificate. Instead, as of WebSphere Application Server V7, two
certificates are created. The first one is the node personal certificate that is used by
default for secured communication with the node and any application servers on that node.
This personal certificate has a default life span of one year. This certificate is not a
self-signed certificate. Instead, the second certificate that is specified on this screen signs
it. The second certificate is the root certificate. This relationship is called a chained
certificate.
Unlike the node personal certificate, the root certificate has a default life span of 15 years.
This longer life span helps when the personal certificate is renewed as it gets close to its
expiration date. The same root certificate (which has a 15-year life span instead of just one
year) signs all of the personal certificates (old and new). Therefore, any processes that
need to communicate securely with the node agent or application servers already have
access to a valid copy of the node root signer certificate. This condition is true regardless of
whether the personal certificates are updated.
This model helps solve some of the certificate propagation problems since updating
personal certificates no longer requires any certificate propagation to occur.
As background, signer certificate propagation within a cell is accomplished through
standard node synchronization. All of the node signer certificates are included in the cell
default truststore file, which is synchronized throughout the cell. Propagation to the web
server plug-in, however, is more tricky.
In order for the plug-in to be able to communicate securely with the application servers, the
plug-in needs access to the appropriate signer certificates. The root signer certificates are
made available to the plug-in through their generated key rings. Since the root certificates
are now being used as the signers, updating expiring personal certificates is no longer a
problem.
Note: the keystore password default is: WebAS

__ j.

Accept the default ports on the next screen. Click Next.

__ k. On the summary screen, click Create.


__ l.

The profile creation is now complete. Clear the check box for Launch the First
steps console and click Finish.

__ m. Close the Profile Management Tool.


__ 3. Verify the new node in the administrative console.
__ a. Open an instance of the administrative console and log in to the deployment
manager by using wasadmin with the password web1sphere

16-8 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Go to System administration > Nodes and verify that this new node
(was8host01Node03) now exists.
__ c. Stop the node agent for node was8host01Node03. Since the node agent does
not need to be running for this exercise, select the node and click Stop (this
action helps free up some of the system resources).

Section 5: Examine the node certificates


This new node has a couple of certificates that are associated with it. This section of the
exercise uses the administrative console to examine them.
__ 1. Examine the node certificates.
__ a. In the administrative console, browse to Security > SSL certificate and key
management.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-9

Student Exercises

__ b. On the right side, under Related Items, click Key stores and certificates.

16-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. This screen shows a list of the keystores and trust files for the cell. Click the
keystore link for the node that was created (was8host01Node03) earlier in this
exercise.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-11

Student Exercises

__ d. The next screen shows the basic information for the node keystore. On the right,
under Additional Properties, click Personal certificates.

__ e. This screen shows the keystore entries for the node that was created. Notice
there are two chained certificates. The first, whose alias is default, is the
personal certificate for the new node. Notice that it is set to expire in one year.
The second is the root certificate for the new node, which expires in 15 years.
Note the Serial Number for the root certificate (Serial #:__________________ )
and Expiration date (Date: ________________ ).

16-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ f.

Tracking the serial numbers can be helpful. In other parts of the administrative
console, the representation of the certificates can change. To tell which
certificate is which, knowing the serial number can be helpful. Click the alias
default for further information. Also, take note of the Fingerprint. Usually
knowing just the last couple of bits is sufficient: __________________ (5C:40)

__ g. Using the breadcrumb trail, return to the NodeDefaultKeyStore.


__ h. Next, click the Signer certificates link. Notice that none are listed (signers are
stored in the truststore files while personal certificates are stored in keystores).
__ 2. Examine the cell signer certificates.
__ a. Using the breadcrumb trail, return to the Key stores and certificates.
__ b. Click the CellDefaultTrustStore. This file includes all of the signer certificates
within the cell.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-13

Student Exercises

__ c. On the right, under Additional Properties, click Signer certificates.

__ d. Notice a root signer certificate in the cell default truststore. Specifically, this
certificate is the cell root signer certificate (not the personal certificate), and is the
signer for all of the node certificates in the cell. Notice that it has a 15-year life
span.

16-14 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Click root for the details.

__ f.

Notice that the Serial number matches the serial number from the previous step
where you noted the information for the root certificate. This match verifies the
fact that the signer certificate for the root certificate is indeed added to the cell
default truststore. And since the cell default truststore is synchronized to all
nodes within a cell, all nodes and all application servers have access to the cell
root signer certificate.
The plug-in also needs the cell root signer certificate so that it can communicate
securely with the application servers. That subject is covered later in this
exercise.
Take note of the Serial Number and Fingerprint for the root certificate
_________________ (2324). Usually knowing just the last couple of bits is
sufficient: __________________ (01:66).

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-15

Student Exercises

Section 6: Examine certificate expiration and updating


Since the personal certificates have a life span of only one year, administrators need to be
aware that these certificates expire. Fortunately, WebSphere has a built-in mechanism to
automatically renew these certificates when they are about to expire. And, since the signer
certificates remain the same, there is no need to propagate anything new to the remote
nodes or plug-in.
__ 1. Examine the certificate expiration settings.
__ a. In the administrative console, browse to Security > SSL certificate and key
management. Under Configuration settings, click Manage certificate
expiration.

Built into WebSphere is a service that runs through the list of all certificates and
replaces any that are about to expire. This screen configures when that service is
run. It can be run immediately by clicking Start now, or it can be scheduled. The
default is to run on every fourth Sunday at 21:30. This service can be turned off by
clearing the Enable check box. It is also possible to run the checking service but to

16-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

not automatically replace the existing certificates or not delete the replaced expiring
certificates.

By default, the expiration notifications are written to the log file. Additional
notifications, including email, can be configured by clicking the Notifications link
under Related Items.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-17

Student Exercises

Information
The name of the Expiration notification threshold field can be misleading.
When the expiration notification thread is run (either manually or through scheduling), it
checks whether any certificates are within X days (the expiration notification threshold
defines X) of the current date. If there are any, they are subject to replacement.
There is another setting (a custom property) that defines how many days out the
notifications (but not replacement) occur.

__ b. Run the expiration notification service now by clicking Start now. Using a text
editor (such as dtpad), open the SystemOut.log file for the deployment
manager. Near the end of the file, there is an entry that starts with Expiration
Monitor.

__ c. Since the cell is newly created, there are no certificates that need replacement. If
any changes need to be saved, feel free to either save or discard.
__ 2. Use the security report to view the list of all the certificates and their expiration
dates.

16-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ a. In the administrative console, browse to Security > Global security. Click


Security Configuration Report.

__ b. A new browser window shows the HTML report. Scroll to the bottom of the report
and find the Certificate Management section.

__ c. Notice the list of the certificates and the expiration dates. This report can be a
helpful tool for administrators in dealing with their certificate management.
__ d. Close the security report window.

Section 7: Plug-in key ring propagation


Not only do the processes within cells (deployment managers, node agents, and
application servers) need to have certificates and know about the signer certificates for
each other, so do the web server plug-ins. If the communication between the web server
plug-ins and the application servers needs to be secure, the plug-ins and application
servers need to be able to negotiate an SSL session. To achieve this ability, they need to
have personal certificates (by default the application servers use the node personal
certificate) and have access to signer certificates for each other.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-19

Student Exercises

WebSphere is able to make sure that all of the required certificates are available to the web
server plug-in by creating the plug-in keystores from within WebSphere. By doing so,
WebSphere can make sure that not only does the plug-in have a valid personal certificate,
but that it also has the necessary cell root signer certificate. At the same time, WebSphere
can ensure that the plug-in signer certificate is also available in the cell truststore.
The real problem with this approach is that when WebSphere generates the plug-in
keystore, it then still needs to be propagated to the host that runs the web server. The
propagation process of plug-in keystores is similar to the propagation of the
plugin-cfg.xml file. Most of the time it is done manually, but in some cases it can be
configured to be done automatically (generally not desirable).
__ 1. View the contents of the plug-in keystore.
__ a. In the administrative console, browse to Servers > Server Types > Web
servers. Click your web server link (webserver1). Then, under Additional
Properties, click Plug-in properties.

16-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ b. Notice the plug-in keystore file name. Initially this file can be found within the
configuration directory structure of the deployment manager. It can be found
under the ihsnode directory. More specifically, the directory is:
<profile_root>/Dmgr/config/cells/<cell-name>/
nodes/ihsnode/servers/<web-server>
This directory is also the same directory where the web server-specific version of
the plugin-cfg.xml file exists.

__ c. Take note of the size of the file.


__ d. Next, examine the contents of this file. In the console, click Manage keys and
certificates. On the right, click Signer certificates.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-21

Student Exercises

__ e. There are a number of signer certificates. Verify that the cell root signer
certificate is among the list. Notice that the fingerprint matches what was seen
previously in this exercise.

Information
Seeing the cell root signer certificate validates the fact that WebSphere generated the
keystore for the plug-in and included the cell root certificate signer. In this case, the root
signer certificate is the one that ends with a fingerprint of 01:66.

__ 2. Propagate the plug-in keystore file. Although propagation is usually a manual


process, there are some cases where it can be configured to be done automatically
or through the administrative console.
__ a. Using a terminal window, browse to the
/usr/IBM/WebSphere/Plugins/config/webserver1 directory. Take note of the

16-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

size and date-time stamp for the current plugin-key.kdb


(_____________________________________).

__ b. Return to the administrative console and return to the web server plug-in
properties page. Click Copy to web server key store directory.
__ c. Notice the message at the top of the administrative console window shows a
successful copying of the files:

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-23

Student Exercises

__ d. Return to the Explorer window and verify that the size of the file (and the
date-time stamp) is changed. This information validates that the propagation did
occur.

__ 3. If you have extra time, use iKeyman to open the .kdb file on the web server host
and verify that the new signer certificate was propagated.

Section 8: Configuring SSL for IBM HTTP Server (optional)


This section of the lab steps through the process of creating a certificate and a key ring for
the web server. These artifacts are used to configure SSL on the connection between the
client browser and the web server.
__ 1. Create a directory to hold the key ring.
__ a. Using the mkdir command, create the directory ssl in /usr/IBM/HTTPServer.

__ 2. Create a key ring with a self-signed certificate for IBM HTTP Server.
__ a. Run the iKeyman for IBM HTTP Server by issuing the following command:
/usr/IBM/HTTPServer/bin/ikeyman
__ b. Create a new key ring by selecting Key Database File > New.

16-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Use type CMS, file name ihsKeyring.kdb, and a location of


/usr/IBM/HTTPServer/ssl. Click OK.

__ d. When prompted for a password for the key ring, enter and confirm web1sphere
as the password. If wanted, modify the expiration time. Check the Stash the
password to a file check box.

Warning
The stash file is created containing an encoded form of the password. This encoding
prevents casual viewing of the password, but is not highly secure. Therefore, you must
protect this file by using operating system file permissions to prevent all access from
unauthorized principals.
The file name of the stash file is the same as the name of the key file, only it has an .sth
suffix. The stash file gets stored in the same directory as the key file.

__ e. Click OK.
__ 3. Create a new self-signed certificate.
__ a. In iKeyman, select Create > New Self-Signed Certificate and enter the
following information:
Table 11: Self-signed certificate details
Example
Description
Key label
ihsCertificate
Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-25

Student Exercises

Table 11: Self-signed certificate details


Example
Description
Common name
www.plants.ibm.com
Organization
plants
Organization unit
plants
Locality
myLocation
State or province
myState
Zip code
myZipcode
__ b. Accept the defaults for the Version, Key Size, and Validity Period.

__ c. Click OK.
Information
This stores the certificate in the key file in the Personal Certificates section. Optionally, it
is possible to extract the public signing certificate so that clients can use it (in the exercise,
there is no need to do this extraction). To extract the public signing certificate, click Extract

16-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Certificate, and then enter: File Name and Location


Click OK.

__ d. Exit iKeyman by going to Key Database File > Exit.


__ e. Check the contents of the /usr/IBM/HTTPServer/ssl/ directory and verify that
the following files were created: ihsKeyring.kdb, ihsKeyring.sth, and
ihsKeyring.rdb.
__ 4. Configure IBM HTTP Server for HTTPS. This configuration requires modifying the
httpd.conf file to define the required setting to enable SSL for IBM HTTP Server. It
also includes loading the SSL module, defining a listener port, defining a virtual host,
and enabling SSL.
__ a. Add www.plants.ibm.com to the hosts file by editing the file /etc/hosts and
adding a line at the bottom to define the host name www.plants.ibm.com, and
map it to the IP address for your system. You can find your IP address by using
the command ifconfig -a in a command window (note: if your IP address is
already listed in your /etc/hosts file, then add www.plants.ibm.com to that
existing definition).

__ b. Save and exit the file.


__ c. Confirm that you can reach www.plants.ibm.com by using the following
command in a command window:
ping -c 4 www.plants.ibm.com
__ d. Back up the httpd.conf file. Since the httpd.conf file is about to undergo
changes, it is a good idea to make a backup before starting. Copy the
httpd.conf file in /usr/IBM/HTTPServer/conf to httpd-backup.conf.
__ e. Using a text editor, open httpd.conf in /usr/IBM/HTTPServer/conf. Add a
virtual host definition for HTTPS, which allows for the definition of HTTPS on a

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-27

Student Exercises

separate virtual host from HTTP. Place these lines near the bottom of the
httpd.conf file after the VirtualHost examples and just before the comment #
Enable IBM HTTP Server diagnostics features.
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
Listen 0.0.0.0:443
<VirtualHost www.plants.ibm.com:443>
SSLEnable
</VirtualHost>
KeyFile "/usr/IBM/HTTPServer/ssl/ihsKeyring.kdb"
SSLDisable
Information
There are sample configuration files in /usr/software/ssl/ that can be used to copy and
paste. These files include only this section of a completed httpd.conf file.

__ f.

Save your changes and exit the editor.

Section 9: Testing the SSL connection (optional)


This section requires the completion of the previous section.
__ 1. Restart the IBM HTTP Server process so that the new httpd.conf settings take
effect.
__ a. Using a terminal window, use the following command to restart the web server
process:
/usr/IBM/HTTPServer/bin/apachectl restart
__ b. Verify that the IBM HTTP Server process is running by checking the system
process list for the httpd.exe file. If IBM HTTP Server failed to start, check the
/usr/IBM/HTTPServer/logs/error_log and
/usr/IBM/WebSphere/Plugins/logs/webserver1/http_plugin.log files for
the possible cause.
__ 2. Use HTTPS to connect to IBM HTTP Server.
__ a. First, verify that the web server is actually running. Connect to the following site:

16-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

http://localhost/

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-29

Student Exercises

__ b. Now that the web server is known to be running, enter the following address to
verify that HTTPS is working (note: the only difference is that https replaced
the http protocol): https://localhost/

Why does the https connection to localhost fail? The answer is because the
virtual host definition for the SSL configuration is defined for the host named
www.plants.ibm.com.
__ c. Using the same browser window, go to the following URL:
http://www.plants.ibm.com/

This works since the host name www.plants.ibm.com is mapped to the local
system and there is no https necessary.
__ d. Now that you verified that the new host name works, change the protocol to https
so that the URL is:
https://www.plants.ibm.com/

16-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Assuming that the certificate is not added to the browser key ring, you receive a
certificate warning. (It is happening because the SSL connection is presenting a
self-signed certificate and therefore the browser is unable to validate the signer.)
Accept the security warnings (the interface for doing so depends on which
browser is used).
__ f.

The browser then takes you to the https connection for the web server home
page.

It works as expected because the host name (www.plants.ibm.com) matches


the virtual host in the SSL configuration in the httpd.conf file.
__ 3. Next, connect to the application server by using https.
__ a. Verify that the PlantsCluster is running.
__ b. Using the existing browser, enter the following URL to access the Snoop servlet
(if you are prompted to authenticate, see the following note):
https://www.plants.ibm.com/snoop

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-31

Student Exercises

Note
If application security is still enabled from a previous exercise, you are prompted to enter a
user name and password for the snoop servlet. In this case, any authenticated user has
access. Use PlantsUser and web1sphere to authenticate.

Notice that this action works as expected. If it does not, start by verifying that the
plug-in key ring was propagated (it was done earlier in the exercise) and
checking the plug-in log file for information.
__ c. Finally, use the following URL to access the PlantsByWebSphere application:
https://www.plants.ibm.com/PlantsByWebSphere

End of exercise

16-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise review and wrap-up


This lab introduced basic HTTPS configuration concepts for both IBM HTTP Server and
WebSphere Application Server.

Copyright IBM Corp. 2012

Exercise 16. Configuring SSL for WebSphere


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

16-33

Student Exercises

16-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise 17.Using the performance monitoring


tools
What this exercise is about
In this exercise, you use the performance tools available in
WebSphere Application Server to monitor various application and
server resources in real time, and generate tuning advice for
performance.

What you should be able to do


At the end of the exercise, you should be able to:
Enable different levels of Performance Monitoring Infrastructure
(PMI) statistics for an application server
Use Tivoli Performance Viewer to monitor an application server
Configure user settings for Tivoli Performance Viewer
Examine summary reports and performance modules in Tivoli
Performance Viewer
View performance messages from the Tivoli Performance Viewer
Advisor
Enable and configure the Request Metrics tool
View Request Metrics messages in the standard logs of an
application server
Configure IBM Tivoli Composite Application Manager for
WebSphere Application Server collector for an application server
Use Tivoli Performance Viewer to view IBM Tivoli Composite
Application Manager application performance statistics

Introduction
WebSphere Application Server offers a collection of tools to monitor
and help tune the runtime environment, including Tivoli Performance
Viewer (TPV), the TPV advisor, and Request Metrics.
The Tivoli Performance Viewer is the user interface for monitoring the
performance of application servers, servlets, and other resources in
the environment. It is integrated into the administrative console and
can be used for a number of tasks, including viewing real-time
Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-1

Student Exercises

performance data, gauging the load on servers over time, and


evaluating the efficiency of resource allocations.
The Tivoli Performance Viewer advisor provides advice to help tune
systems for optimal performance and recommendations to remedy
inefficient server resource settings. It generates advice that is based
on data that the Performance Monitoring Infrastructure (PMI) collects.
Request metrics allow you to track the response time of the individual
components that a transaction traverses, providing you with an
in-depth understanding of the application flow that satisfies the user
request.
IBM Tivoli Composite Application Manager (ITCAM) for WebSphere
Application Server is an optional component that you can install during
the installation of WebSphere Application Server or anytime afterward.
ITCAM for WebSphere Application Server monitors the performance
of WebSphere Application Server applications and provides real-time
status information about the health of applications. You can view this
data in the Tivoli Performance Viewer.
The ITCAM for WebSphere Application Server component is
composed of a Data Collector. After you install this component,
configure the Data Collector to a WebSphere Application Server
instance (profile). The Data Collector runs within the same JVM as the
application server and captures information about the running
applications. This Data Collector Configuration tool adds a
Performance Monitoring Infrastructure (PMI) module in the application
server. The data that ITCAM for WebSphere Application Server
provides augments the data that the application server provides
through the existing PMI statistics.

Requirements
This exercise requires at least one application server that runs the
PlantsByWebSphere application and the Default application.

17-2 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Exercise instructions
Preface
In the first part of this exercise, you use Tivoli Performance Viewer to monitor applications
that run on WebSphere Application Server.
When the Performance Viewer is running in a Network Deployment environment, the data
is collected at each of the nodes and stored in memory at the node agent. Data is then
viewed from the deployment manager. With this architecture, the monitoring is distributed
among the nodes.

Section 1: Resetting the environment


In this exercise, you monitor applications that run on the single server in profile1, server1.
Note
If you need to reset your WebSphere environment, then see Appendix A for instructions
on how to correctly reset the environment.

If you changed the maximum heap size for the deployment manager to a lower value to
conserve system resources, you must restore the maximum heap size to the default
setting. More memory is required because the Tivoli Performance Viewer runs inside the
deployment manager.
__ 1. Verify that the deployment manager, the node agent, and WebSphere Application
Server server1 in profile1 are all running.
__ 2. Start an administrative console and make sure that you are logged in as wasadmin
Information
You can stop server2 and its node agent to free up physical memory if the class
environment has limited memory. As a rule of thumb, if your computer has less than 2 GB
of memory, it can be beneficial to run only server1 for this lab.

Section 2: Using your AIX system


Note
Appendix B contains basic information about starting terminal windows and text editors.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-3

Student Exercises

Section 3: Enabling performance monitoring and setting user


preferences
Before the Tivoli Performance Viewer can begin monitoring data, the performance
monitoring service must be started. The monitoring service is turned on by default on the
application server.
__ 1. Verify that the Performance Monitoring Infrastructure (PMI) is turned on for server1.
__ a. In the administrative console navigation tree, click Monitoring and Tuning >
Performance Monitoring Infrastructure (PMI). In the workspace area on the
right pane of the administrative console, click server1.
__ b. On the Configuration tab, make sure that Enable Performance Monitoring
Infrastructure (PMI) is already selected. In the Currently monitored statistic
set area, notice that the Basic level is selected. Basic is the default monitoring
level setting.

17-4 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Click the Runtime tab and verify that Basic is selected (default statistic set).

__ d. Click Cancel.
Information
The Runtime tab allows you to change the monitoring settings without restarting the
server. The new settings are applied immediately after clicking OK. If the Persist my
changes check box is selected, the runtime settings are saved and are shown in the
Configuration tab. This option allows you to make immediate changes to the PMI settings,
and have these changes become the standard configuration the next time the server is
started.

__ 2. To get more frequent data collections in the Tivoli Performance Viewer, change the
Monitoring Refresh Rate to 20 seconds.
Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-5

Student Exercises

__ a. Under Monitoring and Tuning, expand Performance Viewer and click Current
activity.
__ b. On the right pane, select the check box for server1 and start the monitoring
process for this server by clicking Start Monitoring.

__ c. Click the server1 link to view its current activity. If the tree for server1 is
collapsed, click [+] next to server1 to expand it. Expand Settings and click User.

17-6 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. In the User Settings panel, change the Data Collection Refresh Rate to 20
seconds. Click Apply.

Section 4: Viewing servlet and web applications module data


__ 1. Open a new browser and start the Snoop servlet at the web address (URL):
http://was8host01:9080/snoop
If application security is on, you are prompted for a user ID and password. Log in as
wasadmin, if necessary.
This URL runs the Snoop servlet, which is part of the Default application, and shows
a page with various information about the servlet. A servlet must be loaded in order
for data collection to take place. Leave the browser window open, as you are going
to return here soon.
__ 2. Using the administrative console, go to the Tivoli Performance Viewer and monitor
server1.
__ a. Click Monitoring and Tuning > Performance Viewer > Current activity >
server1.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-7

Student Exercises

__ b. Expand Summary Reports and select Servlets. In the Servlets Summary


Report pane, locate the entry for the Snoop servlet, which is part of the
DefaultWebApplication.war file.
Information
It is possible that you need go the next page of the report to find the listing for the Snoop
servlet. Use the arrows at the bottom of the page to go to the different pages of the report.
As an alternative, you can use filters to reduce the amount of information that is shown, or
sort by application name or another attribute.

__ c. Notice that there is one request for the Snoop servlet and an average response
time in milliseconds. Record the average response time here _____________.
__ d. Go back to the browser and click the reload button several times. Look at the
Servlets report again. What is the average response time now?____________
Is the response time longer or shorter after several requests are processed?
__ 3. Open a new browser and type in the web address for PlantsByWebSphere.
http://was8host01:9080/PlantsByWebSphere
Click the Flowers tab and the link for Lily.
__ a. Explore more summary reports:
Are there any Enterprise JavaBeans being monitored? Click EJBs under
Summary Reports. The EJBs Summary Report lists all enterprise beans
that are currently running on this server. It also shows the amount of time
that is spent in their methods, the number of EJB invocations, and the
total time that is spent in each enterprise bean.
17-8 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Click Connection Pool. The Connection Pool Summary Report lists all
data source connections that are defined in the application server and
shows their usage over time. The performance data is shown in graph
form.
Click Thread Pool. The Thread Pool Summary Report shows the usage
of all tread pools in the application server over time.
__ 4. Inside Tivoli Performance Viewer (TPV), view the available performance counters
for the Snoop servlet and the JVM Runtime module.
__ a. In TPV, expand Performance Modules and select the JVM Runtime check box.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-9

Student Exercises

__ b. Expand Web Applications > DefaultApplication#DefaultWebApplication.war


> Servlets and select Snoop servlet.

__ c. Click View Module(s) at the top of the viewer (if necessary, you must scroll in
your browser to see this screen). You see a table or a graph that shows the
monitored data.

17-10 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Use the browser to reload the Snoop servlet several times by clicking the
browser refresh button. Review the changes in the console.

Information
You see changes in the metrics for the Snoop servlet. The request count increases and the
service time changes. Keep in mind that the JVM runtime counters change too. Notice in

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-11

Student Exercises

the screen capture, the FreeMemory metric was cleared and it therefore is not plotted on
the graph.

Warning
When viewing graphs and comparing lines, take note of the Scale value. The Performance
viewer scales values such that all data points can fit on the graph.

__ e. In the Performance viewer, click View Table to switch to a tabular view of the
performance data. You can toggle back and forth between the table and graph
view by selecting View Table or View Graph.

__ f.

Reload the Snoop servlet several times and observe the servlet metrics.

Section 5: Using the TPV performance advisor


WebSphere Application Server includes a performance advisor, the TPV advisor, which is
accessed from inside Tivoli Performance Viewer. The TPV advisor provides helpful tuning
advice for various resources, cache size, JVM heap size, and more. The TPV advisor also
provides recommendations to address inefficient settings.
__ 1. To access TPV advisor messages in the administrative console, select Monitoring
and Tuning > Performance Viewer > Current Activity > server1. In the TPV
navigation pane, click Advisor under server1.

__ a. In the pane on the right, read the provided advice messages.


Are there some Alert messages?_____

17-12 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Is there a configuration advice message?____


If more than one page is available, view the messages on subsequent pages.

__ b. Click the link for the TUNE5042W: Enable servlet caching message to see the
advice details.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-13

Student Exercises

Information
In your lab environment, typically the processor utilization is low, and so you do not see
much relevant performance advice. However, you see the configuration advice to turn on
servlet caching with descriptions as to how to use the console to turn on this feature.
It is a good practice to run a representative workload against your application. Look at the
performance advisor after the work load is run.
You can use the IBM Rational Performance Tester to create load tests and run them
against your applications. You can read more about Rational Performance Tester and
download a trial version at the following website:
http://www.ibm.com/software/awdtools/tester/performance

Section 6: Using request metrics


Request metrics log the time that is spent at major components of the application server,
such as the web server plug-in, web container, EJB container, and more.
The request metric architecture differs from the Performance Monitoring Infrastructure
(PMI). PMI provides information about average system resource usage, with no correlation
between the data across different WebSphere components.
The request metrics tool tracks each individual transaction within WebSphere Application
Server, recording the response time of the major components. Some of these response
times include time in the web server or in the Enterprise JavaBeans (EJB) container. The
collected information can be saved to log files or forwarded to an Application Response
Measurement (ARM) agent.
__ 1. Using the administrative console, turn on request metrics by selecting Monitoring
and Tuning > Request metrics.
__ a. Under General Properties, select Prepare Servers for request metrics
collection.
__ b. Under Components to be instrumented, select ALL.
__ c. Set Trace level to Debug.
Information
Setting the trace level to Debug provides detailed instrumentation data, including response
times for all intraprocess servlet and Enterprise JavaBeans (EJB) calls. This trace level
provides a fine level of detail on each method call.
Setting the trace level to Hops generates instrumentation information about process
boundaries only (for example, a servlet request that comes from a browser or a web server,
and a JDBC request that goes to a database).
17-14 WebSphere Application Server V8 Administration
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

You can also filter requests so that only specific incoming requests result in request metrics
that are logged. Such filtering can keep the logs from being overloaded with request
metrics for every request.

__ d. Under Request Metrics Destination, select Standard Logs.

__ e. Click OK.
__ f.

Save directly to the master configuration and log out of the administrative
console.

__ g. Restart server1.
__ 2. Open a web browser and run the PlantsByWebSphere application by entering the
following address:
http://localhost:9080/PlantsByWebSphere
__ a. Go through the site, look at some plants, buy something, and check out.
__ 3. Now view the standard JVM logs for server1. If HPEL is not turned on for server1,
you can go to the Problem Determination lab exercise for the steps on how to turn
on HPEL. Alternatively, you can open the SystemOut.log file with a text editor
Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-15

Student Exercises

and search for the PMRM codes. The remaining steps assume that HPEL is turned
on for server1.
__ a. In the administrative console, go to Troubleshooting > Logs and trace >
server1.
__ b. On the Logging and tracing panel, scroll down and click the link View HPEL logs
and trace.

__ c. You are now in the Log Viewer. Expand the Content and Filtering Details
section.

Note
Some versions of Firefox at times seem to have issues with loading the data. If there
is message asking that asks you to wait while the data is loaded, clicking in the body
background of the console window seems to solve the problem.

17-16 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ d. Scroll down to the Filtering box and type PMRM* in the Message contents field.

__ e. Click Apply.
__ f.

Now only the request metrics messages are shown in the log view. Click any of
the PMRM0003I codes to view details of the message.

__ g. Scroll through the request metrics records. In addition to the Shopping Cart
bean, you also see metrics for PlantsByWebSphere (PWB) servlets and JSPs.
Look at the different event types. You see type=URI, type=EJB, type=JDBC,
and more, reflecting the request flow.
Information
The time and pid fields are the start time and ID of the application server process. Type
and detail are the description of the type of operation that is timed and its name. Most
important is the measured elapsed time in milliseconds, which includes all suboperations

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-17

Student Exercises

that this operation calls. The reqid is a unique ID assigned to the request by request
metrics.
Two correlators are shown, a parent correlator and a current correlator, representing the
upstream request and the current operation. A correlator consists of the comma-separated
fields that follow the parent or current keyword. If the parent and current correlators are
the same, as in this case where all field values are the same (including reqid=1), then the
record represents an operation that occurs as it enters WebSphere Application Server.

__ 4. Disable Request Metrics.


__ a. Select Monitoring and Tuning > Request metrics.
__ b. Clear Prepare Servers for Request metrics collection.
__ c. Click OK.
__ d. Save directly to the master configuration and log out of the administrative
console.
__ e. Restart server1.

Section 7: Optional: Install and configure ITCAM for WebSphere


Application Server
ITCAM for WebSphere Application Server V8 is bundled with the product but requires a
separate installation and configuration to make the ITCAM application performance metrics
available to the Tivoli Performance Viewer.
__ 1. Install ITCAM for WebSphere Application Server V8
__ a. Start the IBM Installation Manager by using the command:
/opt/IBM/InstallationManager/eclipse/IBMIM
__ b. On the Welcome page, click File > Preferences.
__ c. Click Add Repository.
__ d. Browse to /usr/IBM-repository/WAS8/ITCAM/repository.config and click
OK. Click OK again.Back on the Welcome screen, click Install.

17-18 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ e. Select IBM Tivoli Composite Application Manager for WebSphere.

__ f.

Click Next.

__ g. Accept the license agreement, and click Next.


__ h. Accept all the defaults, and finally click Install.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-19

Student Exercises

__ i.

When the installation completes, make sure that Data Collector Configuration
Tool is selected, and click Finish.

17-20 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ j.

The ITCAM Configuration Tool starts automatically.

__ k. Click Next.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-21

Student Exercises

__ 2. Use the ITCAM Configuration Tool to enable collectors on profile1, server1.


__ a. Make sure that Configure application server for data collection is selected.

__ b. Click Next.

17-22 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Select profile1.

__ d. Click Next.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-23

Student Exercises

__ e. Review the information that is gathered from the profile.

__ f.

Click Next.

17-24 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ g. Enter the fully qualified host name: was8host01.websphere.ibm.com, user


name: wasadmin, and password: was1sphere

__ h. Click Next.
Important
The ITCAM Configuration Tool requires a fully qualified host name. If you see an error
message during this step, check the /etc/hosts file on your system. If necessary, add
was8host01.websphere.ibm.com to the loopback address (127.0.0.1) so that there is a
line that reads as follows:
127.0.0.1

Copyright IBM Corp. 2012

localhost was8host01 was8host01.websphere.ibm.com

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-25

Student Exercises

__ i.

Select server1.

__ j.

Click Next.

17-26 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ k. Check Apply Required PMI Settings.

__ l.

Click Next.
Information

To see the Performance Monitoring Infrastructure (PMI) information, select Apply


Required PMI Settings. This option turns on and configures the PMI settings. The
configuration tool sets the PMI instrumentation level to Custom and turns on the ITCAM
Application Performance Module. Current settings are overwritten.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-27

Student Exercises

__ m. Do not check the box to configure communication with a Managing Server.

__ n. Click Next.
Information
IBM Tivoli Composite Application Manager (ITCAM) for Application Diagnostics is a
separate monitoring product. ITCAM for Application Diagnostics provides real-time
monitoring and diagnosis of WebSphere Application Servers, and for other application and
HTTP servers.
The Managing Server is a component of ITCAM for Application Diagnostics; it provides
detailed diagnosis. If the ITCAM for Application Diagnostics is installed in your
environment, you can configure the ITCAM for WebSphere Application Server Data
Collector to connect to the Managing Server component.
More information about the ITCAM for Application Diagnostics is found at the Tivoli
software products website:
http://www.ibm.com/software/tivoli/products/composite-application-mgr-diagnostics

17-28 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ o. Accept default selections. It is good to select the backup option.

__ p. Click Next. Wait for the backup to complete. This activity takes a couple of
minutes.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-29

Student Exercises

__ q. Note the location of the configuration log file. Examine this log if you need to
troubleshoot the configuration.

__ r.

Also, notice that you are instructed to restart the application server. However,
before restarting, you first verify the configuration of server1. Click Finish.

__ s. Close the IBM Installation Manager.

17-30 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 3. Turn on the IBM Tivoli Composite Application Manager for WebSphere Application
Server Data Collector within PMI for server1.
__ a. From the administrative console, select Monitoring and Tuning > Performance
Monitoring Infrastructure > server1.

__ b. Click ITCAM for WebSphere Application Server.


__ c. Verify that the box is checked for Enable IBM Tivoli Composite Application
Manager for WebSphere Application Server Data Collector. If this box is already
checked, click Cancel and proceed to Step 4.

__ d. Click OK.
__ e. Save changes directly to the master configuration.
__ 4. Start monitoring server1 with ITCAM.
__ a. Restart server1.
__ b. Go to Monitoring and Tuning > Performance Monitoring Infrastructure >
server1.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-31

Student Exercises

__ c. Click ITCAM for WebSphere Application Server.


__ d. Select the Runtime tab.

__ e. Click Start Monitoring.


__ 5. Add something to the PlantsByWebSphere shopping cart. In order for the monitoring
software to see the PlantsByWebSphere code, the application needs some activity.
__ 6. Turn on the PMI Custom statistics for server1 and activate all ITCAM metrics.
__ a. Go to Monitoring and Tuning > Performance Monitoring Infrastructure >
server1.
__ b. If the Custom statistics is not checked already, then select it now and click
Apply.

17-32 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ c. Click the Custom link and select the Runtime tab.

__ d. Click the link for ITCAM Application Performance.


__ e. All of application performance statistics that ITCAM collects are shown.

__ f.

Select all of the statistics (there are 11 different statistics) and click Enable. In
this panel, a description of each statistic and the unit in which it is measured are
shown.

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-33

Student Exercises

__ 7. View ITCAM statistics in the TPV.


__ a. Go to Monitoring and Tuning > Performance Viewer > Current activity.
__ b. Select server1 and click Start Monitoring.
__ c. Click server1 to access the Tivoli Performance Viewer pane.
__ d. Expand Performance Modules.
__ e. If you scroll down the tree of performance modules, ITCAM Application
Performance is now listed.
__ f.

You need to generate some activity on the server to see application components
listed. Start a new browser and access PlantsByWebSphere. Traverse the site
as you did before.

__ g. Return to TPV. You must click Refresh to see the PlantsByWebSphere


components. Expand the module and select some of the components to monitor
such as PlantsByWebSphere, Servlet, and one or two servlets.

__ h. Click View Module(s).


__ i.

Generate some activity on the PlantsByWebSphere application. Start a new


browser and access PlantsByWebSphere. Traverse the site as you did before.

17-34 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ j.

Back in TPV, examine the ITCAM application performance statistics.

Information
RequestCount: The number of requests that are completed since the counter is enabled
or reset.
AverageResponseTime: This data point shows the average response time of requests in
milliseconds.
LastMinuteAverageResponseTime: The average response time of requests that are
completed in the last minute (when the counter value is retrieved) in milliseconds.
AverageCPUUsage: This data shows the average processor usage of requests in
milliseconds.
LastMinuteAverageCPUUsage: The average processor usage of requests that are
completed in the last minute (when the counter value is retrieved) in milliseconds.

End of exercise

Copyright IBM Corp. 2012

Exercise 17. Using the performance monitoring tools


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

17-35

Student Exercises

Exercise review and wrap-up


In this exercise, you learned how to turn on different levels of PMI statistics for an
application server, monitor an application server with Tivoli Performance Viewer (TPV), and
configure user settings. You generated some load on applications and examined summary
reports and performance modules in TPV. Additionally, you viewed performance messages
from the TPV Advisor.
You learned how to turn on and configure the Request Metrics tool, and viewed Request
Metrics messages in the standard logs of an application server.
Finally, you configured the ITCAM for WebSphere Application Server collector for an
application server, and viewed ITCAM application performance statistics with TPV.

17-36 WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Appendix A. Resetting the WebSphere


environment
To complete some lab exercises, specific lab exercises must first be completed. However,
there might be occasions where you have a problematic configuration or want to skip labs.
For these cases, a reset function is provided to set your environment to an appropriate
state.
The reset scripts are initiated from a desktop icon and allow users to choose which state
they want to restore. The reset scripts can take some time to run, depending on what
software is already installed on the lab computer. For example, if none of the exercises are
completed, the reset scripts might need to install numerous pieces of software and take
510 minutes. However, if all of the software installation is completed, the reset scripts
might need to restore only the profiles directories and take only 12 minutes.
__ 8. Run the reset script. From the desktop, locate and click the ResetScripts icon.The

reset script interface lists the available states that are available.

__ 9. There are a number of reset scripts available. Locate the name of the exercise that
directed you here and select the associated reset script state. For example, if you

Copyright IBM Corp. 2012

Appendix A. Resetting the WebSphere environment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

A-1

Student Exercises

wanted to start Exercise 7: Installing an application, you would select


3_IHS-installed.
- Reset script: 0_Initial-state
Exercise 1: Installing IBM Installation Manager

- Reset script: 1_IIM-installed


Exercise 2: Installing WebSphere Application Server

- Reset script: 2_WAS-installed_with_profile1


Exercise 3: Installing IBM HTTP Server

- Reset script: 3_IHS-installed


Exercise 4: WebSphere Information Center installation (optional)
Exercise 5: Exploring the administrative console
Exercise 6: Assembling an application
Exercise 7: Installing an application

- Reset script: 4_WAS-installed_with_profile1_plus_PlantsByWebSphere


Exercise 8: Monitored directory: Drag-and-drop deployment
Exercise 9: Problem determination
Exercise 10: Using wsadmin
Exercise 11: Creating a federated cell

- Reset script: 5_WAS-Federated_dmgr-profile1-profile2


Exercise 12: Clustering and workload management

- Reset script: 6_WAS-Federated_plus_PlansCluster


Exercise 13: Configuring the service integration bus
Exercise 14: Configuring WebSphere security
Exercise 15: Configuring application security
Exercise 16: Configuring SSL for WebSphere
Exercise 17: Using the performance monitoring tools

A-2

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

- Reset script: 9_Reset_Plants-DB


This exercise rebuilds the Plants database.
Information

If you would like more information about the specific reset scripts, type the letter d
followed by the number for the reset script.

Copyright IBM Corp. 2012

Appendix A. Resetting the WebSphere environment


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

A-3

Student Exercises

__ 10. Select the appropriate reset script

__ 11. Depending on how much work the reset script needs to do, the wait is several
minutes. When the script finished, press Enter to close the window.

A-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Appendix B. Introduction to accessing


Citrix-based AIX lab systems
The lab exercises for this course use the AIX 6.1 operating system. If you are not familiar
with AIX, or other forms of UNIX, this appendix provides some basic instructions on starting
terminal windows and text editors.
The following subjects are covered as follows:
1.
2.
3.
4.
5.
6.
7.
8.
9.

Log in to the Citrix host.


Connect to the AIX system via VNC.
Use PuTTY (SSH) to connect to the AIX system.
Use Firefox to connect to the AIX system.
Log in to the operating system.
Start a terminal window.
Start a text editor.
Start a browser window.
Start a file explorer window.

__ 1. Log in to the Citrix host.


As part of the course communication, you receive a URL to access the Citrix front
end along with a user name and password. Here is an example of such a URL:
https://elabgateway.moppssc.com
This URL takes you to an authentication window. Use the user name and password
to continue.

Copyright IBM Corp. 2012

Appendix B. Introduction to accessing Citrix-based AIX lab systems


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

B-1

Student Exercises

As soon as you are successfully authenticated, you are presented with a Citrix
interface, which lists a number of applications that can be used to access your AIX
lab system.

When these applications are run, they display their window on your local system.
__ 2. Connect to the AIX system via VNC.
Double-click the VNC Client icon to start a connection. You are presented with a
dialog box. It allows you to specify the AIX system IP address (which is provided to
you in your course communications) and also the port number, which allows you to
choose the VNC screen size.

The format is <ip-address>:<port>. Enter you IP address followed by a colon and


a port number (see the following port information) and click Connect.
Port
:1
:2
:3
:4

B-2

Screen Size
1024 x 768
1280 x 800
1280 x 1024
1600 x 1024

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Now, you are prompted to log in to the AIX operating system (see the following
details). You are then presented with a full AIX desktop in a VNC window.
__ 3. Use PuTTY (SSH) to connect to the AIX system.
If you prefer to use PuTTY (an SSH client) to connect to the remote system in a
command-line interface, double-click in the PuTTY icon. You are presented with a
dialog box which allows you to specify the remote IP address (which is provided to
you in your course communications).

Enter the IP address for your AIX system in the Host Name field and click Open.
Then, log in using the AIX user name and password (root and web1sphere).

You now have a command-line terminal to your AIX system logged in as root.
__ 4. Use Firefox to connect to the AIX system.
You are able to run Firefox on the AIX machine directly, which causes the Firefox
window to render within the AIX desktop window. See step 8 for details.

Copyright IBM Corp. 2012

Appendix B. Introduction to accessing Citrix-based AIX lab systems


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

B-3

Student Exercises

It is also possible to run Firefox through the Citrix interface. This approach renders
the Firefox windows directly on the desktop of your local system. To do so,
double-click the Firefox icon within the Citrix window.

The Firefox window is then rendered on your local desktop. It is important to


understand that the Firefox process is not actually running on your local system. The
process is running in the Citrix environment, which allows you to specify the AIX IP
address as part of the URL.

__ 5. Log in to the operating system.


To log in to the operating system, use the user name and password that are
provided in your course communications: root and web1sphere
If you are using the VNC client, the interface first asks for the user name. Enter
root and click OK.

On the next screen, enter the password (web1sphere) and click OK.

B-4

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

Now, you are presented with a CDE (Common Desktop Environment) screen.

__ 6. Start a terminal window.


When you have a desktop window, you use the Front Panel to start applications
such as terminal windows.

Copyright IBM Corp. 2012

Appendix B. Introduction to accessing Citrix-based AIX lab systems


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

B-5

Student Exercises

To start a terminal window, either click directly on the terminal icon or click the arrow
above the terminal icon. Clicking the arrow displays more application icons.

__ 7. Start a text editor.


To start a text editor, click the arrow above the Terminal application icon in the Front
Panel. Then, click the Text Editor icon.

B-6

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V6.0.2
Student Exercises

EXempty

__ 8. Start a browser window.


To start a local Firefox browser, click the arrow above the Terminal application icon
in the Front Panel. Then, click the Firefox icon.

__ 9. Start a file explorer window.


To start a file explorer window, click the arrow above the Terminal application icon in
the Front Panel. Then, click the File Manager icon.

Copyright IBM Corp. 2012

Appendix B. Introduction to accessing Citrix-based AIX lab systems


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

B-7

Student Exercises

B-8

WebSphere Application Server V8 Administration


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Copyright IBM Corp. 2012

V5.4.0.3

backpg

Back page

Das könnte Ihnen auch gefallen