Top Banner
Welcome Welcome WebSphere Application Server 5.0 Administration Sponsored by JVR Systems, Inc Course Summary: Course Summary: The WAS 5 Administration course will start with an introduction The WAS 5 Administration course will start with an introduction to to WebSphere Application Server (WAS), and the installation and con WebSphere Application Server (WAS), and the installation and con figuration figuration of WAS 5.0. It includes coverage of WAS administration, applica of WAS 5.0. It includes coverage of WAS administration, applica tion tion deployment, workload and security management, topics in troubles deployment, workload and security management, topics in troubles hooting, hooting, and performance monitoring and tuning and performance monitoring and tuning
222
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: about websphere

WelcomeWelcome

WebSphere Application Server 5.0 Administration

Sponsored by JVR Systems, Inc

Course Summary:Course Summary:The WAS 5 Administration course will start with an introduction The WAS 5 Administration course will start with an introduction to to WebSphere Application Server (WAS), and the installation and conWebSphere Application Server (WAS), and the installation and configuration figuration of WAS 5.0. It includes coverage of WAS administration, applicaof WAS 5.0. It includes coverage of WAS administration, application tion deployment, workload and security management, topics in troublesdeployment, workload and security management, topics in troubleshooting, hooting, and performance monitoring and tuningand performance monitoring and tuning

Page 2: about websphere

Lab Environment Lab Environment Softwares on student machinesSoftwares on student machines

OS : Windows XP professionalOS : Windows XP professionalLogLog--in: user=student, password=studentin: user=student, password=studentSoftware Location : C:Software Location : C:\\softwaressoftwares

WAS 5 BASE ( ibmwas5_base_nt.zip)WAS 5 BASE ( ibmwas5_base_nt.zip)WAS 5 ND ( ibmwas5_nd_nt.zip)WAS 5 ND ( ibmwas5_nd_nt.zip)WAS 5 FixPack2 BASE (was50_fp2_win.zip)WAS 5 FixPack2 BASE (was50_fp2_win.zip)WAS 5 FixPack2 ND ( was50_nd_fp2_win.zip)WAS 5 FixPack2 ND ( was50_nd_fp2_win.zip)WAS 5 Cumulative Fix 13 BASE( was502_cf13_win.zip)WAS 5 Cumulative Fix 13 BASE( was502_cf13_win.zip)WAS 5 Cumulative Fix 13 ND(was502_nd_cf13_win.zip)WAS 5 Cumulative Fix 13 ND(was502_nd_cf13_win.zip)

Oracle : Installed on server ( name :fhorcl1)Oracle : Installed on server ( name :fhorcl1)Oracle driver file ( classes12.zip) located on C:Oracle driver file ( classes12.zip) located on C:\\oracleoracle\\liblibJACL scripts located in C:JACL scripts located in C:\\softwaressoftwares\\scriptsscriptsSample application EAR files located in C:Sample application EAR files located in C:\\softwaresoftware\\appsapps

Page 3: about websphere

Lab NetWork Deployment setupLab NetWork Deployment setup

Base Node

Base + ND Mgr

Base Node

Base + ND Mgr

Base Node

Base + ND Mgr

Base Node

Base + ND Mgr

Base + ND Mgr

Base Node

Page 4: about websphere

Application Server vs. Web ServerApplication Server vs. Web ServerWeb server: serves pages for viewing in the browser via Web server: serves pages for viewing in the browser via HTTP protocol.HTTP protocol.

Application server: an application server exposes business logicApplication server: an application server exposes business logic to client to client

applications through various protocols, possibly including HTTPapplications through various protocols, possibly including HTTP

Page 5: about websphere

Typical communication scenarioTypical communication scenario

Page 6: about websphere

Application Server Role & ArchitectureApplication Server Role & Architecture

An application server is a core technology that provides An application server is a core technology that provides key infrastructure and services to applications hosted on key infrastructure and services to applications hosted on a system.a system.ServicesServices

Resource pooling (for example, db connection pooling and object Resource pooling (for example, db connection pooling and object pooling)pooling)

Distributed transaction management Distributed transaction management Asynchronous program communication, typically through message Asynchronous program communication, typically through message queuing queuing Integrated securityIntegrated security

Failover and application health detection servicesFailover and application health detection services

Page 7: about websphere

J2EE Application Server ArchitectureJ2EE Application Server Architecture

Page 8: about websphere

Application Servers Available In MarketApplication Servers Available In Market

IBM WebSphereIBM WebSphereBEA WeblogicBEA WeblogicSUN OneSUN OneOracle Application ServerOracle Application ServerMacromedia JRUN etc…. Macromedia JRUN etc….

Open source productsOpen source productsJOnASJOnASJBOSSJBOSSApache Apache Geronimo Geronimo

Page 9: about websphere

Introduction to IBM WebSphere Application ServerIntroduction to IBM WebSphere Application Server

IBM WebSphere Application Servers allow you to quickly, reliablyIBM WebSphere Application Servers allow you to quickly, reliably and and flexibly Webflexibly Web--enable your business.enable your business.Supports J2EE 1.3 Supports J2EE 1.3 Available in multiple editions/packagesAvailable in multiple editions/packagesAdvanced Security SupportAdvanced Security SupportSophisticated load balance and clustering capabilitiesSophisticated load balance and clustering capabilitiesBrowser based administration based on JMX (JAVA Management eXtenBrowser based administration based on JMX (JAVA Management eXtension)sion)WebServices supportWebServices supportRich tools set for administrationRich tools set for administrationEasy migration to higher packagesEasy migration to higher packages

Page 10: about websphere

WebSphere 5 PackagingWebSphere 5 Packaging

WebSphere Application Server V5 comes in several configurations,WebSphere Application Server V5 comes in several configurations, each offeringeach offeringa combination of features geared toward different customer needsa combination of features geared toward different customer needs..

WebSphere 5.0 ExpressWebSphere 5.0 ExpressExpress V5.0 provides a combination of development tool and applExpress V5.0 provides a combination of development tool and application ication server in a single integrated package geared toward developing Wserver in a single integrated package geared toward developing Webeb--centric centric applications. It provides a simplified programming model that alapplications. It provides a simplified programming model that allows you to lows you to create new Web applications and to convert existing static applicreate new Web applications and to convert existing static applications to cations to dynamic applications.dynamic applications.

WebSphere 5.0 BaseWebSphere 5.0 BaseThe IBM WebSphere Application Server base configuration providesThe IBM WebSphere Application Server base configuration provides a robust a robust application deployment environment for singleapplication deployment environment for single--server, lightserver, light--production production situations. It contains a base application server that supports situations. It contains a base application server that supports the full J2EE the full J2EE environment. It allows a full range of enterprise integration anenvironment. It allows a full range of enterprise integration and offers d offers enhanced security, performance, availability, connectivity, and enhanced security, performance, availability, connectivity, and scalability scalability options. Administration is done through a Weboptions. Administration is done through a Web--based interface or through a based interface or through a scripting tool.scripting tool.

Page 11: about websphere

WebSphere 5 PackagingWebSphere 5 Packaging

WebSphere 5.0 Network DeploymentWebSphere 5.0 Network DeploymentIBM WebSphere Application Server Network Deployment is designed IBM WebSphere Application Server Network Deployment is designed to add nonto add non--programming enhancements to the features provided in the base coprogramming enhancements to the features provided in the base configuration. These nfiguration. These enhancements add scalability features, allowing you to run applienhancements add scalability features, allowing you to run applications on multiple servers cations on multiple servers and on multiple physical nodes.and on multiple physical nodes.

In addition to the base with ND also providesIn addition to the base with ND also providesDeployment Manager: Allowing you to manage multiple instances ofDeployment Manager: Allowing you to manage multiple instances of base and base and clustering for workload management and failover.clustering for workload management and failover.The Edge Components, including Load Balancer, Caching Proxy, andThe Edge Components, including Load Balancer, Caching Proxy, and IBM HTTP IBM HTTP Server. These features provide the edgeServer. These features provide the edge--ofof--network functions required to set up a network functions required to set up a classic DMZ in front of the application server.classic DMZ in front of the application server.A private UDDI Registry for easier deployment of internal Web seA private UDDI Registry for easier deployment of internal Web services rvices applicationsapplications

Page 12: about websphere

WebSphere 5 PackagingWebSphere 5 PackagingWebSphere 5 EnterpriseWebSphere 5 Enterprise

IBM WebSphere Application Server Enterprise provides the featureIBM WebSphere Application Server Enterprise provides the features in Network s in Network Deployment plus programming model extensions for sophisticated aDeployment plus programming model extensions for sophisticated application designs.pplication designs.In addition to the ND features it also providesIn addition to the ND features it also provides

Service Service -- oriented Architectureoriented ArchitectureJ2EE based workflowJ2EE based workflowAdvanced transactional connectivityAdvanced transactional connectivityOptimized performanceOptimized performanceProgramming extensions Programming extensions

Extended messagingExtended messagingStart BeansStart BeansSchedule ServiceSchedule ServiceObject poolsObject poolsWork areasWork areasApplication flexibilityApplication flexibility

Page 13: about websphere

Components in WebSphere 5 Base and Network DeploymentComponents in WebSphere 5 Base and Network DeploymentIBM HTTP Server 1.3.26IBM HTTP Server 1.3.26

IHS is an Apache based web server.IHS is an Apache based web server.

Webserver plugWebserver plug--insins

Web server plugWeb server plug--ins are used by web servers toins are used by web servers to identify requests for the WebSphere identify requests for the WebSphere Application Server and to forward them.Application Server and to forward them.

plugplug--ins are provided for IBM HTTP Server, Apache Web Server, Microsoins are provided for IBM HTTP Server, Apache Web Server, Microsoft Internet ft Internet Information Services, iPlanet and Sun ONE Web Servers, and LotusInformation Services, iPlanet and Sun ONE Web Servers, and Lotus® Domino Web ® Domino Web Server.Server.

Application clientsApplication clientsAn application client is the interface which is used by clientAn application client is the interface which is used by client--application to application to communicate with services provided by applications running on Wecommunicate with services provided by applications running on WebSpherebSphere

Application clients are ActiveX, Applet, J2EE client.Application clients are ActiveX, Applet, J2EE client.Application Server Toolkit (This will installed separately)Application Server Toolkit (This will installed separately)

Tool kit includes number of eclipse based tooling productsTool kit includes number of eclipse based tooling productsDebuggerDebuggerProfilerProfilerLog analyzerLog analyzer

Page 14: about websphere

Components in WebSphere 5 Base and Network DeploymentComponents in WebSphere 5 Base and Network DeploymentData Direct JDBC providersData Direct JDBC providers

JDBC drivers provided by a supported database vendors.JDBC drivers provided by a supported database vendors.DataDirect type 3 (SequeLink)DataDirect type 3 (SequeLink)DataDirect type 4 (ConnectJDBC)DataDirect type 4 (ConnectJDBC)

Deployment ManagerDeployment ManagerDeployment manager is the process that communicates with indepenDeployment manager is the process that communicates with independent node agents in a Network dent node agents in a Network Deployment environment. Node agents are installed with the base Deployment environment. Node agents are installed with the base WebSphere Application Server WebSphere Application Server but not required until the node is added to a cell in a Network but not required until the node is added to a cell in a Network Deployment environment. Each node Deployment environment. Each node agent runs in the node as lightweight (partial J2EE environment)agent runs in the node as lightweight (partial J2EE environment) JVM process. Node agents JVM process. Node agents coordinate such events as configuration synchronization. The Depcoordinate such events as configuration synchronization. The Deployment Manager manages all the loyment Manager manages all the nodes in a distributed topology.nodes in a distributed topology.

DB2 UDB7.2DB2 UDB7.2Not to store the configuration like the earlier versionsNot to store the configuration like the earlier versionsTo support Database session persistenceTo support Database session persistence

IBM Directory Version 4.1IBM Directory Version 4.1LDAP compatible Directory ServiceLDAP compatible Directory Service

Page 15: about websphere

Components in WebSphere 5 Base and Network DeploymentComponents in WebSphere 5 Base and Network Deployment

Edge components ( provides Workload management for WebSphere)Edge components ( provides Workload management for WebSphere)Workload management controllerWorkload management controllerSwitch consultantsSwitch consultants

The Load Balancer provides switch consultants for Cisco and NortThe Load Balancer provides switch consultants for Cisco and Nortel switches and a Site el switches and a Site Selector that provides a scaling load balancer.Selector that provides a scaling load balancer.

Edge of network caching technologyEdge of network caching technologyCaching is used to reduce network congestion by storing frequentCaching is used to reduce network congestion by storing frequently accessed content so ly accessed content so information only has to be retrieved onceinformation only has to be retrieved once

Page 16: about websphere

What’s New in WAS 5.0What’s New in WAS 5.0J2EE 1.3 SupportJ2EE 1.3 Support

J2EE 1.3 provides enhancements in APIs J2EE 1.3 provides enhancements in APIs -- Servlets, JSP, EJBServlets, JSP, EJBAdministration model using JMXAdministration model using JMX

JMX allows to exposes java methods in distributed environmentJMX allows to exposes java methods in distributed environmentWorkload management enhancementsWorkload management enhancements

Enhancements in scalability, Load balancing, availabilityEnhancements in scalability, Load balancing, availabilityWeb services supportWeb services support

Improved SOAP supportImproved SOAP supportPrivate UDDI registryPrivate UDDI registry

Performance EnhancementsPerformance EnhancementsJMX for admin componentsJMX for admin componentsPMI (Performance Monitor Interface)PMI (Performance Monitor Interface)Tivoli Performance ViewerTivoli Performance Viewer

Security EnhancementsSecurity EnhancementsCSIv2 (common security interoperability)CSIv2 (common security interoperability)JAAS JAAS

MessagingMessagingSupport for Message driven beansSupport for Message driven beans

Page 17: about websphere

WebSphere 4 Vs WebSphere 5WebSphere 4 Vs WebSphere 5

WAS 5.0WAS 5.0CSIv2CSIv2Security.xmlSecurity.xmlTivoli Performance Tivoli Performance ViewerViewerWeb based consoleWeb based consoleWsadminWsadminjacljaclXml files for configXml files for configCellCellDeployment Manager Deployment Manager (similar to Admin (similar to Admin server in 4.0)

WAS 4.0WAS 4.0Security Association Service Security Association Service ((sassas))Sas.server.propertiesSas.server.propertiesResource AnalyzerResource AnalyzerJava Admin ConsoleJava Admin ConsoleWscpWscpTclTclDB repository for configDB repository for configDomainDomainAdministration ServerAdministration Server

server in 4.0)

Page 18: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture -- Multitier Application EnvironmentsMultitier Application Environments

ClientClient--tier components run on the tier components run on the client machine.client machine.WebWeb--tier components run on the tier components run on the J2EE server.J2EE server.BusinessBusiness--tier components run on tier components run on the J2EE server.the J2EE server.Enterprise information system (EIS)Enterprise information system (EIS)--tier software runs on the EIS servertier software runs on the EIS server

Page 19: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture -- J2EE Application ComponentsJ2EE Application Components

Page 20: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture -- J2EE Application InstallationJ2EE Application Installation

AAT or WSAD can be used to assemble the necessary files into an .ear file. WebSphere provides admin tools to install the application into WebSphere Application Server.

Page 21: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture -- Base Install Runtime ArchitectureBase Install Runtime Architecture

Page 22: about websphere

WAS 5.0 Architecture: Base Install ComponentsWAS 5.0 Architecture: Base Install ComponentsA base WebSphere Application Server V5 configuration includes onA base WebSphere Application Server V5 configuration includes only the ly the application server process. There is no node agent or Deploymentapplication server process. There is no node agent or DeploymentManager involved in this configuration. No coordination between Manager involved in this configuration. No coordination between application server processes is supported in the base configuratapplication server processes is supported in the base configuration, with ion, with each application server instance having to be separately adminiseach application server instance having to be separately administeredteredNode Node

A node is a logical grouping of WebSphere managed server A node is a logical grouping of WebSphere managed server processes that share common configuration and operational processes that share common configuration and operational control. In the base configuration, each application server is control. In the base configuration, each application server is responsible for its own configuration in the configuration reposresponsible for its own configuration in the configuration repositoryitory

Unlike earlier versions of WebSphere, all the configuration infoUnlike earlier versions of WebSphere, all the configuration information rmation will be stored in xml files on file system not in relational dbwill be stored in xml files on file system not in relational dbApplication ServerApplication Server

Primary component of WebSphere, runs in JVM and provides run tiPrimary component of WebSphere, runs in JVM and provides run time for me for applicationsapplicationsProvides containers (Web container, EJB container etc..)Provides containers (Web container, EJB container etc..)Provides Services for applications (Object Request Broker (ORB),Provides Services for applications (Object Request Broker (ORB), Name Name service (JNDI), Security,service (JAAS and Java 2 security), Admservice (JNDI), Security,service (JAAS and Java 2 security), Admin service in service (JMX), Trace service, Performance Monitoring Interface (PMI), Tr(JMX), Trace service, Performance Monitoring Interface (PMI), Transaction ansaction management, Messaging interfaces (JMS), Emanagement, Messaging interfaces (JMS), E--mail interfaces (mail interfaces (JavaMailJavaMail) ) Database connection (JDBC) and connection pooling)Database connection (JDBC) and connection pooling)

Page 23: about websphere

WAS 5.0 Architecture:WAS 5.0 Architecture: Base Install ComponentsBase Install Components

Web server and Web server plugWeb server and Web server plug--ininThe WebSphere Application Server works with a Web server to handThe WebSphere Application Server works with a Web server to handle le requests for dynamic content from Web applications. The Web servrequests for dynamic content from Web applications. The Web server and er and application server communicate using the Web server plugapplication server communicate using the Web server plug--in.in.The Web server plugThe Web server plug--in uses an easyin uses an easy--toto--read XML configuration file to read XML configuration file to determine whether a request should be handled by the Web server determine whether a request should be handled by the Web server or the or the application server. It uses the standard HTTP protocol to communapplication server. It uses the standard HTTP protocol to communicate with icate with the application server, but can also be configured to use securethe application server, but can also be configured to use secure HTTPSHTTPS

Embedded HTTP ServerEmbedded HTTP ServerWebSphere provides inbuilt http server for testing, not to be usWebSphere provides inbuilt http server for testing, not to be used for ed for production environment, and default port is 9080.production environment, and default port is 9080.

Virtual hostsVirtual hostsA virtual host is a configuration, enabling a single host machinA virtual host is a configuration, enabling a single host machine to resemble e to resemble multiple host machines. It allows a single physical machine to smultiple host machines. It allows a single physical machine to support several upport several independently configured and administered applications. Each virindependently configured and administered applications. Each virtual host tual host has a logical name and a list of one or more DNS aliases by whichas a logical name and a list of one or more DNS aliases by which it is h it is known.known.WebSphere provides two default virtual hostsWebSphere provides two default virtual hosts

Admin_host (listens on 9090 , 9043)Admin_host (listens on 9090 , 9043)Default_host (listens 9080, 80,9443 etc)Default_host (listens 9080, 80,9443 etc)

Page 24: about websphere

WAS 5.0 Architecture: Base Install ComponentsWAS 5.0 Architecture: Base Install ComponentsWeb containerWeb container

Processes Servlets, Processes Servlets, JSPsJSPs and other serverand other server--side include files. Each web container side include files. Each web container contains one session managercontains one session managerAdministrator specifies web container properties includingAdministrator specifies web container properties including

Default host, session managerDefault host, session managerNumber and type of connection between web server and web containNumber and type of connection between web server and web container, er, listening portslistening ports

EJB containerEJB containerProvides run time services needed to deploy and manage Provides run time services needed to deploy and manage EJB’sEJB’sSingle container can handle more than one EJB jar fileSingle container can handle more than one EJB jar fileProvides low level services for Provides low level services for EJB’sEJB’s including JNDI,JDBC,Security, Transaction etc.including JNDI,JDBC,Security, Transaction etc.

JCA containerJCA containerAllow us to plugAllow us to plug--in custom JCA resource adaptors (.in custom JCA resource adaptors (.rarrar))

Web administrative console and Web applicationWeb administrative console and Web applicationWeb based administrative interface is installed as J2EE 1.3 app Web based administrative interface is installed as J2EE 1.3 app called called ““adminconsoleadminconsole””Listens on 9090, In base, it runs on the application server machListens on 9090, In base, it runs on the application server machine and can only ine and can only manage that servermanage that serverIn network deployment, it is installed and run on Deployment ManIn network deployment, it is installed and run on Deployment Manager machineager machine

Admin ServiceAdmin ServiceProvides necessary service to manipulate configure information Provides necessary service to manipulate configure information for the server and for the server and its componentsits componentsIn base, it runs in application serverIn base, it runs in application serverIn ND, it runs on Deployment manager, Node Agent, App server, JMIn ND, it runs on Deployment manager, Node Agent, App server, JMS serverS serverProvides security with roles (Administrator, Monitor, Provides security with roles (Administrator, Monitor, ConfiguratorConfigurator, Operator), Operator)

Page 25: about websphere

WAS 5.0 Architecture: Base Install ComponentsWAS 5.0 Architecture: Base Install ComponentsScripting Client (wsadmin)Scripting Client (wsadmin)

Provides additional flexibility over web based administration apProvides additional flexibility over web based administration applicationplicationAllows administrators to automate the administrationAllows administrators to automate the administrationBuilt on BSF , currently supports only JACLBuilt on BSF , currently supports only JACL

JMS ServerJMS ServerTo process messaging functions for JMS provider , supports pointTo process messaging functions for JMS provider , supports point--toto--point, publishpoint, publish--subscribesubscribeIn base, it runs with application server JVM, in ND, it runs as In base, it runs with application server JVM, in ND, it runs as separate JVMseparate JVM

ApplicationApplicationApplications are designed and developed by custom parties that aApplications are designed and developed by custom parties that are hosted and run re hosted and run by application serverby application serverApplication is packaged as EAR (enterprise archive) and it can bApplication is packaged as EAR (enterprise archive) and it can be deployed on e deployed on multiple application serversmultiple application serversApplication modules includes Web module (war), Application modules includes Web module (war), ejbejb module (jar), client (jar), module (jar), client (jar), resource adaptor (resource adaptor (rarrar))

Application DatabaseApplication DatabaseDatabase supports Applications, and runs on database serverDatabase supports Applications, and runs on database server

Session DatabaseSession DatabaseUsed in multi server environment for session persistenceUsed in multi server environment for session persistence

Name ServiceName ServiceEach JVM hosts a service to provide Java Naming and Directory InEach JVM hosts a service to provide Java Naming and Directory Interface name terface name spacespaceUsed to register Used to register EJB’sEJB’s and J2EE resources ( JDBC, JMS, J2C, URL, java mail)and J2EE resources ( JDBC, JMS, J2C, URL, java mail)WebSphere 5 uses WebSphere 5 uses CorbaCorba Naming Naming Service(cosService(cos naming)naming)

Page 26: about websphere

WAS 5.0 Architecture:WAS 5.0 Architecture: Base Install ComponentsBase Install ComponentsSecurity ServiceSecurity Service

Each application server JVM hosts security service to provide auEach application server JVM hosts security service to provide authorization and thorization and authentication services by using security information specified authentication services by using security information specified in configuration in configuration repositoryrepository

Web services engineWeb services engineBases on apache AXISBases on apache AXISImplements SOAP, WSDL, UDDI, WSIF)Implements SOAP, WSDL, UDDI, WSIF)

Page 27: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture Network Deployment Runtime Network Deployment Runtime ArchitectureArchitecture

Page 28: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture Network Deployment Network Deployment

Support for multiple nodes, each with a node agent Support for multiple nodes, each with a node agent process and application servers process and application servers Clusters of Load Balanced applications servers can be Clusters of Load Balanced applications servers can be configured in Network Deploymentconfigured in Network DeploymentConfiguration and application binaries of all components Configuration and application binaries of all components in the cell are managed by Deployment Managerin the cell are managed by Deployment ManagerDeployment Manager synchronize the configuration to Deployment Manager synchronize the configuration to local copies of nodes( called federate)local copies of nodes( called federate)

Page 29: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture Network Deployment ComponentsNetwork Deployment Components

CellCellA cell is grouping of nodes into a single administrative domain,A cell is grouping of nodes into a single administrative domain, each node is each node is identified by logical name for configuration purpose. The configidentified by logical name for configuration purpose. The configuration and uration and application binaries of all nodes in the cell are centralized inapplication binaries of all nodes in the cell are centralized into cell master to cell master configuration repository.configuration repository.The centralized repository is managed by Deployment Manager procThe centralized repository is managed by Deployment Manager processess

Deployment ManagerDeployment ManagerProvides single, central point of administrative control for allProvides single, central point of administrative control for all elements in the elements in the cells.cells.Responsible for the content of the repositories (configuration aResponsible for the content of the repositories (configuration and application nd application binaries) on each of the nodes. It manages this through communicbinaries) on each of the nodes. It manages this through communication with ation with the node agent process resident on each node of the cellthe node agent process resident on each node of the cellUsing the Deployment Manager, horizontal scaling, vertical scaliUsing the Deployment Manager, horizontal scaling, vertical scaling and ng and distributed applications are all easy to administer and manage, distributed applications are all easy to administer and manage, since since application servers are managed by nodes, and one or more nodes application servers are managed by nodes, and one or more nodes is is managed by a cell.managed by a cell.

Master configuration repositoryMaster configuration repositoryThe master configuration repository contains all of the cell’s cThe master configuration repository contains all of the cell’s configuration onfiguration data. All updates to this repository are performed by the Deploydata. All updates to this repository are performed by the Deployment ment Manager.Manager.The node repositories are readThe node repositories are read--only for application server access, since only only for application server access, since only the Deployment Manager can initiate their update, pushing configthe Deployment Manager can initiate their update, pushing configuration uration changes out from the cell master configuration repositorychanges out from the cell master configuration repository

Page 30: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture Network Deployment ComponentsNetwork Deployment ComponentsNode AgentNode Agent

The node agent is an administrative process and is not involved The node agent is an administrative process and is not involved in in application serving functions.application serving functions.Its functions includes, File transfer, configuration synchronizIts functions includes, File transfer, configuration synchronization and ation and performance monitoringperformance monitoringNode agent acts as broker between Deployment manager and Node agent acts as broker between Deployment manager and application serverapplication serverNode agent is defined each nodeNode agent is defined each node

UDDI Registry & Web services GatewayUDDI Registry & Web services GatewayProvides private UDDI registryProvides private UDDI registryWeb services gateway component to support web services functionsWeb services gateway component to support web services functions

Edge Components ( Caching Proxy & Load Balance)Edge Components ( Caching Proxy & Load Balance)Caching components to provide response timeCaching components to provide response timeLoad Balance to reduce congestion , bottle necks and balance theLoad Balance to reduce congestion , bottle necks and balance the load load over multiple serversover multiple servers

ClusterClusterCluster is logical collection of application server processes, tCluster is logical collection of application server processes, to provide o provide workload balancingworkload balancingApplication servers that belong to a cluster are "members" of thApplication servers that belong to a cluster are "members" of that at cluster and must all have identical application components deplocluster and must all have identical application components deployed on yed on themthem

Page 31: about websphere

WAS 5.0 ArchitectureWAS 5.0 Architecture Network Deployment ComponentsNetwork Deployment ComponentsManaged ProcessManaged Process

All operating system processes that are components of the All operating system processes that are components of the WebSphere product are called managed servers or managed WebSphere product are called managed servers or managed processes. All managed process are enabled with JMX .processes. All managed process are enabled with JMX .

WebSphere Managed Processes/serversWebSphere Managed Processes/serversDeployment Manager (Network Deployment only)Deployment Manager (Network Deployment only)Node agent (Network Deployment only)Node agent (Network Deployment only)Application server (base and Network Deployment)Application server (base and Network Deployment)JMS server (Network Deployment only)JMS server (Network Deployment only)

Page 32: about websphere

WAS 5.0 Installation: Supported PlatformsWAS 5.0 Installation: Supported Platforms

AIXAIXOS/400OS/400Red Hat Linux Advanced Server for IntelRed Hat Linux Advanced Server for IntelRed Hat Linux for s/390Red Hat Linux for s/390Solaris 8Solaris 8SuSE Linux for IntelSuSE Linux for IntelSuSE SLESSuSE SLESWindows NT Server V4.0Windows NT Server V4.0Windows 2000 Advanced Server 2000Windows 2000 Advanced Server 2000Windows 2000 Server 2000Windows 2000 Server 2000

Page 33: about websphere

WAS 5.0 Installation: Installation modesWAS 5.0 Installation: Installation modes

The WebSphere Application Server installation program provides tThe WebSphere Application Server installation program provides two wo modes of operation:modes of operation:GUI installationGUI installation

Via GUI interfaceVia GUI interfaceFor Testing purposeFor Testing purposeFor First Time UsersFor First Time UsersFor exploring the installation proceduresFor exploring the installation procedures

Silent installationSilent installationNon interactive Non interactive Installation of identical configurations on multiple machines.Installation of identical configurations on multiple machines.Backup of the installation settings for later reuse.Backup of the installation settings for later reuse.Scripted or unattended installations.Scripted or unattended installations.Duplication of development or testing installation in productionDuplication of development or testing installation in production

Page 34: about websphere

WAS 5.0 Installation: Supported Web ServersWAS 5.0 Installation: Supported Web Servers

Apache ServerApache ServerIBM HTTP ServerIBM HTTP ServerInternet Information ServerInternet Information ServerSun ONE Web Server (formerly iPlanet), Enterprise Sun ONE Web Server (formerly iPlanet), Enterprise EditionEditionLotus Domino Enterprise ServerLotus Domino Enterprise ServerCorresponding PlugCorresponding Plug--in also need to be installed in also need to be installed

Page 35: about websphere

WAS 5.0 Installation: IBM HTTP Server PORT ConflictsWAS 5.0 Installation: IBM HTTP Server PORT Conflicts

Checking for IP port conflictsChecking for IP port conflictsThe IBM HTTP Server will use three IP ports on the server. CheckThe IBM HTTP Server will use three IP ports on the server. Checkthat there are no existing services on the server that use thesethat there are no existing services on the server that use these ports:ports:Port UsePort Use

80 Standard HTTP port80 Standard HTTP port443 Standard HTTPS port443 Standard HTTPS port8008 Administrative console8008 Administrative console

The following commands can be used to see a list of ports in useThe following commands can be used to see a list of ports in useWindows: Windows: netstat netstat ––anan

AIX, Linux, and Solaris: AIX, Linux, and Solaris: netstat netstat --an | an | grepgrep LISTENLISTEN

If your operating system has a preIf your operating system has a pre--installed Web server, you will installed Web server, you will need to remove the existing Web server or prevent it from startineed to remove the existing Web server or prevent it from starting to ng to avoid port conflicts with HTTP serveravoid port conflicts with HTTP server

Page 36: about websphere

WAS 5.0 Installation: Feature OptionsWAS 5.0 Installation: Feature Options

FeatureFeature Testing Testing EnvEnv Production Production EnvEnv

Application ServerApplication Server XX XX

Application Server SamplesApplication Server Samples XX

Admin scripting toolAdmin scripting tool XX XX

Admin consoleAdmin console X X (will get removed after (will get removed after added to cell)added to cell)

XX

AATAAT XX

Messaging FeaturesMessaging Features XX XX

TivoliTivoli XX

Note: For production environment web server and web server plugNote: For production environment web server and web server plug--ins ins will get installed on separate web server machine. JDK will get will get installed on separate web server machine. JDK will get installed, installed, no need of external JDK.no need of external JDK.

Web server (IBM HTTP)Web server (IBM HTTP) XX

PlugPlug--insins XX

Log analyzerLog analyzer XX XX

Page 37: about websphere

WAS 5.0 Installation: PORTS and PreWAS 5.0 Installation: PORTS and Pre--Installation TasksInstallation Tasks

PORTPORT USEUSE90809080 http transporthttp transport

94439443 https transporthttps transport

90909090 Admin consoleAdmin console

90439043 Admin console secure portAdmin console secure port

28092809 Boot strapBoot strap

88808880 Soap connectorSoap connector

91019101 ORB listenerORB listener

PrePre--installation tasks on Linuxinstallation tasks on LinuxCreate embedded JMS server user and groups.Create embedded JMS server user and groups.Check IP ports are unused.Check IP ports are unused.Stop Web server processes.Stop Web server processes.

Page 38: about websphere

WAS 5.0 Installation: Creating JMS Users and GroupsWAS 5.0 Installation: Creating JMS Users and GroupsYou need to create the You need to create the mqmmqm user and two groups, user and two groups, mqmmqmand and mqbrkrsmqbrkrs. The user you run WebSphere as (. The user you run WebSphere as (root root in our in our case) and the case) and the mqmmqm user must be members of both groups.user must be members of both groups.To create the embedded JMS server user and groups:To create the embedded JMS server user and groups:

1. Log in as root and start a terminal session.1. Log in as root and start a terminal session.2. Create two new groups:2. Create two new groups:

groupaddgroupadd mqmmqmgroupaddgroupadd mqbrkrsmqbrkrs

3. Create a user 3. Create a user mqmmqm and add it to the and add it to the mqmmqm and and mqbrkrsmqbrkrsgroups.groups.

useradduseradd --g g mqmmqm --G G mqbrkrsmqbrkrs --m m mqmmqm4. Add the root user to the 4. Add the root user to the mqmmqm and and mqbrkrsmqbrkrs groups. groups.

5. Log off and then on again to get the new permissions.5. Log off and then on again to get the new permissions.

Page 39: about websphere

WAS 5.0 Base Installation: Begin InstallationWAS 5.0 Base Installation: Begin Installation

1. Log in as root and start a terminal session.1. Log in as root and start a terminal session.2. Insert and mount the WebSphere 2. Insert and mount the WebSphere Application Server V5.0 CDApplication Server V5.0 CD--ROM:ROM:

mount /mnt/cdrommount /mnt/cdrom3. Start the WebSphere Application Server 3. Start the WebSphere Application Server LaunchPad. For example:LaunchPad. For example:

cd /mnt/cdromcd /mnt/cdrom./LaunchPad.sh./LaunchPad.sh

4. In the language selection window, select 4. In the language selection window, select English English and click and click OKOK..5. In the WebSphere Application Server 5. In the WebSphere Application Server LaunchPad window, click LaunchPad window, click Install the Install the productproduct, as shown ., as shown .

Page 40: about websphere

WAS 5.0 Base Installation: Begin InstallationWAS 5.0 Base Installation: Begin Installation

1. Log in as root and start a terminal session.1. Log in as root and start a terminal session.2. Insert and mount the WebSphere Application 2. Insert and mount the WebSphere Application Server V5.0 CDServer V5.0 CD--ROM:ROM:

mount /mnt/cdrommount /mnt/cdrom3. Start the WebSphere Application Server LaunchPad. 3. Start the WebSphere Application Server LaunchPad. For example:For example:

cd /mnt/cdromcd /mnt/cdrom./LaunchPad.sh./LaunchPad.sh

4. In the language selection window, select 4. In the language selection window, select English English and click and click OKOK..5. In the WebSphere Application Server LaunchPad 5. In the WebSphere Application Server LaunchPad window, click window, click Install the productInstall the product, as shown ., as shown .

Launchpad

1. Please go to C:1. Please go to C:\\sofwaressofwares\\ folder and extract the folder and extract the webspherewebsphere base file “ibmwas5_bast_nt.zip”base file “ibmwas5_bast_nt.zip”

To extract , select the file and right click on the To extract , select the file and right click on the file and choose “Extract All” optionfile and choose “Extract All” optionThis will create a folder “ibmwas5_base_nt” This will create a folder “ibmwas5_base_nt” folder.folder.

2. To install the software, double click on the 2. To install the software, double click on the ““install.exeinstall.exe” file or “launchpad.bat”” file or “launchpad.bat”3. This will start the Installation wizard 3. This will start the Installation wizard 4. In the language selection window, select 4. In the language selection window, select English English and click and click OKOK..5. In the WebSphere Application Server LaunchPad 5. In the WebSphere Application Server LaunchPad window, click window, click Install the productInstall the product, as shown ., as shown .

Page 41: about websphere

WAS 5.0 Installation: InstallationWAS 5.0 Installation: Installation

Note: If you are running X-windows with either the Gnome or KDE window managers, the CD-ROM may automatically be mounted for you. To verify this, simply run mount | grep /mnt/cdrom. If you get any output, then the CD-ROM has already been mounted.6. In the wizard language selection window, select English and click OK.7. In the Welcome to WebSphere Application Server window, click Next to continue, as shown

Page 42: about websphere

WAS 5.0 Base Installation: Finishing InstallationWAS 5.0 Base Installation: Finishing Installation

8.8. In the software license agreement window, In the software license agreement window, select select I accept the terms in the license I accept the terms in the license agreement agreement and click and click Next Next to agree to the to agree to the terms of the agreement, as shownterms of the agreement, as shown

9.9. In the setup type window, select the In the setup type window, select the Full Full setup type option and click setup type option and click NextNext, as , as shownshown

Page 43: about websphere

WAS 5.0 Base Installation: Choose the feature optionsWAS 5.0 Base Installation: Choose the feature options10. We need to choose the feature options to install on our mach10. We need to choose the feature options to install on our machine, ine,

check all the options as shown in the following screencheck all the options as shown in the following screen

Page 44: about websphere

WAS 5.0 Base Installation: Finishing InstallationWAS 5.0 Base Installation: Finishing Installation

11.11. In the setting the installation directories window, you In the setting the installation directories window, you can change the installation path for the WebSphere can change the installation path for the WebSphere Application Server and IBM HTTP Server. We Application Server and IBM HTTP Server. We recommend that the default recommend that the default directories(c:directories(c:\\IBMIBM\\WebSphere5WebSphere5\\AppServer) be used.AppServer) be used.

12.12. In the node name and host name window, enter the In the node name and host name window, enter the node name and host name for your installation. In our node name and host name for your installation. In our case we set the node name and host name to machine case we set the node name and host name to machine namename

Page 45: about websphere

WAS 5.0 Base Installation: Finishing InstallationWAS 5.0 Base Installation: Finishing Installation1313. On windows platform, the install adds services for . On windows platform, the install adds services for WebsphereWebsphere and HIS, please give the and HIS, please give the

username and password that have privileges to stat/stop the servusername and password that have privileges to stat/stop the services and click ices and click Next Next to start the installationto start the installation

14. In the next window, verify your installation 14. In the next window, verify your installation settings, and click settings, and click Next Next to start the to start the installationinstallation

Page 46: about websphere

WAS 5.0 Base Installation: Finishing InstallationWAS 5.0 Base Installation: Finishing Installation15.15. Wait to finish the installation, might take few minutes depend oWait to finish the installation, might take few minutes depend on the hardware.n the hardware.16.16. Once the installation is complete, click Once the installation is complete, click Finish Finish in the installation wizard finished window, as in the installation wizard finished window, as

shownshown17.17. Uncheck the “Register Product” option and click “Next”Uncheck the “Register Product” option and click “Next”

Page 47: about websphere

WAS 5.0 Base Installation: Finishing InstallationWAS 5.0 Base Installation: Finishing Installation

18. 18. After a successful installation of IBM WebSphere Application SerAfter a successful installation of IBM WebSphere Application Server V5.0, ver V5.0, the First Steps window. You can also invoke firststeps from the First Steps window. You can also invoke firststeps from /AppServer/Bin/firststeps.sh./AppServer/Bin/firststeps.sh.

19.19. Verify WebSphere Application ServerVerify WebSphere Application ServerTo confirm that WebSphere Application Server V5.0 was installed To confirm that WebSphere Application Server V5.0 was installed correctly, click correctly, click Verify Installation Verify Installation in the First Steps windowin the First Steps windowFrom command line From command line

cd /opt/WebSphere/AppServer/bincd /opt/WebSphere/AppServer/bin./ivt.sh./ivt.sh

20. 20. You should see success message at the end of Installation VerifiYou should see success message at the end of Installation Verification cation Test.Test.

18. 18. After a successful installation of IBM WebSphere Application SerAfter a successful installation of IBM WebSphere Application Server V5.0, ver V5.0, the First Steps window. You can also invoke firststeps by doublthe First Steps window. You can also invoke firststeps by double clicking e clicking on launchpad.baton launchpad.bat

19.19. Verify WebSphere Application ServerVerify WebSphere Application ServerTo confirm that WebSphere Application Server V5.0 was installed To confirm that WebSphere Application Server V5.0 was installed correctly, click correctly, click Verify Installation Verify Installation in the First Steps window in the First Steps window

ororFrom command line From command line

C:C:\\>IBM>IBM\\WebSphere5WebSphere5\\AppServerAppServer\\binbin\\ivt.bativt.bat20. 20. You should see success message at the end of Installation VerifiYou should see success message at the end of Installation Verification cation

Test.Test.

Page 48: about websphere

WebSphere 5.0: Admin ConsoleWebSphere 5.0: Admin Console

The Administrative Console is graphical web based tool that willThe Administrative Console is graphical web based tool that will allow allow to configure and administer WebSphere application serverto configure and administer WebSphere application serverThe admin console is J2EE web application runs within an applicaThe admin console is J2EE web application runs within an application tion server nodeserver nodeAdmin application get installed as part of installation on defauAdmin application get installed as part of installation on default server1lt server1Application file is adminconsole.earApplication file is adminconsole.earTo open the Admin console type following URL in the To open the Admin console type following URL in the MozillaMozilla browserbrowser

http://localhost:9090/adminhttp://localhost:9090/adminYou should see the Administrative login console windowYou should see the Administrative login console windowWebSphere application Security is not enabled yet, so we could WebSphere application Security is not enabled yet, so we could give any user name to login.give any user name to login.Check the application server access by typing following Check the application server access by typing following urlurl, the , the applications will be accessed via embedded web server.applications will be accessed via embedded web server.

http://localhost:9080/snoophttp://localhost:9080/snoop

The browser should show the following screenThe browser should show the following screenIn admin console, until you save the configuration changes you mIn admin console, until you save the configuration changes you make ake during the session the changes do not become effectiveduring the session the changes do not become effectiveWebSphere scripting is alternative to admin console.WebSphere scripting is alternative to admin console.

Page 49: about websphere

WebSphere 5.0: Admin ConsoleWebSphere 5.0: Admin ConsoleAdmin console has following main areasAdmin console has following main areas

Task barTask barNavigation TreeNavigation TreeWorkspaceWorkspaceStatus AreaStatus Area

Page 50: about websphere

WebSphere 5.0: Admin ConsoleWebSphere 5.0: Admin Console

Task barTask barHomeHome: displays admin console home page: displays admin console home pageSave:Save: allows us to save pending configuration changesallows us to save pending configuration changesPreferences:Preferences: allows to select admin console preferencesallows to select admin console preferencesLog out:Log out: ends the current session and logs you outends the current session and logs you outHelpHelp: Online help, not Infocenter: Online help, not Infocenter

Navigation TreeNavigation TreeOffers links to view, select and manage components in administraOffers links to view, select and manage components in administrative celltive cellClick Click ++ to expand , click to expand , click –– to collapse Treeto collapse TreeServers: Servers: Enables configuration of administrative servers, application Enables configuration of administrative servers, application

servers, and clusters.servers, and clusters.Applications: Applications: Enables installation and management of applications.Enables installation and management of applications.Resources: Resources: Enables configuration of resources and viewing of information Enables configuration of resources and viewing of information

on resources existing in the administrative cell.on resources existing in the administrative cell.Security: Security: Enables configuration and management of WebSphere security Enables configuration and management of WebSphere security

and SSL.and SSL.Environment: Environment: Enables configuration of hosts, Web servers, variables and Enables configuration of hosts, Web servers, variables and other components.other components.System Administration: System Administration: Enables configuration and management of Enables configuration and management of

nodes, cells, console security.nodes, cells, console security.Troubleshooting: Troubleshooting: Enables you to check for and track configuration errors Enables you to check for and track configuration errors

and problems. Also used to set PMI metrics.and problems. Also used to set PMI metrics.

Page 51: about websphere

WebSphere 5.0: Admin consoleWebSphere 5.0: Admin console

WorkspaceWorkspaceThe workspace, allows you to work with your administrative confiThe workspace, allows you to work with your administrative configuration guration after selecting an item from the console navigation tree. When yafter selecting an item from the console navigation tree. When you click a ou click a folder in the tree view, the workspace lists information on instfolder in the tree view, the workspace lists information on instances of that ances of that folder type. For example, selecting folder type. For example, selecting Servers Servers --> > Application Servers Application Servers shows shows all the application servers configured in this cell. Selecting aall the application servers configured in this cell. Selecting an item, an n item, an application server in this example, will display the Properties application server in this example, will display the Properties page for that page for that item. The Properties page can then be used to view and edit propitem. The Properties page can then be used to view and edit property values.erty values.

Status and Messages areasStatus and Messages areasThe Status area displays along the bottom of the console and remThe Status area displays along the bottom of the console and remains visible ains visible as you navigate through the administrative console. The area disas you navigate through the administrative console. The area displays two plays two frames: WebSphere Configuration Problems WebSphere Runtime Mesframes: WebSphere Configuration Problems WebSphere Runtime Messages sages Click Click Previous Previous or or Next Next to toggle between the frames. Click the number to to toggle between the frames. Click the number to view details. The interval between automatic refreshes can be adview details. The interval between automatic refreshes can be adjusted by justed by expanding expanding Preferences Preferences below the messages. In addition, the information below the messages. In addition, the information displayed can be refreshed at any time by clicking the icon in tdisplayed can be refreshed at any time by clicking the icon in the upperhe upper--right right of the area. The Messages area displays messages relevant to youof the area. The Messages area displays messages relevant to your r configuration.configuration.

Page 52: about websphere

WebSphere 5.0: Using the Admin ConsoleWebSphere 5.0: Using the Admin ConsoleSelect Task:The navigation tree on the left side of the console Select Task:The navigation tree on the left side of the console contains links to console pages that contains links to console pages that you use to create and manage components in a WebSphere administryou use to create and manage components in a WebSphere administrative cell. For example, to ative cell. For example, to create a JDBC provider you would expand create a JDBC provider you would expand Resources Resources and then select the and then select the JDBC Providers JDBC Providers action.action.

Page 53: about websphere

WebSphere 5.0: Using the Admin ConsoleWebSphere 5.0: Using the Admin ConsoleStart and Stop: Most items can be started and stopped using the Start and Stop: Most items can be started and stopped using the administrative console. To start or administrative console. To start or stop an item using the console: 1. Select the item type in the nstop an item using the console: 1. Select the item type in the navigation tree. 2. Select the item in avigation tree. 2. Select the item in the collection table by checking the box next to it. 3. Click the collection table by checking the box next to it. 3. Click Start Start or or Stop. Stop. For example, to start an For example, to start an existing application server, select existing application server, select Servers Servers -->>Application Servers. Application Servers. Place a check mark in the Place a check mark in the check box beside the application server you want started and clicheck box beside the application server you want started and click ck StartStart

Page 54: about websphere

WebSphere 5.0: Using the Admin ConsoleWebSphere 5.0: Using the Admin ConsoleSaving Configuration:Saving Configuration:

As you work with the configuration, your changes are saved to teAs you work with the configuration, your changes are saved to temporary mporary workspace storage. For the configuration changes to take effect,workspace storage. For the configuration changes to take effect, they must they must be saved to the master configuration and then synchronized (sentbe saved to the master configuration and then synchronized (sent) to the ) to the nodes.Consider the following:nodes.Consider the following:1. If you work on a page, and click 1. If you work on a page, and click Apply Apply or or OKOK, the changes will be saved , the changes will be saved in the workspace under your user ID. This will allow you to recoin the workspace under your user ID. This will allow you to recover changes ver changes under the same user ID if you exit the session without saving.under the same user ID if you exit the session without saving.2. You need to click 2. You need to click Save Save to save changes to the master repository. This can to save changes to the master repository. This can be done from the taskbar, from the Messages area, or when you lobe done from the taskbar, from the Messages area, or when you log in if you g in if you logged out without saving the changes.logged out without saving the changes.3. If you don’t save changes to the master repository, the chang3. If you don’t save changes to the master repository, the changes won’t be es won’t be pushed to your node’s configuration repository. Effectively the pushed to your node’s configuration repository. Effectively the new settings new settings are lost. They are just available as configuration settings in yare lost. They are just available as configuration settings in your temporary our temporary workspace.workspace.4. The Save window presents you with the following options:4. The Save window presents you with the following options:

SaveSaveDiscardDiscard: Discard reverses any changes made during the working : Discard reverses any changes made during the working session and reverts to the master configuration.session and reverts to the master configuration.CancelCancel: Cancel doesn’t reverse changes made during the working : Cancel doesn’t reverse changes made during the working

session. It just cancels the action of saving to the master reposession. It just cancels the action of saving to the master repository for sitory for now.now.Synchronize changes with nodes: Synchronize changes with nodes: This distributes the new This distributes the new

configuration to the nodes.configuration to the nodes.

Page 55: about websphere

WebSphere 5: Command Line ToolsWebSphere 5: Command Line Tools

A set of command line tools are provided with WebSphere to A set of command line tools are provided with WebSphere to control application server components. These tools are availablecontrol application server components. These tools are availableas shell scripts ad batch files.as shell scripts ad batch files.These tools are available in These tools are available in /<WAS Home>/WebSphere/AppServer/bin/<WAS Home>/WebSphere/AppServer/binfolderfolderImportant ToolsImportant Tools

startServer : starts a ServerstartServer : starts a ServerstopServer: stops a ServerstopServer: stops a ServerserverStatus: displays server statusserverStatus: displays server statusaddNode : add a node to celladdNode : add a node to cellremoveNode : remove a node from a cellremoveNode : remove a node from a cellstartNode : start the node agent startNode : start the node agent stopNode: stops the node agent stopNode: stops the node agent startManager : start deployment managerstartManager : start deployment managerstopManager : stops deployment managerstopManager : stops deployment managerversionInfo : displays versions of installed productsversionInfo : displays versions of installed productssyncNode: to synchronize local configuration with master syncNode: to synchronize local configuration with master configurationconfiguration

Page 56: about websphere

WebSphere 5: Command Line ToolsWebSphere 5: Command Line ToolsImportant ToolsImportant Tools

cleanupNode: cleanupNode: cleans up a node configuration from a partially created cleans up a node configuration from a partially created network deployment distributed administration cellnetwork deployment distributed administration cellbackupConfig: backs up the node configuration into zip filebackupConfig: backs up the node configuration into zip filerestoreConfig: restored node configuration from back up filerestoreConfig: restored node configuration from back up filewsinstance : allows to create new WebSphere application server iwsinstance : allows to create new WebSphere application server instance nstance (base).(base).GenPluginCfg: to generate web server plugGenPluginCfg: to generate web server plug--in filein file

Page 57: about websphere

Introduction to J2EEIntroduction to J2EEJava 2 Platform, Enterprise Edition (J2EE) defines a standard Java 2 Platform, Enterprise Edition (J2EE) defines a standard that applies to all aspects of architecting and developing multithat applies to all aspects of architecting and developing multi--tier servertier server--based applications. based applications. It defines a standard architecture composed of an application It defines a standard architecture composed of an application model, a platform for hosting applications, a compatibility testmodel, a platform for hosting applications, a compatibility testsuite (CTS), and a reference implementation.suite (CTS), and a reference implementation.The primary concern of J2EE is the platform specification. It The primary concern of J2EE is the platform specification. It describes the runtime environment for a J2EE application. This describes the runtime environment for a J2EE application. This environment includes application components, containers, environment includes application components, containers, resource manager drivers, and databases. The elements of this resource manager drivers, and databases. The elements of this environment communicate with a set of standard services that environment communicate with a set of standard services that are also specified.are also specified.J2EE makes all Java enterprise APIs and functionality available J2EE makes all Java enterprise APIs and functionality available and accessible in an integrated manner. and accessible in an integrated manner. WebSphere Application Server Version 5.0 is fully J2EE 1.3 WebSphere Application Server Version 5.0 is fully J2EE 1.3 compliant.compliant.

Page 58: about websphere

J2EE: Multitiered Distributed ApplicationsJ2EE: Multitiered Distributed ApplicationsThe J2EE platform uses a multiThe J2EE platform uses a multi--tiered distributed application modeltiered distributed application model

ClientClient--tier components run on the client machine. tier components run on the client machine. WebWeb--tier components run on the J2EE server. tier components run on the J2EE server. BusinessBusiness--tier components run on the J2EE server. tier components run on the J2EE server. Enterprise information system (EIS)Enterprise information system (EIS)--tier software runs on the EIS tier software runs on the EIS

serverserver

Page 59: about websphere

J2EE: J2EE Object Model & ComponentsJ2EE: J2EE Object Model & Components

APIsAPIsEJB 2.0EJB 2.0JDBC 2.0JDBC 2.0ServletServlet 2.32.3JSP 1.2JSP 1.2JMS 1.0.2JMS 1.0.2JNDI 1.2JNDI 1.2JTA 1.0JTA 1.0Java Mail 1.2Java Mail 1.2J2C 1.0J2C 1.0JAAS 1.0JAAS 1.0

Page 60: about websphere

J2EE: ComponentsJ2EE: Components

J2EE applications are made up of components. A J2EE applications are made up of components. A J2EE componentJ2EE component is a is a selfself--contained functional software unit that is assembled into a J2EEcontained functional software unit that is assembled into a J2EEapplication with its related classes and files and that communicapplication with its related classes and files and that communicates ates with other components. with other components. The J2EE specification defines the following J2EE components: The J2EE specification defines the following J2EE components:

Application clients and applets are components that run on the Application clients and applets are components that run on the client. client. Java Java ServletServlet and Java Server Pages (JSP ) technology and Java Server Pages (JSP ) technology components are Web components that run on the server. components are Web components that run on the server. Enterprise JavaBeans (EJB ) components (enterprise beans) are Enterprise JavaBeans (EJB ) components (enterprise beans) are business components that run on the server.business components that run on the server.

J2EE components are written in the Java programming language andJ2EE components are written in the Java programming language andare compiled in the same way as any program in the language. Theare compiled in the same way as any program in the language. Thedifference between J2EE components and "standard" Java classes idifference between J2EE components and "standard" Java classes is s that J2EE components are assembled into a J2EE application, verithat J2EE components are assembled into a J2EE application, verified fied to be well formed and in compliance with the J2EE specification,to be well formed and in compliance with the J2EE specification, and and deployed to production, where they are run and managed by the J2deployed to production, where they are run and managed by the J2EE EE server.server.

Page 61: about websphere

J2EE: Server Side Components J2EE: Server Side Components ServletsServlets: server side, run in a Web container: server side, run in a Web containerEnterprise JavaBeans (EJBs)Enterprise JavaBeans (EJBs): reusable components, used for : reusable components, used for distributed applications, run in an EJB containerdistributed applications, run in an EJB containerJava Server Pages (Java Server Pages (JSPsJSPs): Web pages with server side scripting ): Web pages with server side scripting using Java, run in a Web containerusing Java, run in a Web containerJDBC:JDBC:The JDBC API lets you invoke SQL commands from Java The JDBC API lets you invoke SQL commands from Java programming language methods programming language methods JNDI:JNDI:Naming and directory interface to bind objects with namesNaming and directory interface to bind objects with namesJMS: JMS: The JMS is a messaging standard that allows J2EE The JMS is a messaging standard that allows J2EE application components to create, send, receive, and read application components to create, send, receive, and read messages messages JTA:JTA: The Java Transaction API ("JTA") provides a standard The Java Transaction API ("JTA") provides a standard interface for demarcating transactions.interface for demarcating transactions.J2C:J2C: The J2EE Connector architecture is used by J2EE tools The J2EE Connector architecture is used by J2EE tools vendors and system integrators to create resource adapters that vendors and system integrators to create resource adapters that support access to enterprise information systems that can be support access to enterprise information systems that can be plugged into any J2EE product. plugged into any J2EE product. JAAS:JAAS: The Java Authentication and Authorization Service ("JAAS") The Java Authentication and Authorization Service ("JAAS") provides a way for a J2EE application to authenticate and provides a way for a J2EE application to authenticate and authorize a specific user or group of users to run it. authorize a specific user or group of users to run it.

Page 62: about websphere

J2EE: Client Side ComponentsJ2EE: Client Side Components

Java ProgramsJava Programs: Java classes: Java classesApplets: Applets: Java GUI programs , that can run in browserJava GUI programs , that can run in browser

Other ClientsOther ClientsC++ programsC++ programsVB ProgramsVB Programs

Page 63: about websphere

J2EE: J2EE ContainersJ2EE: J2EE Containers

The J2EE server provides underlying services in the form of a coThe J2EE server provides underlying services in the form of a container ntainer for every component type. Because you do not have to develop thefor every component type. Because you do not have to develop these se services yourself, you are free to concentrate on solving the buservices yourself, you are free to concentrate on solving the business siness problem at hand.problem at hand.Container ServicesContainer Services

Containers are the interface between a component and the lowContainers are the interface between a component and the low--level platformlevel platform--specific functionality that supports the component specific functionality that supports the component SecuritySecurityTransaction ManagementTransaction ManagementJNDIJNDIRemote ConnectivityRemote Connectivity

Deployment DescriptorDeployment DescriptorDeployment descriptors are used to communicate the needs of Deployment descriptors are used to communicate the needs of application components to the application components to the deployerdeployer. The deployment descriptor . The deployment descriptor is a contract between the application component provider or is a contract between the application component provider or assembler and the assembler and the deployerdeployer..DD is XML based fileDD is XML based fileEach Module will have XML deployment descriptorEach Module will have XML deployment descriptorMainly EAR Deployment Descriptor and WAR Deployment DescriptorMainly EAR Deployment Descriptor and WAR Deployment Descriptor

Page 64: about websphere

J2EE Enterprise Java BeansJ2EE Enterprise Java Beans

The EJB component model defines the infrastructure for creating The EJB component model defines the infrastructure for creating an environment an environment that separates system services from application business logic. that separates system services from application business logic. The EJB server and The EJB server and EJB container deal with all the system service infrastructure inEJB container deal with all the system service infrastructure included in the cluded in the following list: following list: Transactions,Transactions, Persistence, Resources, SecurityPersistence, Resources, Security

Client finds EJB using JNDIClient finds EJB using JNDIClient uses EJB stubs to invoke Client uses EJB stubs to invoke methods on the remote EJB objectmethods on the remote EJB objectCommunication via RMI/IIOPCommunication via RMI/IIOP

Page 65: about websphere

J2EE: Services: JDBCJ2EE: Services: JDBC

Provides database connectivity for java programsProvides database connectivity for java programsA JDBC Driver helps toA JDBC Driver helps to

Establish connection to database from javaEstablish connection to database from javaInvoke SQL queries on DBInvoke SQL queries on DBHandles the results from DB and process themHandles the results from DB and process them

Page 66: about websphere

J2EE: Services: JNDIJ2EE: Services: JNDIJNDI allows components to store and retrieve named java objectsJNDI allows components to store and retrieve named java objectsBinding will occur during the startup of application serverBinding will occur during the startup of application serverEach of the following components will be identified by JNDI namEach of the following components will be identified by JNDI namee

JDBC JDBC DataSourceDataSourceEJB homeEJB homeJMS componentJMS componentMail SourceMail Source

Page 67: about websphere

J2EE: Services: TransactionsJ2EE: Services: TransactionsJTA is API from SUN , that allows application to access transactJTA is API from SUN , that allows application to access transactionsionsJTA specifies java interfaces between transaction manager and JTA specifies java interfaces between transaction manager and distributed transaction systemdistributed transaction systemJTS is implementation of transaction managerJTS is implementation of transaction managerEnables demarcation (Commit Entire transaction or rollback)Enables demarcation (Commit Entire transaction or rollback)

Page 68: about websphere

J2EE: Services: J2CJ2EE: Services: J2CThe J2EE Connector architecture is used by J2EE tools vendors anThe J2EE Connector architecture is used by J2EE tools vendors and d system integrators to create resource adapters that support accesystem integrators to create resource adapters that support access to ss to enterprise information systems that can be plugged into any J2EEenterprise information systems that can be plugged into any J2EEproduct product

Java run time

Page 69: about websphere

J2EE: Services: JMSJ2EE: Services: JMSThe JMS is a messaging standard that allows J2EE application The JMS is a messaging standard that allows J2EE application components to create, send, receive, and read messages. It enablcomponents to create, send, receive, and read messages. It enables es distributed communication that is loosely coupled, reliable, anddistributed communication that is loosely coupled, reliable, andasynchronous.asynchronous.

Page 70: about websphere

J2EE: Services: SecurityJ2EE: Services: SecurityThe Java Authentication and Authorization Service ("JAAS") proviThe Java Authentication and Authorization Service ("JAAS") provides a des a way for a J2EE application to authenticate and authorize a speciway for a J2EE application to authenticate and authorize a specific user fic user or group of users to run itor group of users to run itRole basedRole basedDefines Security constraints mostly for web resourcesDefines Security constraints mostly for web resourcesAccessed rules for J2EE components Accessed rules for J2EE components Constraints and mappings will be defined by development teams inConstraints and mappings will be defined by development teams indeployment descriptors of J2EE modulesdeployment descriptors of J2EE modules

Page 71: about websphere

J2EE: Development RolesJ2EE: Development Roles

J2EE Product ProviderJ2EE Product ProviderImplements J2EE API’s IBM WebSphere, BEA Weblogic etc..Implements J2EE API’s IBM WebSphere, BEA Weblogic etc..

Tool ProviderTool ProviderCustom tools to help J2EE application environmentCustom tools to help J2EE application environment

Application component providerApplication component providerEJB developerEJB developerWeb component developerWeb component developer

Application assemblerApplication assemblerWho assembles pieces togetherWho assembles pieces together

Application Application DeployerDeployerWho deploys application into application serverWho deploys application into application server

Application AdministratorApplication AdministratorWho administer and manage the applicationWho administer and manage the application

Page 72: about websphere

Application Assembly: J2EE Application AssemblyApplication Assembly: J2EE Application Assembly

Any application assembly processTools: AAT, WSAD

EJB

Servlet

Resource filesHTML, GIF, pdf

Clientfiles

JSP

DDs

EAR

.war

jar

App Server

Application assembly is process of packaging and configuring an Application assembly is process of packaging and configuring an enterprise application archive to deploy on application serverenterprise application archive to deploy on application server

Page 73: about websphere

Application Assembly: J2EE PackagingApplication Assembly: J2EE PackagingA J2EE application is packaged as Enterprise Archive (.EAR) fileA J2EE application is packaged as Enterprise Archive (.EAR) fileAn enterprise archive can contain one or more modulesAn enterprise archive can contain one or more modulesEach module will have its own Deployment DescriptorEach module will have its own Deployment DescriptorDeployment Descriptors will contain component configuration , thDeployment Descriptors will contain component configuration , that will at will help container to understand the runtime behavior of componenthelp container to understand the runtime behavior of componentAn .EAR file can containAn .EAR file can contain

.WAR ( web module).WAR ( web module)

.JAR ( either EJB or client JAR).JAR ( either EJB or client JAR)

.RAR( J2C resource adaptors).RAR( J2C resource adaptors)

.EAR DD

EJB(.jar)One or more EJBs

Web(.war)JSPs,Servlet,html and

othersClient (.jar)

.rarResourceadaptor

DD DD DD

Page 74: about websphere

Application Assembly: Application ContentsApplication Assembly: Application ContentsIn addition to the J2EE standard DD, vendor specific configuratiIn addition to the J2EE standard DD, vendor specific configuration files (extensions)on files (extensions)These extensions help the generic J2EE apps to fit into the custThese extensions help the generic J2EE apps to fit into the custom environmentom environmentIBM implemented these extensions with two filesIBM implemented these extensions with two files

IBM bindingsIBM bindingsHelps to bind application names to platform specific resourcesHelps to bind application names to platform specific resourcesStored in .ear,.jar,.war filesStored in .ear,.jar,.war filesExample Example ibmibm--applicationapplication--bnd.xmlbnd.xml, , ibmibm--ejbejb--jarjar--bnd.xml,ibmbnd.xml,ibm--webweb--bnd.xmlbnd.xml

IBM extensionsIBM extensionsConfiguration for additional services those are not part of J2EEConfiguration for additional services those are not part of J2EE spec.spec.Application Reloading attributes, caching , Access, Isolation etApplication Reloading attributes, caching , Access, Isolation etc.c.FileServingFileServing, , ServletServlet Invoker (to serve Servlets by Invoker (to serve Servlets by classnameclassname), reload ), reload interval, directory browsing, transaction isolation etc..interval, directory browsing, transaction isolation etc..Example Example ibmibm--applicationapplication--ext.xmlext.xml, , ibmibm--ejbejb--jarjar--ext.xml,ibmext.xml,ibm--webweb--ext.xmlext.xml

Database related filesDatabase related filesTo help Entity Enterprise beansTo help Entity Enterprise beansMaps EJB fields to schema fieldsMaps EJB fields to schema fieldsDDL to for table creationDDL to for table creation

Page 75: about websphere

AAT: Application Assembly ToolAAT: Application Assembly ToolAAT delivers with WebSphere application AAT delivers with WebSphere application server that helps to build/package server that helps to build/package applications according to J2EE specificationapplications according to J2EE specificationBuildableBuildable/editable modules including/editable modules including

EJB modulesEJB modulesWeb modulesWeb modulesEAR (Application) modulesEAR (Application) modulesClient ModulesClient ModulesRAR (Resource adaptor) modulesRAR (Resource adaptor) modules

AAT 5.0 supports J2EE 1.3AAT 5.0 supports J2EE 1.3To start the tool, run the command To start the tool, run the command /WebSphere//WebSphere/AppServer/bin/assembly.shAppServer/bin/assembly.shAAT is wizard based, runs independent AAT is wizard based, runs independent from application serverfrom application serverAAT can be used to modify Deployment AAT can be used to modify Deployment Descriptors, Binding and ExtensionsDescriptors, Binding and Extensions

Page 76: about websphere

AAT: Using AATAAT: Using AAT

WebModule

Workspace

SecurityRoles

DD

EJB Module

Toolbar

Page 77: about websphere

AAT: Deployment DescriptorAAT: Deployment Descriptorapplication.xml defines all modules in application.xml defines all modules in EAR fileEAR file

EJB Module

Web Module

ejb-jar.xml Web.xml

Page 78: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface--EJB moduleEJB module

General TabGeneral TabClasspathClasspath and client jarand client jar

IBM ExtensionsIBM ExtensionsEJB generalizations, EJB generalizations, inheritanceinheritance

BindingsBindingsDefault Default DatasoruceDatasoruce JNDI for JNDI for CMPCMP

General TabGeneral TabSpecify EJB classesSpecify EJB classes

IBM ExtensionsIBM ExtensionsCache, timeout and transactionsCache, timeout and transactions

BindingsBindingsJNDI name for EJBJNDI name for EJB

Page 79: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface--Web ModulesWeb ModulesGeneral TabGeneral Tab

Class for the web applicationClass for the web applicationAdvancedAdvanced

Session time out, authorizationSession time out, authorizationExtensionsExtensions

Reloading, directory browsingReloading, directory browsingBindingBinding

To locate external resourcesTo locate external resources

Page 80: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface--RAR, Client ModulesRAR, Client Modules

Resource Adaptor module Resource Adaptor module can be used to create/edit can be used to create/edit J2C resource adaptorsJ2C resource adaptors

Client module can be Client module can be used to create/edit used to create/edit client jar fileclient jar file

Page 81: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface-- VerificationVerificationAAT can run verification on ArchivesAAT can run verification on ArchivesVerification check will determine problems in deployment descripVerification check will determine problems in deployment descriptorstorsEAR, WAR , JAR and EJB jars will get verifiedEAR, WAR , JAR and EJB jars will get verified

Verify

Page 82: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface-- Global EJB JNDIGlobal EJB JNDI

Within module EJB Within module EJB lookup using EJB lookup using EJB referencereferenceWe can bind this to We can bind this to global JNDI nameglobal JNDI name

Page 83: about websphere

AAT: Exploring InterfaceAAT: Exploring Interface-- EJB transactionsEJB transactionsTransactions can set to EJB Transactions can set to EJB methodsmethodsTo set transactions properties, right To set transactions properties, right click on “Container Transactions” click on “Container Transactions” and click new. and click new.

Methods

Transaction Attributes

Transactions isolation Transactions isolation levels can set to EJB levels can set to EJB methodsmethodsIsolation specifies the Isolation specifies the transaction behavior in transaction behavior in side the EJB methodside the EJB method

Page 84: about websphere

Employee Application: Introduction to Employee Employee Application: Introduction to Employee ApplicationApplication

Employee application is sample application that connects to oracEmployee application is sample application that connects to oracle’s le’s default database and pulls the employee detailsdefault database and pulls the employee detailsFunctionalityFunctionality

List All employeesList All employeesAdd employeeAdd employeeEdit employee DetailsEdit employee DetailsDelete EmployeeDelete Employee

There are two modulesThere are two modulesEmpDemoWeb.warEmpDemoWeb.war( front( front--end JSP pages)end JSP pages)

To list employeesTo list employeesTo delete employeeTo delete employeeTo edit employeeTo edit employee

EmpDemoEjb.jarEmpDemoEjb.jarSession EJB , Session EJB , EmpServiceEmpService , that provides following functionality, that provides following functionality

DB connectionDB connectionMethods for getting employee list, and to add and delete Methods for getting employee list, and to add and delete employeesemployees

Page 85: about websphere

Employee Application: Employee Application ScreensEmployee Application: Employee Application Screens

Welcome pageWelcome page

Page 86: about websphere

Employee Application: Employee Application ScreensEmployee Application: Employee Application Screens

Add new Employee

Page 87: about websphere

Installing Enterprise Applications: Two ChoicesInstalling Enterprise Applications: Two Choices

Two choices to deploy the Two choices to deploy the applicationsapplications

Web admin consoleWeb admin consoleWsadmin command toolWsadmin command tool

Web admin consoleWeb admin consoleEasy to configureEasy to configureEasy Access to errors logsEasy Access to errors logsGood for entry level usersGood for entry level users

WsadminWsadminGood for repetitive tasksGood for repetitive tasksCommands can store in JACL Commands can store in JACL filesfilesBetter option for multi Better option for multi server production server production environments

Administrative Server

Admin Console

Xml Configfiles

WsadminJACL command

file

User

environments

Page 88: about websphere

Installing Enterprise Applications: Tasks & LocationsInstalling Enterprise Applications: Tasks & LocationsFollowing tasks can be achieved via admin consoleFollowing tasks can be achieved via admin console

Create Application ServerCreate Application ServerInstall, uninstall , update, start and stop applicationsInstall, uninstall , update, start and stop applicationsConfigure application environment (variables virtual hosts, Configure application environment (variables virtual hosts, classpathsclasspaths, , security and console users)security and console users)Configure Resources , those will be used by applicationsConfigure Resources , those will be used by applications

JDBC provider, Data sourceJDBC provider, Data sourceJMS providerJMS providerMail, URL and Resource AdaptorMail, URL and Resource Adaptor

LocationsLocationsThe location of the EAR file before the installation could beThe location of the EAR file before the installation could be

/WebSphere//WebSphere/AppServer/installbleAppsAppServer/installbleApps

The location of the EAR file after the installation will beThe location of the EAR file after the installation will be/WebSphere//WebSphere/AppServer/installedAppsAppServer/installedAppsDuring the installation the EAR file will extracted to During the installation the EAR file will extracted to installedAppsinstalledApps folderfolder

ApplicationsApplicationsCommon application file is .EAR file ( Enterprise Archive)Common application file is .EAR file ( Enterprise Archive)

Ear composed of one or multiple modules of Ear composed of one or multiple modules of Jar, Jar, EjbEjb jar, .jar, .rarrarWar (JSP’s , Servlets etc)War (JSP’s , Servlets etc)

Application Server is necessary before installing the applicatioApplication Server is necessary before installing the applicationnApplication should always link to application Server and Server Application should always link to application Server and Server Server should be running before attempting to install the applicServer should be running before attempting to install the applicationation

Page 89: about websphere

Installing Enterprise Applications: Creating Application Installing Enterprise Applications: Creating Application ServerServer

By default WebSphere By default WebSphere providers an application server providers an application server “server1”“server1”Multiple Application Servers will Multiple Application Servers will provide isolation between provide isolation between applicationsapplicationsEach application server runs in Each application server runs in its own JVMits own JVMTo Create Application Server To Create Application Server selectselectServers>Application Servers>Application Servers>NewServers>NewIn WebSphere Base admin In WebSphere Base admin console is attached default console is attached default server server1server server1WebSphere base is single WebSphere base is single server compatible, multiple server compatible, multiple servers can be added but can servers can be added but can not administer via admin not administer via admin consoleconsole

Page 90: about websphere

Installing Enterprise Applications: Creating Application Installing Enterprise Applications: Creating Application ServerServer

1.1. Select NodeSelect Node1.1. In Network Deployment In Network Deployment

environment , we can environment , we can choose which node we choose which node we want to create the want to create the server onserver on

2.2. Enter NameEnter Name3.3. Choose to Generate Choose to Generate

Unique HTTP transport Unique HTTP transport portsports

1.1. WebSphere will manage WebSphere will manage to create unique ports to create unique ports for transports for transports

4.4. Select TemplateSelect Template1.1. Template to get high Template to get high

level properties from level properties from existing serversexisting servers

5.5. Click Next

12

4

3

5

Click Next

Page 91: about websphere

Installing Enterprise Applications: Creating Application Installing Enterprise Applications: Creating Application ServerServer

Read for the listed issues Read for the listed issues or problemsor problemsClick on Finish to confirm Click on Finish to confirm the creationthe creationSave the configuration by Save the configuration by clicking on the “save” linkclicking on the “save” linkClick on Application Click on Application Servers link to see the Servers link to see the new server in the servers new server in the servers listlist

Page 92: about websphere

Installing Enterprise Applications: Creating JDBC ProviderInstalling Enterprise Applications: Creating JDBC Provider

JDBC driver is vendor JDBC driver is vendor specific implementation specific implementation of JDBC API to connect of JDBC API to connect from java to DBfrom java to DBJDBC provider should be JDBC provider should be created before creating created before creating Data SourceData SourceOne JDBC provider One JDBC provider needed for each unique needed for each unique Database driverDatabase driverJDBC providers can be JDBC providers can be defined at cell, node or defined at cell, node or server levelserver levelTo create JDBC provider To create JDBC provider click on Resourcesclick on Resources-->JDBC provider>JDBC provider-->New>New

Page 93: about websphere

Installing Enterprise Applications: Creating JDBC ProviderInstalling Enterprise Applications: Creating JDBC ProviderSelect the appropriate Select the appropriate provider from the list and provider from the list and click on applyclick on applyThe The classpathclasspath variable variable needs to be properly needs to be properly defined to point the physical defined to point the physical location of driver location of driver implementationimplementationClasspathClasspath can be set by can be set by directly specifying location directly specifying location or via environment variableor via environment variableClick apply to save Click apply to save information , now it will information , now it will show the data source links show the data source links at the bottom of the screenat the bottom of the screenTo add Data source Click on To add Data source Click on the “Data Sources” the “Data Sources” “Data Source Version 4” is “Data Source Version 4” is used old connection used old connection manager and compatible manager and compatible with WebSphere 4.xwith WebSphere 4.x

Page 94: about websphere

Installing Enterprise Applications: Creating Data SourceInstalling Enterprise Applications: Creating Data Source

Data Source is Data Source is connection manager connection manager implementation , that implementation , that helps for connection helps for connection poolingpoolingClick on Data Sources Click on Data Sources to get the existing list to get the existing list of Data Sources for the of Data Sources for the JDBC provider SourcesJDBC provider SourcesClick on “New” to add Click on “New” to add new Data Sourcenew Data Source

Page 95: about websphere

Installing Enterprise Applications: Creating Data SourceInstalling Enterprise Applications: Creating Data SourceProvide Name, JNDI Provide Name, JNDI name etc. and click on name etc. and click on Apply( for Apply( for example:jdbcexample:jdbc/EMPDEM/EMPDEMO_DS)O_DS)JNDI name is name JNDI name is name used by developers in used by developers in the codethe codeJ2C authentication need J2C authentication need to be defined before to be defined before using the data sourceusing the data sourceConfigure the Custom Configure the Custom Properties before using Properties before using data source with data data source with data base name and server base name and server addressaddressConnection pools sizes Connection pools sizes can be defined in the can be defined in the Connection Pool Connection Pool configuration

3

2

1

configuration

Page 96: about websphere

Installing Enterprise Applications: J2C authentication for Installing Enterprise Applications: J2C authentication for Data SourceData Source

Click on “J2C Authentication Application Data Entries” as shown Click on “J2C Authentication Application Data Entries” as shown in the in the previous screenprevious screenSpecify the alias nameSpecify the alias nameSpecify the user id and passwordSpecify the user id and passwordUser id and password must be valid authentication entries in theUser id and password must be valid authentication entries in theauthentication mechanism usedauthentication mechanism used

Page 97: about websphere

Installing Enterprise Applications: Data Source Custom Installing Enterprise Applications: Data Source Custom PropertiesProperties

Specify Specify databaseNamedatabaseName, , urlurl, , serverNameserverName etc.. Others are optionaletc.. Others are optional

Page 98: about websphere

Installing Enterprise Applications: Data Source Connection Installing Enterprise Applications: Data Source Connection PoolPool

We can set Connection timeout, max, min , reap, other time outsWe can set Connection timeout, max, min , reap, other time outs....The values will be defined as per application’s transaction requThe values will be defined as per application’s transaction requirementsirementsUn appropriate values may impact the application performanceUn appropriate values may impact the application performance

Page 99: about websphere

Installing Enterprise Applications: Install new Application Installing Enterprise Applications: Install new Application ((EmpDemoEmpDemo))

To Install new To Install new application select application select ApplicationsApplications-->Install >Install New ApplicationNew ApplicationClick on browse Click on browse button to locate the button to locate the EAR file.EAR file.Click NextClick NextTo get the list To get the list installed applications installed applications select Applicationsselect Applications-->Enterprise >Enterprise ApplicationsApplications

Page 100: about websphere

Installing Enterprise Applications:Install new Application Installing Enterprise Applications:Install new Application ((EmpDemoEmpDemo))

Configure JNDI Configure JNDI bindings for bindings for EJB’sEJB’sWebSphere will assign WebSphere will assign default JNDI for any default JNDI for any EJBs, those are left by EJBs, those are left by developerdeveloperOption to allow Option to allow WebSphere to override WebSphere to override the developer specified the developer specified JNDI names.JNDI names.Virtual Host for Web Virtual Host for Web modulesmodulesClick NextClick NextNote:Note: In most cases In most cases default values on this default values on this page will work without page will work without any changes.any changes.

Page 101: about websphere

Installing Enterprise Applications: Install new Application Installing Enterprise Applications: Install new Application ((EmpDemoEmpDemo))

PrePre--compile JSP’s will compile JSP’s will helps to find the errors helps to find the errors before access, also before access, also avoids delay in first avoids delay in first time accesstime accessDirectory to install, Directory to install, default default //AppServer/installableAAppServer/installableAppsppsCheck the Check the DeployEJBsDeployEJBsoption , if the option , if the EJB’sEJB’s are are not deployed in EAR.not deployed in EAR.Enable class reloading Enable class reloading and reload interval to and reload interval to automatically update automatically update the the EJB’sEJB’s

Page 102: about websphere

Installing Enterprise Applications: Install new Application Installing Enterprise Applications: Install new Application ((EmpDemoEmpDemo))

Specify JNDI names Specify JNDI names for for EJB’sEJB’s (keep the (keep the default values)default values)Click NextClick Next

Page 103: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

Specify virtual host Specify virtual host where you want to where you want to install web install web modules(keep the modules(keep the default values)default values)Virtual hosts enable Virtual hosts enable you to isolate, and you to isolate, and independently independently manage, multiple manage, multiple sets of resources on sets of resources on the same physical the same physical machinemachineClick NextClick Next

Page 104: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

Map modules to Map modules to application servers (keep application servers (keep default values)default values)One application can be One application can be distributed on to multiple distributed on to multiple serversserversCheck the module Check the module checkbox , then choose checkbox , then choose the server from the list the server from the list and then click Applyand then click ApplyClick Next Click Next Note:Note: If you have only If you have only Base install, even though Base install, even though you see two server, you you see two server, you should always select should always select ”server1””server1”

Page 105: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

Specify EJB Specify EJB method method protection( keep protection( keep the default the default values)values)Click Next Click Next

Page 106: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

Read the summaryRead the summaryClick FinishClick FinishClick save to change the Click save to change the configurationconfiguration

Page 107: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

After the installation we After the installation we cancan

StartStartStopStopUninstallUninstallUpdateUpdateExportExportExport DDLExport DDL

Page 108: about websphere

Installing Enterprise Applications: Install New Application Installing Enterprise Applications: Install New Application ((EmpDemoEmpDemo))

Install Application via wsadmin (command line installer)Install Application via wsadmin (command line installer)Start the wsadmin from command promptStart the wsadmin from command prompt

/WebSphere/AppServer/bin/wsadmin.sh/WebSphere/AppServer/bin/wsadmin.sh<WAS Home><WAS Home>\\/WebSphere/WebSphere\\AppServerAppServer\\binbin\\wsadmin.batwsadmin.bat

Locate the application EAR and issue the command at wsadmin promLocate the application EAR and issue the command at wsadmin promptptWsadmin> Wsadmin> AdminAppAdminApp install <file path>install <file path>EmpDemo.earEmpDemo.ear

Page 109: about websphere

WebSphere Class LoadersWebSphere Class LoadersClass loaders are part of the Java virtual machine (JVM) code anClass loaders are part of the Java virtual machine (JVM) code and are d are responsible for finding and loading class filesresponsible for finding and loading class filesClass loaders affects packaging of applications and run time behClass loaders affects packaging of applications and run time behavior of avior of applicationsapplicationsThe runThe run--time environment of WebSphere Application Server uses the time environment of WebSphere Application Server uses the following class loaders to find and load new classes for an applfollowing class loaders to find and load new classes for an application in ication in the following orderthe following order

Bootstrap Bootstrap classpathclasspath ( typically loads from ( typically loads from jrejre/lib)/lib)WebSphere specific extensions class loaderWebSphere specific extensions class loaderApplication module class loader ( Web modules, EJB modules)Application module class loader ( Web modules, EJB modules)

Application Server JVM

Jvm/bootstrap class loader

WebSphere extensionsClass loader

Application moduleClass loader

Page 110: about websphere

WebSphere Module Class LoadersWebSphere Module Class Loaders

Two classTwo class--loader policies control the isolation of loader policies control the isolation of applications and modulesapplications and modulesApplication classApplication class--loader policy loader policy

Application class loaders consist of EJB Application class loaders consist of EJB modules, dependency JAR files, resource modules, dependency JAR files, resource adapters, and shared librariesadapters, and shared librariesWhen set to SINGLE, applications are not When set to SINGLE, applications are not isolated. When set to MULTIPLE, applications isolated. When set to MULTIPLE, applications are isolated from each other are isolated from each other

WAR classWAR class--loader policyloader policyBy default, Web module class loaders load the By default, Web module class loaders load the contents of the WEBcontents of the WEB--INF/classes and WEBINF/classes and WEB--INF/lib directories.INF/lib directories.If this policy is set to APPLICATION, then the If this policy is set to APPLICATION, then the Web module contents also are loaded by the Web module contents also are loaded by the application class loader (in addition to the EJB application class loader (in addition to the EJB files, RAR files, dependency JAR files, and files, RAR files, dependency JAR files, and shared libraries). If the policy is set to shared libraries). If the policy is set to MODULE, then each web module receives its MODULE, then each web module receives its own class loader whose parent is the own class loader whose parent is the application class loaderapplication class loader

Page 111: about websphere

WebSphere: Class Loaders ModesWebSphere: Class Loaders ModesClassClass--loader modesloader modes

There are two possible values for a classThere are two possible values for a class--loader mode:loader mode:PARENT_FIRSTPARENT_FIRST

The PARENT_FIRST classThe PARENT_FIRST class--loader mode causes the class loader to loader mode causes the class loader to first delegate the loading of classes to its parent class loaderfirst delegate the loading of classes to its parent class loader before before attempting to load the class from its local attempting to load the class from its local classpathclasspath. This is the . This is the default for classdefault for class--loader policy and for standard JVM class loaders. loader policy and for standard JVM class loaders.

PARENT_LASTPARENT_LASTThe PARENT_LAST classThe PARENT_LAST class--loader mode causes the class loader to loader mode causes the class loader to first attempt to load classes from its local first attempt to load classes from its local classpathclasspath before before delegating the class loading to its parent. This policy allows adelegating the class loading to its parent. This policy allows an n application class loader to override and provide its own versionapplication class loader to override and provide its own version of a of a class that exists in the parent class loaderclass that exists in the parent class loaderExample : log4j.jar or xml parser might be provided by applicatiExample : log4j.jar or xml parser might be provided by application on server provider, but if development team decided not to use thesserver provider, but if development team decided not to use these e libraries they can use specific versions delivered with their aplibraries they can use specific versions delivered with their app. p.

Page 112: about websphere

WebSphere 5.0 Network Deployment InstallWebSphere 5.0 Network Deployment Install

IBM WebSphere Application Server Network Deployment V5.0 consistIBM WebSphere Application Server Network Deployment V5.0 consists s of the base WebSphere Application Server and the Network Deploymof the base WebSphere Application Server and the Network Deployment ent addadd--on module.on module.A Network Deployment configuration includes support for multipleA Network Deployment configuration includes support for multiplenodes, each with a node agent process and several application senodes, each with a node agent process and several application servers, rvers, all coordinated within an administrative cell by the Deployment all coordinated within an administrative cell by the Deployment Manager Manager process. process. Clusters of loadClusters of load--balanced application servers can be configured within a balanced application servers can be configured within a Network Deployment cell.Network Deployment cell.The configuration and application binaries of all components in The configuration and application binaries of all components in the cell the cell are managed by the Deployment Manager and synchronized out to loare managed by the Deployment Manager and synchronized out to local cal copies on each of the nodes.copies on each of the nodes.

Page 113: about websphere

WebSphere 5.0 Network Deployment RunWebSphere 5.0 Network Deployment Run--time time ArchitectureArchitecture

Page 114: about websphere

WebSphere 5.0 Network Deployment OverviewWebSphere 5.0 Network Deployment Overview

A A cell cell is a network of nodes in a logical administration domain.is a network of nodes in a logical administration domain.A A node node is a machine on which you are running an application server.is a machine on which you are running an application server.The The deployment deployment or or cell manager cell manager manages the nodes in a cell.manages the nodes in a cell.A A node agent node agent resides on each node and manages the servers running resides on each node and manages the servers running on the node.on the node.A A managed process managed process or or server server is an application server, JMS server, node is an application server, JMS server, node agent, or deployment manager. Each server runs in its own JVM.agent, or deployment manager. Each server runs in its own JVM.A A cluster cluster is a set of servers that are managed together and participate is a set of servers that are managed together and participate in workload management. Servers in a cluster can be on one node in workload management. Servers in a cluster can be on one node (vertical clustering) or on multiple nodes (horizontal clusterin(vertical clustering) or on multiple nodes (horizontal clustering).g).

Page 115: about websphere

WebSphere 5.0 Network Deployment TopologyWebSphere 5.0 Network Deployment Topology

Node

Node Node

cell

Deployment manager

Node agent

App server

Node agent

App server

App server

Page 116: about websphere

WebSphere 5.0 Network Deployment InstallationWebSphere 5.0 Network Deployment Installation

1. Log in as root and start a terminal session.1. Log in as root and start a terminal session.2. Insert and mount the IBM WebSphere 2. Insert and mount the IBM WebSphere Application Server Network Deployment V5.0 Application Server Network Deployment V5.0 CDCD--ROM:ROM:

mount /mnt/cdrommount /mnt/cdrom3. Start the WebSphere Application Server 3. Start the WebSphere Application Server LaunchPad. For example:LaunchPad. For example:

cd /mnt/cdromcd /mnt/cdrom./LaunchPad.sh./LaunchPad.sh

Extract “Extract “ibmwas5_nd_nt.zipibmwas5_nd_nt.zip” file from ” file from “c:“c:\\softwares” folder and double click on softwares” folder and double click on “Install.exe” or Launch.bat“Install.exe” or Launch.bat

4. In the Language Selection window, select 4. In the Language Selection window, select English English and click and click OKOK..5. In the Network Deployment LaunchPad 5. In the Network Deployment LaunchPad window, click window, click Install the productInstall the product, as shown, as shown

Page 117: about websphere

WebSphere 5.0 Network Deployment Installation Cont.WebSphere 5.0 Network Deployment Installation Cont.

6.In the wizard language selection window, select 6.In the wizard language selection window, select English English and and click click OKOK..7. In the Welcome to WebSphere Application Server Network 7. In the Welcome to WebSphere Application Server Network Deployment window, click Deployment window, click Next Next to continue.to continue.8. In the software license agreement window, select 8. In the software license agreement window, select I accept I accept the terms in the license agreement the terms in the license agreement and click and click Next Next to agree to agree to the terms of the agreement.to the terms of the agreement.9. Click 9. Click Next Next in the features selection window,in the features selection window,

Page 118: about websphere

WebSphere 5.0 Network Deployment InstallationWebSphere 5.0 Network Deployment Installation

10.In the setting the installation 10.In the setting the installation directories window, click directories window, click Next Next to accept to accept the default installation directory: the default installation directory: /opt/WebSphere//opt/WebSphere/DeploymentManagerDeploymentManager..On windows, please choose the path On windows, please choose the path “c:“c:\\IBMIBM\\websphere5websphere5\\DeploymentManagerDeploymentManager””

11.In the node, host and cell name 11.In the node, host and cell name window, enter the node name, host window, enter the node name, host name, and cell name for your installation. name, and cell name for your installation.

Make a note of the following Make a note of the following names, because we will need them names, because we will need them later:later:

–– Node NameNode Name–– Host Name or IP AddressHost Name or IP Address–– Cell NameCell Name

Click Click NextNext..

Page 119: about websphere

WebSphere 5.0 Network Deployment Installation Cont.WebSphere 5.0 Network Deployment Installation Cont.

12.In the next window, verify your installation settings, and 12.In the next window, verify your installation settings, and click click Next Next to start the installation.to start the installation.13.Once the installation is complete, click 13.Once the installation is complete, click Finish Finish in Installation in Installation Wizard finished window.Wizard finished window.After a successful installation of IBM WebSphere Application After a successful installation of IBM WebSphere Application Server Network Deployment V5.0 the First Steps window will Server Network Deployment V5.0 the First Steps window will automatically start. Click automatically start. Click Exit Exit totoclose First Steps, then click close First Steps, then click Exit Exit to close LaunchPad.to close LaunchPad.Tip: Tip: You can monitor the installation progress by checking the You can monitor the installation progress by checking the log file. For example:log file. For example:tail tail --f /f /tmp/log.txttmp/log.txt

Page 120: about websphere

WebSphere 5.0 Cluster ConfigurationWebSphere 5.0 Cluster Configuration

A A cluster cluster is a set of servers that are managed together and participate is a set of servers that are managed together and participate in workload management. Servers in a cluster can be on one node in workload management. Servers in a cluster can be on one node (vertical clustering) or on multiple nodes (horizontal clusterin(vertical clustering) or on multiple nodes (horizontal clustering).g).

Page 121: about websphere

WebSphere 5.0 Horizontal Cluster ConfigurationWebSphere 5.0 Horizontal Cluster Configuration

Stop the WebSphere Administrative Server if both Network DeploymStop the WebSphere Administrative Server if both Network Deployment ent and Base sharing the same boxand Base sharing the same box

Page 122: about websphere

WebSphere 5.0 Horizontal Cluster ConfigurationWebSphere 5.0 Horizontal Cluster Configuration

1. Log in as root and start a terminal session.1. Log in as root and start a terminal session.2. Start the Deployment Manager, for example:2. Start the Deployment Manager, for example:

cd /opt/WebSphere/DeploymentManager/bin/startManager.shcd /opt/WebSphere/DeploymentManager/bin/startManager.sh<WAS Home><WAS Home>\\WebSphereWebSphere\\DeploymentManagerDeploymentManager\\binbin\\startManager.batstartManager.bat

3. To open the Administrative Console, start your Web 3. To open the Administrative Console, start your Web browser and enter the following URL:browser and enter the following URL:

http://localhost:9090/adminhttp://localhost:9090/admin

4. The Administrative Console Login window should 4. The Administrative Console Login window should appear. Enter a user ID and click appear. Enter a user ID and click OKOK..5. Once we have started the Deployment Manager, we 5. Once we have started the Deployment Manager, we can add a node to the cell. To add a node to the cell:can add a node to the cell. To add a node to the cell:

Page 123: about websphere

WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) tWebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) to the Cello the Cella. On the machine you want to add to the cell, log in as root ana. On the machine you want to add to the cell, log in as root and start a terminal session.d start a terminal session.b. Use the b. Use the addNode addNode command to add the node to the cell:command to add the node to the cell:./addNode.sh <cell_host> <cell_port> ./addNode.sh <cell_host> <cell_port> --includeappsincludeappsaddNode.bat <cell_host> <cell_port> addNode.bat <cell_host> <cell_port> --includeappsincludeapps

Where:Where:<cell_host> is the host name of the deployment manager. Use the<cell_host> is the host name of the deployment manager. Use the

host name you noted during the installation.host name you noted during the installation.<cell_port> is by default port 8879.<cell_port> is by default port 8879.The The --includeapps option will include the installed applications on thincludeapps option will include the installed applications on this server node.is server node.

For example:For example:cd /opt/WebSphere/AppServer/bincd /opt/WebSphere/AppServer/bin./addNode.sh student6 8879 ./addNode.sh student6 8879 ––includeappsincludeapps./addNode.sh student6 8879 ./addNode.sh student6 8879 ––includeappsincludeapps

cd <WAS Home>cd <WAS Home>\\optopt\\WebSphereWebSphere\\AppServerAppServer\\binbinaddNode.bat student6 8879 addNode.bat student6 8879 ––includeappsincludeappsaddNode.bat student6 8879 addNode.bat student6 8879 --includeappsincludeapps

Repeat for the second node, or any additional nodesRepeat for the second node, or any additional nodes6. Back in the Deployment Manager Administrative Console, select6. Back in the Deployment Manager Administrative Console, select System Administration System Administration --> > Nodes Nodes in the navigation pane. In the Nodes list, you should be able toin the navigation pane. In the Nodes list, you should be able to see the nodes in your see the nodes in your cell with the host name of your machines, as shown in following cell with the host name of your machines, as shown in following screenscreen

Page 124: about websphere

WebSphere 5.0 Horizontal Cluster Configuration Adding WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) to the CellNode(s) to the Cell

Page 125: about websphere

WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) to the Cellto the Cell

1. In the left navigation pane of the Administration Console, se1. In the left navigation pane of the Administration Console, select lect Servers Servers -->Clusters>Clusters,,

Page 126: about websphere

WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) WebSphere 5.0 Horizontal Cluster Configuration Adding Node(s) to the Cellto the Cell

2. In the Server Cluster form, click 2. In the Server Cluster form, click NewNew..3. In the Create New Cluster form, enter a Cluster Name, for exa3. In the Create New Cluster form, enter a Cluster Name, for example mple ITSOCluster, leave the remaining fields at their default values,ITSOCluster, leave the remaining fields at their default values, and click and click NextNext..4. In the Create New Clustered Servers form, enter a name, for e4. In the Create New Clustered Servers form, enter a name, for examplexampleITSO_WLM_Server1, select the node, for example appsrv1l, leave tITSO_WLM_Server1, select the node, for example appsrv1l, leave theheremaining fields at their default values, and click remaining fields at their default values, and click ApplyApply, as shown below, as shown below

Page 127: about websphere

WebSphere 5.0 Horizontal Cluster Configuration, Start the WebSphere 5.0 Horizontal Cluster Configuration, Start the ClusterCluster

Starting the clusterStarting the clusterThe next step is to start the cluster:The next step is to start the cluster:1. In the left navigation pane, select 1. In the left navigation pane, select Servers Servers --> Clusters> Clusters..2. In the Server Cluster form, check 2. In the Server Cluster form, check ITSOClusterITSOCluster, then click , then click StartStart, as , as shown belowshown below

Page 128: about websphere

WebSphere 5.0 Horizontal Cluster Configuration, Start the ClustWebSphere 5.0 Horizontal Cluster Configuration, Start the Clusterer

3. To verify if the ITSOCluster has started, open a terminal 3. To verify if the ITSOCluster has started, open a terminal window on each of the cluster server nodes and tail the cluster window on each of the cluster server nodes and tail the cluster server log.server log.In our example, we opened a terminal session on appsrv1l and In our example, we opened a terminal session on appsrv1l and entered the following command:entered the following command:

tail tail --f /opt/WebSphere/AppServer/logs/ITSO_WLM_Server1/SystemOut.logf /opt/WebSphere/AppServer/logs/ITSO_WLM_Server1/SystemOut.logOpen the file by double clicking on it, on windowsOpen the file by double clicking on it, on windows

We then opened a terminal session on appsrv2l and entered the We then opened a terminal session on appsrv2l and entered the following command:following command:

tail tail --f /opt/WebSphere/AppServer/logs/ITSO_WLM_Server2/SystemOut.logf /opt/WebSphere/AppServer/logs/ITSO_WLM_Server2/SystemOut.logOpen the file by double clicking on it, on windowsOpen the file by double clicking on it, on windows

You should see an entry similar to “Server You should see an entry similar to “Server ITSO_WLM_Server[1|2] open for eITSO_WLM_Server[1|2] open for e--business” in both logs, when business” in both logs, when each cluster server has started.each cluster server has started.The Server Cluster pane in the Administrative Console should The Server Cluster pane in the Administrative Console should also display the green running icon in the status column for thealso display the green running icon in the status column for theITSOCluster.ITSOCluster.

Page 129: about websphere

WebSphere 5.0 WebSphere 5.0 Deploying a Sample Clustered ApplicationDeploying a Sample Clustered Application

1. Copy your enterprise application archive (EAR) file to the De1. Copy your enterprise application archive (EAR) file to the Deployment Manager ployment Manager installableApps folder, for example:installableApps folder, for example:

cp Hello.ear /opt/WebSphere/DeploymentManager/installableAppscp Hello.ear /opt/WebSphere/DeploymentManager/installableAppsFollow any windows copy procedure to copy the fileFollow any windows copy procedure to copy the file

2. To open the Network Deployment Administrative Console, start 2. To open the Network Deployment Administrative Console, start your Web browser your Web browser and enter the following URL:and enter the following URL:

http://localhost:9090/adminhttp://localhost:9090/admin3. The Administrative Console Login window should appear. Enter 3. The Administrative Console Login window should appear. Enter a user ID and click a user ID and click OKOK..4. Select 4. Select Applications Applications --> Install New Application > Install New Application in the navigation pane on the in the navigation pane on the left.left.5. In the Preparing for the application installation window, bro5. In the Preparing for the application installation window, browse to the installableApps wse to the installableApps folder, select the EAR filefolder, select the EAR file

/opt/WebSphere//opt/WebSphere/DeploymentManager/installableApps/Hello.earDeploymentManager/installableApps/Hello.ear..C:C:\\><WAS Home>><WAS Home>\\WebSphereWebSphere\\DeploymentManagerDeploymentManager\\installableAppsinstallableApps\\Hello.earHello.ear..and click and click NextNext, ,

6. Click 6. Click Next Next in the following window to use the existing bindings and mappingin the following window to use the existing bindings and mappings defined s defined in the EAR file.in the EAR file.

Page 130: about websphere

WebSphere 5.0 WebSphere 5.0 Deploying a Sample Clustered ApplicationDeploying a Sample Clustered Application

7. In the Install New Application window, click 7. In the Install New Application window, click Next Next to accept the to accept the defaults for Step 1: Provide options to perform the installationdefaults for Step 1: Provide options to perform the installation..8. Click 8. Click Next Next to accept the defaults for Step 2: Map virtual hosts for to accept the defaults for Step 2: Map virtual hosts for Web modules.Web modules.9. In Step 3: Map modules to application servers, check 9. In Step 3: Map modules to application servers, check HelloWebHelloWeb in in the module list, select the module list, select ITSOCluster ITSOCluster from the list of clusters and from the list of clusters and servers, and click servers, and click ApplyApply..You should see the You should see the HelloWebHelloWeb module mapped to the module mapped to the ITSOServerITSOServercluster, as shown belowcluster, as shown below

Page 131: about websphere

WebSphere 5.0 Horizontal Cluster Configuration, Start the ClustWebSphere 5.0 Horizontal Cluster Configuration, Start the Clusterer

10.In Step 4: Summary, review your selections and click 10.In Step 4: Summary, review your selections and click Finish Finish to deploy the to deploy the enterprise application.enterprise application.11.Don’t forget to click 11.Don’t forget to click Save Save after successfully installing the application.after successfully installing the application.12.By default, the newly installed applications are not started.12.By default, the newly installed applications are not started. To start the To start the application, select application, select Applications Applications --> Enterprise Applications> Enterprise Applications, check , check Hello Hello in in the application list, and click the application list, and click StartStart..13.Select 13.Select Environment Environment --> Update Web Server Plugin > Update Web Server Plugin in the navigation in the navigation tree,then click tree,then click OK OK to update the Web server plugto update the Web server plug--in configuration file.in configuration file.14.Copy the plug14.Copy the plug--in configuration file from the Deployment Manager node to in configuration file from the Deployment Manager node to the Web server machine. For example:the Web server machine. For example:

scpscp /opt/WebSphere/DeploymentManager/config/cells/plugin/opt/WebSphere/DeploymentManager/config/cells/plugin--cfg.xml cfg.xml \\websrv1l:/opt/WebSphere/AppServer/config/cells/pluginwebsrv1l:/opt/WebSphere/AppServer/config/cells/plugin--cfg.xmlcfg.xmlCopy the file via shared folder or flash driveCopy the file via shared folder or flash drive

15.Restart the Web server to ensure the plug15.Restart the Web server to ensure the plug--in configuration is rein configuration is re--read:read:/opt/IBMHTTPServer/bin/apachectl restart/opt/IBMHTTPServer/bin/apachectl restartStart from windows servicesStart from windows services

Page 132: about websphere

WebSphere 5.0 Horizontal Cluster Configuration, Start the ClustWebSphere 5.0 Horizontal Cluster Configuration, Start the Clusterer

16.Using a Web browser, enter the URL for the application, for 16.Using a Web browser, enter the URL for the application, for example:example:http://websrv1l/Hello/hello.JSPhttp://websrv1l/Hello/hello.JSP Requests should be workload Requests should be workload managed across the available cluster servers.managed across the available cluster servers.As shown in the screens on next slide , our user requests are As shown in the screens on next slide , our user requests are workload managed across the ITSO WLM Server1 and ITSOWLM workload managed across the ITSO WLM Server1 and ITSOWLM Server2.Server2.Note : Note : WebSphere Network Deployment is not installed on our Web WebSphere Network Deployment is not installed on our Web server machine, so we also must edit the pluginserver machine, so we also must edit the plugin--cfg.xml file and cfg.xml file and replace all path references of replace all path references of /opt/WebSphere/DeploymentManager /opt/WebSphere/DeploymentManager with with /opt/WebSphere/ApplicationServer/opt/WebSphere/ApplicationServer. Also replace the node name . Also replace the node name with IP if you don’t have DNS.with IP if you don’t have DNS.Replace all the occurrences of Replace all the occurrences of C:C:\\><WAS ><WAS Home>Home>\\WebSphereWebSphere\\DeploymentManagDeploymentManagerer with with C:C:\\><WAS Home>><WAS Home>\\WebSphereWebSphere\\ApplicationServerApplicationServer

Page 133: about websphere

WebSphere 5.0 Horizontal Cluster Configuration, Start the WebSphere 5.0 Horizontal Cluster Configuration, Start the ClusterCluster

Page 134: about websphere

Managing WebSphere Application Server Using wsadminManaging WebSphere Application Server Using wsadmin

Two ways to administer & configure WebSphere server and Two ways to administer & configure WebSphere server and applicationsapplications

Web based admin consoleWeb based admin consoleWsadmin scripting interfaceWsadmin scripting interface

What is wsadmin ?What is wsadmin ?Wsadmin is new scripting interface introduced in WAS 5.0Wsadmin is new scripting interface introduced in WAS 5.0Wsadmin helps to configure and manage both application server anWsadmin helps to configure and manage both application server and d applications via scriptingapplications via scripting

wsadmin backgroundwsadmin backgroundBuilt based on BSF (bean scripting frame work), an open source Built based on BSF (bean scripting frame work), an open source projectprojectThe BSF architecture works as an interface between Java The BSF architecture works as an interface between Java applications and scripting languagesapplications and scripting languagesSince wsadmin uses BSF, it can make various Java objects availabSince wsadmin uses BSF, it can make various Java objects available le through languagethrough language--specific interfaces to scriptsspecific interfaces to scripts

Page 135: about websphere

Managing WebSphere Application Server Using wsadminManaging WebSphere Application Server Using wsadmin

There are four objects available to scripts:There are four objects available to scripts:1.1. AdminControl: Used to invoke operational commands.AdminControl: Used to invoke operational commands.2.2. AdminConfig: Used to invoke configurational command to AdminConfig: Used to invoke configurational command to

create or modify WebSphere configurational elementscreate or modify WebSphere configurational elements3.3. AdminApp: Used for administering applicationsAdminApp: Used for administering applications4.4. Help: Used for general helpHelp: Used for general help

The scripts use those objects to communicate with MBeans The scripts use those objects to communicate with MBeans running in WebSphere server processes. Supported scripting running in WebSphere server processes. Supported scripting languages all have ways to invoke methods on the exposed languages all have ways to invoke methods on the exposed Java objects.Java objects.Currently only three scripting languages were tested and Currently only three scripting languages were tested and supported: Java Command language based on Tcl (Jacl), supported: Java Command language based on Tcl (Jacl), JavaScript, and jpython. JavaScript, and jpython.

Page 136: about websphere

Managing WebSphere Application Server Using wsadminManaging WebSphere Application Server Using wsadmin

Scripting functionality in WebSphere 5.0Scripting functionality in WebSphere 5.0

JMX is a technology that provides a simple and standard way to mJMX is a technology that provides a simple and standard way to manage Java anage Java objects. objects. MBeans are Java objects that represent Java Management ExtensionMBeans are Java objects that represent Java Management Extensions (JMX) s (JMX) resources.resources.All processes run the JMX agent.All processes run the JMX agent.All runtime administration is performed through JMX operations.All runtime administration is performed through JMX operations.Connectors are used to connect a JMX agent to a remote JMXConnectors are used to connect a JMX agent to a remote JMX--enabled enabled

management application. The following connectors are currently smanagement application. The following connectors are currently supported:upported:–– SOAP JMX ConnectorSOAP JMX Connector–– RMI/IIOP JMX ConnectorRMI/IIOP JMX Connector

Page 137: about websphere

Configuring wsadminConfiguring wsadminThe properties that determine the scripting environment for wsadThe properties that determine the scripting environment for wsadmin can min can be set either by command line or in a properties file. The propebe set either by command line or in a properties file. The properties file rties file can be set in three places.can be set in three places.The first place is using the system default properties file calThe first place is using the system default properties file called led wsadmin.properties. The file is located in wsadmin.properties. The file is located in WebSphere/AppServer/properties directory.WebSphere/AppServer/properties directory.If you decide not to use the system default properties file, thiIf you decide not to use the system default properties file, this file can be s file can be customized and placed in the user home directory or in $user_homcustomized and placed in the user home directory or in $user_home.e.Third, you can specify properties when you launch wsadmin from Third, you can specify properties when you launch wsadmin from the the command line.command line.Sample properties Sample properties

com.ibm.ws.scripting.connectionType: SOAP, RMI or JMXcom.ibm.ws.scripting.connectionType: SOAP, RMI or JMXcom.ibm.scripting.host: host name of systemcom.ibm.scripting.host: host name of systemCom.ibm.scripting.port : port (8881 for SOAP, 2809 for RMI)Com.ibm.scripting.port : port (8881 for SOAP, 2809 for RMI)com.ibm.ws.scripting.defaultLang: jacl, JavaScript or Jythoncom.ibm.ws.scripting.defaultLang: jacl, JavaScript or Jythoncom.ibm.ws.scripting.traceFile: File for trace informationcom.ibm.ws.scripting.traceFile: File for trace informationcom.ibm.ws.scripting.traceString: =com.ibm.*=all=enabledcom.ibm.ws.scripting.traceString: =com.ibm.*=all=enabled

Page 138: about websphere

Launching wsadminLaunching wsadminThe wsadmin.sh (Unix) or .bat (windows) resides in the bin direcThe wsadmin.sh (Unix) or .bat (windows) resides in the bin directory of the tory of the WebSphere Application Server or Network Deployment installation WebSphere Application Server or Network Deployment installation and can be and can be started from a command prompt with the command:started from a command prompt with the command:/opt/WebSphere/AppServer/bin/wsadmin.sh/opt/WebSphere/AppServer/bin/wsadmin.shTo get syntaxTo get syntax--related help, type wsadmin.sh related help, type wsadmin.sh --??Running a Single CommandRunning a Single Command

The The --c option is used to execute a single command using wsadminc option is used to execute a single command using wsadmin/opt/WebSphere/AppServer/bin/wsadmin.sh /opt/WebSphere/AppServer/bin/wsadmin.sh ––c ‘$AdminControl getNode’c ‘$AdminControl getNode’C:C:\\> > \\<WAS Home><WAS Home>\\AppServerAppServer\\binbin\\wsadmin wsadmin ––c ‘$AdminControl getNode’c ‘$AdminControl getNode’

Running script fileRunning script fileThe The ––f option is used to execute a script file using wsadminf option is used to execute a script file using wsadmin/opt/WebSphere/AppServer/bin/wsadmin.sh /opt/WebSphere/AppServer/bin/wsadmin.sh ––f /opt/f /opt/jacl/myfirstscript.jacljacl/myfirstscript.jaclC:C:\\>/<WAS Home>>/<WAS Home>\\AppServerAppServer\\binbin\\wsadmin wsadmin ––f C:f C:\\jacljacl\\myfirstscript.jaclmyfirstscript.jacl

The script has a .jacl extension( .jacl), letting wsadmin know iThe script has a .jacl extension( .jacl), letting wsadmin know it is an Jacl script. t is an Jacl script. If there is no extension, the com.ibm.ws.scripting.defaultLang pIf there is no extension, the com.ibm.ws.scripting.defaultLang property is used to roperty is used to determine the language. If this setting is not correct, use the determine the language. If this setting is not correct, use the --lang option to identify the scripting language.lang option to identify the scripting language.

Page 139: about websphere

wsadmin Scripting Optionswsadmin Scripting OptionsUsing Using ––profile fileprofile file

The The --profile command line option can be used to specify a profile scrprofile command line option can be used to specify a profile script. ipt. The profile can be used to perform whatever standard initializatThe profile can be used to perform whatever standard initialization is ion is required.required.

Specifying a properties file (Specifying a properties file (--p)p)The The --p option is used to specify a properties file other than p option is used to specify a properties file other than wsadmin.properties located in the WebSphere/AppServer/propertiewsadmin.properties located in the WebSphere/AppServer/properties s directory.directory./opt/WebSphere/AppServer/bin/wsadmin.sh /opt/WebSphere/AppServer/bin/wsadmin.sh ––f /opt/jacl/myfirstscript.jacl f /opt/jacl/myfirstscript.jacl ––p /opt/p /opt/jacl/myproperties.propertiesjacl/myproperties.propertiesC:C:\\>>\\<WAS Home><WAS Home>\\AppServerAppServer\\binbin\\wsadmin.sh wsadmin.sh ––f C:f C:\\jacljacl\\myfirstscript.jacl myfirstscript.jacl ––p C:p C:\\jacljacl\\myproperties.propertiesmyproperties.properties

Help objectHelp objectHelp object provides information about the available methods forHelp object provides information about the available methods for these these objects.objects.

Example : ./Example : ./wsadmin.shwsadmin.sh ––c ‘$Help AdminControl’c ‘$Help AdminControl’C:C:\\> wsadmin > wsadmin ––c ‘$Help AdminControl’c ‘$Help AdminControl’

Getting help for specific commandGetting help for specific commandFollowing syntax helps to find help on any commandsFollowing syntax helps to find help on any commandswsadmin> <wsadmin_object> help <method_name>wsadmin> <wsadmin_object> help <method_name>Example: wsadmin> $AdminApp help installExample: wsadmin> $AdminApp help install

Page 140: about websphere

Wsadmin: Information on Running MBeansWsadmin: Information on Running MBeans

MBeans represents running objects in WebSphere, each server willMBeans represents running objects in WebSphere, each server will have one have one mbean server.mbean server.QueryNames command can be used to find the running objectsQueryNames command can be used to find the running objects

Example : $AdminControl queryNames * ( lists all Example : $AdminControl queryNames * ( lists all mbeansmbeans running mbean running mbean server)server)

If the client is attached to a standIf the client is attached to a stand--alone WebSphere Application Server, the list will alone WebSphere Application Server, the list will contain only MBeans running on that server.contain only MBeans running on that server.If the client is attached to a node agent, the list will contaiIf the client is attached to a node agent, the list will contain MBeans running in the n MBeans running in the

node agent as well as MBeans running on all application servers node agent as well as MBeans running on all application servers on that node.on that node.If the client is attached to a Deployment Manager, the list wilIf the client is attached to a Deployment Manager, the list will contain MBeans l contain MBeans

running in the Deployment Manager, in all node agents communicatrunning in the Deployment Manager, in all node agents communicating with that ing with that Deployment Manager, and all application servers on all the nodesDeployment Manager, and all application servers on all the nodes served by those served by those node agentsnode agentsInformation about all configuration objectsInformation about all configuration objects

wsadmin>$AdminConfig typeswsadmin>$AdminConfig typesFinding operations information for a running Finding operations information for a running MBeanMBean

set set servserv [$AdminControl [$AdminControl completeObjectNamecompleteObjectName type=Server,node=<your type=Server,node=<your node>,*]node>,*]wsadmin>$Help operations $wsadmin>$Help operations $servserv

Page 141: about websphere

Approach for Operational Tasks Using wsadminApproach for Operational Tasks Using wsadmin

Generally two steps to follow each operationGenerally two steps to follow each operationWe first need to know the object name of the running object.We first need to know the object name of the running object.

set set appManagerappManager [$AdminControl queryNames [$AdminControl queryNames type=type=ApplicationManager,cellApplicationManager,cell==bcsi,nodebcsi,node==bcsi,processbcsi,process=server1,*]=server1,*]

Invoke an operation on a running Invoke an operation on a running MBean.(toMBean.(to stop default app)stop default app)$AdminControl invoke $$AdminControl invoke $appManagerappManager startApplicationstartApplicationDefaultApplicationDefaultApplication

You can use the queryNames and You can use the queryNames and completeObjectNamecompleteObjectName commands of commands of the AdminControl object to identify the name of a running objectthe AdminControl object to identify the name of a running object

Page 142: about websphere

Improving wsadmin PerformanceImproving wsadmin PerformanceIf DeploymentManager is running on different fixIf DeploymentManager is running on different fix--pack than node agent , better pack than node agent , better run the wsadmin from deployment managerrun the wsadmin from deployment managerWhen we launch a wsadmin , a new process is created with new JVMWhen we launch a wsadmin , a new process is created with new JVM. So if you . So if you run commands using run commands using ––c option from batch file, the execution will be much slower c option from batch file, the execution will be much slower compare to using compare to using ––f option , that runs all the commands using single JVM.f option , that runs all the commands using single JVM.

Method 1:Method 1:././wsadmin.shwsadmin.sh --c ‘$AdminApp install /opt/myApps/App1.ear {c ‘$AdminApp install /opt/myApps/App1.ear {--appname appl1}’ appname appl1}’ ././wsadmin.shwsadmin.sh --c ‘$AdminApp install /opt/myApps/App2.ear {c ‘$AdminApp install /opt/myApps/App2.ear {--appname appl2}’ appname appl2}’ ././wsadmin.shwsadmin.sh --c ‘$AdminApp install /opt/myApps/App3.ear {c ‘$AdminApp install /opt/myApps/App3.ear {--appname appl3}’ appname appl3}’

wsadmin.batwsadmin.bat --c ‘$c ‘$AdminAppAdminApp install install \\myappsmyapps\\App1.ear {App1.ear {--appname appl1}’ appname appl1}’ wsadmin.batwsadmin.bat --c ‘$c ‘$AdminAppAdminApp install install \\myappsmyapps\\App2.ear {App2.ear {--appname appl2}’ appname appl2}’ wsadmin.batwsadmin.bat --c ‘$c ‘$AdminAppAdminApp install install \\myappsmyapps\\App3.ear {App3.ear {--appname appl3}’ appname appl3}’

Method 2:Method 2:$AdminApp install /myapps/App1.ear {$AdminApp install /myapps/App1.ear {--appname appl1} appname appl1} $AdminApp install /myApps/App2.ear {$AdminApp install /myApps/App2.ear {--appname appl2} appname appl2} $AdminApp install /myApps/App3.ear {$AdminApp install /myApps/App3.ear {--appname appl3}appname appl3}

Use the AdminControl queryNames and Use the AdminControl queryNames and completeObjectNamecompleteObjectName commands commands carefully with a large installation, get the list of objects onlcarefully with a large installation, get the list of objects only you interested on y you interested on particular node, getting list from all nodes in large installatiparticular node, getting list from all nodes in large installations may be expensive ons may be expensive operation.operation.The WebSphere Application Server is a distributed system, and scThe WebSphere Application Server is a distributed system, and scripts perform ripts perform better if you minimize remote requests. If some action or interrbetter if you minimize remote requests. If some action or interrogation is required ogation is required on several items, for example, servers, it is more efficient to on several items, for example, servers, it is more efficient to obtain the list of obtain the list of items once and iterate locally.items once and iterate locally.

Page 143: about websphere

Running Sample wsadmin CommandsRunning Sample wsadmin CommandsStarting the Deployment ManagerStarting the Deployment Managerwsadmin>$AdminControl stopServer <deployment manager name>wsadmin>$AdminControl stopServer <deployment manager name>Getting Getting MBeanMBean information and stopping the Deployment Managerinformation and stopping the Deployment Manager

wsadmin>$AdminControl wsadmin>$AdminControl queryNamestypequeryNamestype=Server,node=M055245Manager,*=Server,node=M055245Manager,*WebSphere:cellWebSphere:cell==linux,namelinux,name==dmgr,mbeanIdentifierdmgr,mbeanIdentifier=server.xml#Server_1,typ=server.xml#Server_1,type=Server,node=M055245Manager,process=e=Server,node=M055245Manager,process=dmgr,processTypedmgr,processType==DeploymentMDeploymentManageranagerwsadmin>$AdminControl invoke [$AdminControl wsadmin>$AdminControl invoke [$AdminControl queryNamesqueryNamestype=Server,node=type=Server,node=linuxlinux,*] stop,*] stop

Start an application serverStart an application serverwsadmin>$AdminControl wsadmin>$AdminControl startServerstartServer server1server1

Start an application server by invoking Start an application server by invoking launchProcesslaunchProcess on node agent on node agent MBeanMBean

wsadmin>$AdminControl queryNames type=wsadmin>$AdminControl queryNames type=NodeAgent,nodeNodeAgent,node=mka0kkwd,*=mka0kkwd,*WebSphere:cellWebSphere:cell==NetworkDeploymentCell,nameNetworkDeploymentCell,name==NodeAgent,mbeanIdentifierNodeAgent,mbeanIdentifier==NodeAgent,typeNodeAgent,type==NodeAgent,nodeNodeAgent,node=mka0kkwd,process=mka0kkwd=mka0kkwd,process=mka0kkwdwsadmin>$AdminControl invoke [$AdminControl queryNames wsadmin>$AdminControl invoke [$AdminControl queryNames type=type=NodeAgent,nodeNodeAgent,node=mka0kkwd,*] =mka0kkwd,*] launchProcesslaunchProcess mka0kkwd_server1mka0kkwd_server1

Page 144: about websphere

Running Sample wsadmin CommandsRunning Sample wsadmin CommandsStop an application serverStop an application server

wsadmin>$AdminControl stopServer server1wsadmin>$AdminControl stopServer server1Stop all application servers on a node (jacl file)Stop all application servers on a node (jacl file)

set set servernameservername [$AdminControl queryNames type=Server,node=[$AdminControl queryNames type=Server,node=linuxlinux,*],*]foreachforeach item $item $servernameservername {{puts “Stopping server : $item”puts “Stopping server : $item”$AdminControl invoke $item stop $AdminControl invoke $item stop

puts “invoked stop $item”puts “invoked stop $item”}}

View installed applicationsView installed applicationsThe $AdminApp list command can be used to list applications The $AdminApp list command can be used to list applications installed under an application server (wsadmin> $AdminApp list)installed under an application server (wsadmin> $AdminApp list)

Display the status of Applications (jacl file)Display the status of Applications (jacl file)set application [$AdminApp list]set application [$AdminApp list]foreachforeach app $application {app $application {set set objNameobjName [$AdminControl queryNames type=Application,name=$app,*][$AdminControl queryNames type=Application,name=$app,*]if {[ if {[ llengthllength $$objNameobjName] ==0} {] ==0} {puts "The Application $app is not running"puts "The Application $app is not running"} else {} else {puts "The Application $app is running"puts "The Application $app is running"}}}}

Page 145: about websphere

Running Sample wsadmin CommandsRunning Sample wsadmin CommandsStop a running applicationStop a running application

wsadmin> set wsadmin> set appservernameappservername [$AdminControl queryNames [$AdminControl queryNames type=type=ApplicationManager,nodeApplicationManager,node==linuxlinux,*],*]wsadmin>$AdminControl invoke $wsadmin>$AdminControl invoke $appservernameappservername stopApplicationstopApplicationDefaultApplicationDefaultApplication

Start a stopped applicationStart a stopped applicationwsadmin> set wsadmin> set appservernameappservername [$AdminControl queryNames [$AdminControl queryNames type=type=ApplicationManager,nodeApplicationManager,node==linuxlinux,*],*]wsadmin>$AdminControl invoke $wsadmin>$AdminControl invoke $appservernameappservername starApplicationstarApplicationDefaultApplicationDefaultApplication

Start a clusterStart a clusterwsadmin>$AdminControl queryNames type=Cluster,*wsadmin>$AdminControl queryNames type=Cluster,*WebSphere:cell=mka0kkwdNetwork,name=WebSphere:cell=mka0kkwdNetwork,name=testCluster,mbeanIdentiftestCluster,mbeanIdentifierier==testCluster,typetestCluster,type=Cluster,node=mka0kkwdManager,process==Cluster,node=mka0kkwdManager,process=dmdmgrgrwsadmin>set wsadmin>set clidclid [$AdminControl [$AdminControl completeObjectNamecompleteObjectNametype=Cluster,name=type=Cluster,name=testClustertestCluster,*],*]WebSphere:cellWebSphere:cell=mka0kkwdNetwork,name==mka0kkwdNetwork,name=testCluster,mbeanIdentiftestCluster,mbeanIdentifierier==testCluster,typetestCluster,type=Cluster,node=mka0kkwdManager,process==Cluster,node=mka0kkwdManager,process=dmdmgrgrwsadmin>$AdminControl invoke $wsadmin>$AdminControl invoke $clidclid startstart

Page 146: about websphere

Running Sample wsadmin CommandsRunning Sample wsadmin CommandsStop a clusterStop a cluster

wsadmin>$AdminControl queryNames type=Cluster,*wsadmin>$AdminControl queryNames type=Cluster,*WebSphere:cell=mka0kkwdNetwork,name=WebSphere:cell=mka0kkwdNetwork,name=testCluster,mbeanIdentifiertestCluster,mbeanIdentifier==testCltestCluster,typeuster,type=Cluster,node=mka0kkwdManager,process==Cluster,node=mka0kkwdManager,process=dmgrdmgrwsadmin>set wsadmin>set clidclid [$AdminControl [$AdminControl completeObjectNamecompleteObjectNametype=Cluster,name=type=Cluster,name=testClustertestCluster,*],*]WebSphere:cell=mka0kkwdNetwork,name=WebSphere:cell=mka0kkwdNetwork,name=testCluster,mbeanIdentifiertestCluster,mbeanIdentifier==testCltestCluster,typeuster,type=Cluster,node=mka0kkwdManager,process==Cluster,node=mka0kkwdManager,process=dmgrdmgrwsadmin>$AdminControl invoke $wsadmin>$AdminControl invoke $clidclid stopstop

Generating the Web server plugGenerating the Web server plug--in configurationin configurationwsadmin>set generator [$AdminControl queryNames wsadmin>set generator [$AdminControl queryNames type=type=PluginCfgGenerator,nodePluginCfgGenerator,node==linuxlinux,*],*]wsadmin>$AdminControl invoke $generator generate wsadmin>$AdminControl invoke $generator generate “/opt/WebSphere/“/opt/WebSphere/AppServerAppServer /opt/WebSphere//opt/WebSphere/AppServer/configAppServer/config linuxlinux linuxlinux null null pluginplugin--cfg.xml””cfg.xml””

Page 147: about websphere

Running Sample wsadmin Configuration CommandsRunning Sample wsadmin Configuration CommandsTypical configuration tasksTypical configuration tasks

Enterprise application(Install/uninstall an enterprise applicatiEnterprise application(Install/uninstall an enterprise application, Change on, Change attributes of an enterprise application)attributes of an enterprise application)Configure and modify WebSphere configuration(Configure virtual hConfigure and modify WebSphere configuration(Configure virtual hosts, osts, Configure JDBC providers, Edit an application server, Create a cConfigure JDBC providers, Edit an application server, Create a cluster, Add luster, Add member to a cluster)member to a cluster)

Create an Application serverCreate an Application serverwsadmin>set node [$AdminConfig wsadmin>set node [$AdminConfig getidgetid //Node:linuxNode:linux/]/]wsadmin>$AdminConfig create Server $node {{name wsadmin>$AdminConfig create Server $node {{name testservertestserver}}}}

Remove an application serverRemove an application serverwsadmin>set server [$AdminConfig wsadmin>set server [$AdminConfig getidgetid //Node:linux/Server:testserverNode:linux/Server:testserver/]/]wsadmin>$AdminConfig remove $serverwsadmin>$AdminConfig remove $server

Installing Enterprise ApplicationInstalling Enterprise Applicationwsadmin>$AdminApp install /opt/wsadmin>$AdminApp install /opt/myapps/Hello.earmyapps/Hello.ear {{--server server1 server server1 --appname appname TestAppTestApp}}wsadmin>$AdminConfig savewsadmin>$AdminConfig save

UnUn--install Enterprise Applicationinstall Enterprise Applicationwsadmin>$AdminApp uninstall wsadmin>$AdminApp uninstall TestAppTestApp..wsadmin>$AdminConfig savewsadmin>$AdminConfig save

Page 148: about websphere

Running Sample wsadmin Configuration CommandsRunning Sample wsadmin Configuration CommandsCreating JDBC ProviderCreating JDBC Provider

For creating new JDBC providers , WebSphere provides template xmFor creating new JDBC providers , WebSphere provides template xml l files at /WebSphere/files at /WebSphere/AppServer/config/templatesAppServer/config/templates folder, we can use folder, we can use these templates to created new JDBC providerthese templates to created new JDBC provider

wsadmin>set node [$AdminConfig wsadmin>set node [$AdminConfig getidgetid //Node:linuxNode:linux/]/]wsadmin>$AdminConfig wsadmin>$AdminConfig listTemplateslistTemplates JDBCProviderJDBCProvider “Oracle JDBC Thin “Oracle JDBC Thin Driver"Driver"……….wsadmin provides you the list……….wsadmin provides you the list(templates/system:jdbc(templates/system:jdbc--resourceresource--providerprovider--templates.xml#JDBCProvider_1)"templates.xml#JDBCProvider_1)"wsadmin>set temp1 [wsadmin>set temp1 [lindexlindex [$AdminConfig [$AdminConfig listTemplateslistTemplates JDBCProviderJDBCProvider“Oracle JDBC Thin Driver"] 1]“Oracle JDBC Thin Driver"] 1]wsadmin>$AdminConfig wsadmin>$AdminConfig createUsingTemplatecreateUsingTemplate JDBCProviderJDBCProvider $node $node {{name {{name testorcldrivertestorcldriver}} $temp1}} $temp1wsadmin>$AdminConfig savewsadmin>$AdminConfig save

Page 149: about websphere

Security Security Two main services of securityTwo main services of security

AuthenticationAuthentication ( who are you ? Log( who are you ? Log--in)in)Authentication is the process of establishing whether a client iAuthentication is the process of establishing whether a client is valid in a s valid in a particular context. A client can be either an end user, a machinparticular context. A client can be either an end user, a machine or an e or an applicationapplication

AuthorizationAuthorization (What are you allowed to do)(What are you allowed to do)Authorization is the process of checking whether the authenticatAuthorization is the process of checking whether the authenticated user ed user has access to the requested resource. There are two fundamental has access to the requested resource. There are two fundamental methods for authorizationmethods for authorization::

RoleRole--based securitybased securityRoles are different levels of security that relate to a specificRoles are different levels of security that relate to a specific application. application. In a roles based authorization model, the roles for a given applIn a roles based authorization model, the roles for a given application are ication are developed as an application is developed. As a user base for thedeveloped as an application is developed. As a user base for theapplication is established, one of three things happens.application is established, one of three things happens.Users are mapped directly to specific security roles.Users are mapped directly to specific security roles.

Groups are formed, users are defined as members of a group, and Groups are formed, users are defined as members of a group, and the the groups are defined to specific security roles.groups are defined to specific security roles.A combination of user/group mapping to security roles is used tA combination of user/group mapping to security roles is used to handle o handle

any exceptions.any exceptions.

Page 150: about websphere

J2EE Application SecurityJ2EE Application SecurityThe Java 2 Enterprise Edition (J2EE) specification defines the bThe Java 2 Enterprise Edition (J2EE) specification defines the building uilding blocks and elements of a J2EE application that build an enterpriblocks and elements of a J2EE application that build an enterprise se application. The specification also provides details on securityapplication. The specification also provides details on security related to related to the different elements.the different elements.The J2EE application consists of multiple modules and componentsThe J2EE application consists of multiple modules and components; ; these elements are in connection with each other, and they these elements are in connection with each other, and they communicate via certain protocols.communicate via certain protocols.

Page 151: about websphere

J2EE Application SecurityJ2EE Application SecurityJ2EE security rolesJ2EE security roles

The J2EE specification defines a security role as: “A logical grThe J2EE specification defines a security role as: “A logical groupings oupings of users that are defined by an Application Component Provider oof users that are defined by an Application Component Provider or r Assembler”.Assembler”.

Page 152: about websphere

J2EE Application SecurityJ2EE Application SecurityJ2EE twoJ2EE two--phase security administrationphase security administration

Phase1: At application assembly time, these sets of users, orPhase1: At application assembly time, these sets of users, orsecurity roles, are not tied to any real users or groups of usersecurity roles, are not tied to any real users or groups of users. Instead, they s. Instead, they are placeholders.are placeholders.Phase 2: These placeholders are later mapped to real users and Phase 2: These placeholders are later mapped to real users and groups at groups at application deployment time, during a process called application deployment time, during a process called security role mapping.security role mapping.

This twoThis two--phase security administration approach allows for a great deal phase security administration approach allows for a great deal of flexibility and portability. of flexibility and portability. DeployersDeployers of an application have full control of an application have full control over how their local users and groups are mapped to the applicatover how their local users and groups are mapped to the application’s ion’s security roles, and over what authorization and authentication security roles, and over what authorization and authentication mechanisms are used to determinemechanisms are used to determinerole membership.role membership.

At deployment time, security roles can be mapped to users, groupAt deployment time, security roles can be mapped to users, groups of users, s of users, ororspecial subjects. special subjects. There are two special subjects in WebSphere Version 5:There are two special subjects in WebSphere Version 5:

All Authenticated UsersAll Authenticated UsersEveryoneEveryone

Page 153: about websphere

J2EE Application Security J2EE Application Security --J2EE ContainerJ2EE Container--Based Based SecuritySecurity

J2EE Containers are responsible for enforcing access control on J2EE Containers are responsible for enforcing access control on component component objects and methods. Containers provide two types of security:objects and methods. Containers provide two types of security:

Declarative securityDeclarative securityProgrammatic securityProgrammatic security

Declarative securityDeclarative securityan application’s security policies can be expressed externally tan application’s security policies can be expressed externally to the application o the application code. At application assembly time, security policies are definecode. At application assembly time, security policies are defined in an d in an application’s application’s deployment descriptor. deployment descriptor. A deployment descriptor is an XML file A deployment descriptor is an XML file which includes a representation of an application’s security reqwhich includes a representation of an application’s security requirements, uirements, including the application’s security roles, access control, and including the application’s security roles, access control, and authentication authentication requirements.requirements.

When using declarative security, developers are free to write coWhen using declarative security, developers are free to write code that is completely de that is completely unaware of the security.unaware of the security.

Programmatic securityProgrammatic securityProgrammatic security is used when an application must be “securProgrammatic security is used when an application must be “security aware”.ity aware”.EJB methods (EJB methods (isCallerInRoleisCallerInRole, , getCallerPrincipalgetCallerPrincipal))Servlet Servlet methods(isUserInrolemethods(isUserInrole, , getCallerPrincipalgetCallerPrincipal))

When using programmatic security, developer needs to write additWhen using programmatic security, developer needs to write additional code that uses ional code that uses security context objects.security context objects.

Page 154: about websphere

J2EE Application Deployment Descriptor for SecurityJ2EE Application Deployment Descriptor for Security

There are two deployment descriptor files used for security roleThere are two deployment descriptor files used for security role mapping:mapping:

FileFile PurposePurpose MandatoryMandatory

Application.xmlApplication.xml Security roles definedSecurity roles defined YesYes

IbmIbm--applicationapplication--bnd.xmibnd.xmi Security roles mappedSecurity roles mapped No, security roles can be No, security roles can be mapped during or after mapped during or after the installationthe installation

In the application.xml file, all security roles used in the applIn the application.xml file, all security roles used in the application must be ication must be named, with an optional descriptionnamed, with an optional description

ExampleExample<security<security--role id="SecurityRole_1">role id="SecurityRole_1"><description><description>ITSOBankITSOBank manager</description>manager</description><role<role--name>manager</rolename>manager</role--name>name></security</security--role>role><security<security--role id="SecurityRole_2">role id="SecurityRole_2"><description><description>ITSOBankITSOBank consultant</description>consultant</description><role<role--name>consultant</rolename>consultant</role--name>name></security</security--role>role>

Page 155: about websphere

J2EE Application Deployment Descriptor for SecurityJ2EE Application Deployment Descriptor for SecurityIn In the In In the ibmibm--applicationapplication--bnd.xmibnd.xmi file, security roles are mapped to users or groups in file, security roles are mapped to users or groups in the User Registry.the User Registry.

Security roleSecurity role Mapped toMapped to

ManagerManager ManagergrpManagergrp

ConsultantConsultant ConsultgrpConsultgrp

allauthenticatedallauthenticated All authenticated Users (special)All authenticated Users (special)

everyoneeveryone Everyone (special)Everyone (special)

<<authorizationTableauthorizationTable xmi:idxmi:id="AuthorizationTable_1">="AuthorizationTable_1"><authorizations <authorizations xmi:idxmi:id="RoleAssignment_1">="RoleAssignment_1"><role <role hrefhref="META="META--INF/application.xml#SecurityRole_1"/>INF/application.xml#SecurityRole_1"/><groups <groups xmi:idxmi:id="Group_1" name="="Group_1" name="managergrpmanagergrp"/>"/></authorizations></authorizations><authorizations <authorizations xmi:idxmi:id="RoleAssignment_5">="RoleAssignment_5"><<specialSubjectsspecialSubjects xmi:typexmi:type="="applicationbnd:AllAuthenticatedUsersapplicationbnd:AllAuthenticatedUsers""xmi:idxmi:id="AllAuthenticatedUsers_1" name="="AllAuthenticatedUsers_1" name="AllAuthenticatedUsersAllAuthenticatedUsers"/>"/><role <role hrefhref="META="META--INF/application.xml#SecurityRole_5"/>INF/application.xml#SecurityRole_5"/></authorizations></authorizations><authorizations <authorizations xmi:idxmi:id="RoleAssignment_6">="RoleAssignment_6"><<specialSubjectsspecialSubjects xmi:typexmi:type="="applicationbnd:Everyoneapplicationbnd:Everyone" " xmi:idxmi:id="Everyone_1"="Everyone_1"name="Everyone"/>name="Everyone"/><role <role hrefhref="META="META--INF/application.xml#SecurityRole_6"/>INF/application.xml#SecurityRole_6"/></authorizations></authorizations>

</</authorizationTableauthorizationTable>>

Page 156: about websphere

J2EE Security : Securing Hello ApplicationJ2EE Security : Securing Hello ApplicationWe already deployed the sample Hello Application (Hello.ear) in We already deployed the sample Hello Application (Hello.ear) in our our previous sessionsprevious sessionsAs part of security exercise, now we will configure security to As part of security exercise, now we will configure security to the Hello the Hello application so that the resources in the Hello application willapplication so that the resources in the Hello application will be be protected by unauthorized usersprotected by unauthorized usersResources we protect in Hello applicationResources we protect in Hello application

We will protected all .We will protected all .jspjsp filesfilesWe will NOT protect HTML pages We will NOT protect HTML pages We will protect .GIF imagesWe will protect .GIF images

Page 157: about websphere

J2EE Application (Hello)Security Configuration Using AAT :J2EE Application (Hello)Security Configuration Using AAT :There are two aspects of There are two aspects of application security application security administration which apply to administration which apply to all secured J2EE application all secured J2EE application components: defining security components: defining security roles (performed at roles (performed at application assembly time), application assembly time), and security role mapping and security role mapping (performed at deployment (performed at deployment time)time)

1.1. Open the Hello.ear file in the Open the Hello.ear file in the Application Assembly Tool.Application Assembly Tool.

2.2. RightRight--click the Security Roles click the Security Roles item in item in WebModulesWebModules-->>HelloWebHelloWeb..

3.3. Select New from the popSelect New from the pop--up up menu.menu.

4.4. A new window appears with A new window appears with the role details; fill the name the role details; fill the name and description.(role and description.(role name:student)name:student)

5.5. Click OK to complete the Click OK to complete the form.form.

6.6. Create all the J2EE roles for Create all the J2EE roles for your application by repeating your application by repeating the steps above.the steps above.

7.7. Save the .ear file.Save the .ear file.

Page 158: about websphere

J2EE Application(Hello) Security Configuration Using AAT (role mJ2EE Application(Hello) Security Configuration Using AAT (role mappings)appings)Create a Linux user group Create a Linux user group studentgrpstudentgrpand add few users.and add few users.Security role mappings are performed Security role mappings are performed within the Bindings tab in the within the Bindings tab in the Application Security Roles view.Application Security Roles view.

1.1. Open the applicationOpen the application--level Security level Security Roles view and click the Roles view and click the Bindings Bindings tab.tab.

2.2. The Bindings tab contains fields for The Bindings tab contains fields for adding groups, users, and/or specialadding groups, users, and/or special

3.3. subjects to a security role. Click the subjects to a security role. Click the Add... Add... button below the Groups button below the Groups heading to bring up the Add Groups heading to bring up the Add Groups dialog.dialog.

4.4. Enter the name of the real group, Enter the name of the real group, studentgrpstudentgrp, and click , and click OKOK..

5.5. The group mapping will now appear in The group mapping will now appear in the list of groups mapped to the the list of groups mapped to the student security rolestudent security role

6.6. Scroll down to the Special subjects Scroll down to the Special subjects section and click on addsection and click on add

7.7. Select All authenticated users and Select All authenticated users and click applyclick apply

8.8. Save the ear fileSave the ear fileNote:Note: Generally rollGenerally roll--mappings will be mappings will be done by administrator during done by administrator during deployment time or sometimes deployment time or sometimes development teams specify using development teams specify using WebSphere studio.WebSphere studio.

Page 159: about websphere

Securing (Hello)Web Components : Security ConstraintsSecuring (Hello)Web Components : Security ConstraintsWeb components such as static Web components such as static HTML pages, JSPs and Servlets HTML pages, JSPs and Servlets can be secured either by the can be secured either by the HTTP server or by WebSphere.HTTP server or by WebSphere.WebSphere Application Server WebSphere Application Server can only secure components can only secure components that it owns. Any static pages that it owns. Any static pages that are served from the Web that are served from the Web server cannot be protected by server cannot be protected by WebSphere tools.WebSphere tools.Security constraints are mapping Security constraints are mapping of one or more web resources to of one or more web resources to a set of rolesa set of rolesConfiguration Steps:Configuration Steps:

1.1. Open the Web module Open the Web module folder and rightfolder and right--click click Security Constraints. Click Security Constraints. Click New. New.

A new panel displays.A new panel displays.2.2. Type the security constraints Type the security constraints

name as “name as “myscmysc” and description. ” and description. 3.3. Add required roles by clicking Add required roles by clicking

Add under Roles. Browse and Add under Roles. Browse and click the student role. On the click the student role. On the browse window asterisk (*) browse window asterisk (*) indicates all roles.

1

2

3

indicates all roles.

Page 160: about websphere

Securing (Hello)Web Components : Security ConstraintsSecuring (Hello)Web Components : Security Constraints4.4. In the user data constraints section, In the user data constraints section,

keep None for Transport Guarantee keep None for Transport Guarantee menu. menu.

A transport guarantee of NONE A transport guarantee of NONE indicates that the communication indicates that the communication between the Web client or browser between the Web client or browser and the server or Web server is and the server or Web server is transported over HTTP. A transport transported over HTTP. A transport guarantee of CONFIDENTIAL or guarantee of CONFIDENTIAL or INTEGRAL guarantees that the INTEGRAL guarantees that the communication between the Web communication between the Web client and the Web server is client and the Web server is secured and is transported over secured and is transported over HTTP and HTTPS.HTTP and HTTPS.

5.5. Click OK when done. Click OK when done. 6.6. A new Security Constraints folder is A new Security Constraints folder is

created for the Web module.created for the Web module.7.7. Open the security constraints created Open the security constraints created

from previous steps and rightfrom previous steps and right--click Web click Web Resources Collection. Click New.Resources Collection. Click New.

A new panel displays.A new panel displays.

8.8. Type a Web resource collection name Type a Web resource collection name and description. and description.

9.9. Click Add under Methods and select HTTP Click Add under Methods and select HTTP methods. Click OK. methods. Click OK.

If no methods are selected, all methods If no methods are selected, all methods are selected by default.are selected by default.

10.10. Click Add under URLs and type the URL Click Add under URLs and type the URL pattern (for example: pattern (for example: -- /Hello/*./Hello/*.jspjsp, , *.*.jspjsp, *.gif)., *.gif).

11.11. Click OK when doneClick OK when done

7 9

10

11

8

Page 161: about websphere

Securing (Hello)Web Components : Security ConstraintsSecuring (Hello)Web Components : Security Constraints

Consult the Servlet specification Version 2.3 for instructions oConsult the Servlet specification Version 2.3 for instructions on n mapping URL patterns to Servlets. Security run time uses the examapping URL patterns to Servlets. Security run time uses the exact ct match first to map the incoming URL with URL patterns. If the exmatch first to map the incoming URL with URL patterns. If the exact act match is not present, the security run time uses the longest matmatch is not present, the security run time uses the longest match. ch. The wild card (*.,*.The wild card (*.,*.jspjsp) URL pattern matching is used last.) URL pattern matching is used last.

12.12. Save the ear file by clicking on save button from the top menuSave the ear file by clicking on save button from the top menu

Page 162: about websphere

Installing FixPacksInstalling FixPacks

IBM releases software updates in form of FixPacks and CumulativeIBM releases software updates in form of FixPacks and Cumulative fixesfixesFixPacks : Major updates to the product, possibly minor or majoFixPacks : Major updates to the product, possibly minor or major version change, for r version change, for example, FixPack to update Version 5.0 to 5.0.2 or 5.0.1 to 5example, FixPack to update Version 5.0 to 5.0.2 or 5.0.1 to 5.0.2.0.2Cumulative Fix: A set of minor bugs fixed in the product.Cumulative Fix: A set of minor bugs fixed in the product.

It is very important to keep the websphere software update to daIt is very important to keep the websphere software update to date with latest te with latest FixPacks and Cumulative fixes released by IBMFixPacks and Cumulative fixes released by IBM

Lab: Install the FixPack2 on top of 5.0 Lab: Install the FixPack2 on top of 5.0

Go to “C:Go to “C:\\softwares” folder and extract the file “was50_fp2_win.zip”, to softwares” folder and extract the file “was50_fp2_win.zip”, to extract, select the file right click and choose “Extract All” opextract, select the file right click and choose “Extract All” option, this will create tion, this will create a folder “was50_fp2_win”.a folder “was50_fp2_win”.Invoke the Installer using following commandsInvoke the Installer using following commands

Run the command C:Run the command C:\\>>\\IBMIBM\\WebSphere5WebSphere5\\AppServerAppServer\\javajava\\jrejre\\binbin\\java java --jar installer.jarjar installer.jar$ /IBM/WebSphere5/AppServer/java/jre/bin/java $ /IBM/WebSphere5/AppServer/java/jre/bin/java --jar installer.jarjar installer.jar

In the Language selection dialog box, select “English” and clickIn the Language selection dialog box, select “English” and click OKOKClick “Next” on product information dialog boxClick “Next” on product information dialog box

Page 163: about websphere

Installing FixPacksInstalling FixPacks

In this dialog box, the installer finds In this dialog box, the installer finds any installed websphere versions and any installed websphere versions and ask you to choose the one you want to ask you to choose the one you want to apply the FixPacks for. apply the FixPacks for.

Choose the option which is relevant, Choose the option which is relevant, here we choose “Install fix packs”here we choose “Install fix packs”

Page 164: about websphere

Installing FixPacksInstalling FixPacks

Enter or choose the directory where Enter or choose the directory where fixpacks are located, on your machines it fixpacks are located, on your machines it should be should be “c:“c:\\>softwares>softwares\\was50_fp2_winwas50_fp2_win\\fixpacks” fixpacks” and click “Next”and click “Next”

Choose the “FixPack” to install and Choose the “FixPack” to install and select “Next”select “Next”

Page 165: about websphere

Installing FixPacksInstalling FixPacks

Choose “IHS” option and its install Choose “IHS” option and its install location, and click “Next”location, and click “Next”

Click “Next” to confirm the componentsClick “Next” to confirm the components

Page 166: about websphere

Deploying Secure Hello ApplicationDeploying Secure Hello Application

Open the admin console and Open the admin console and deploy the Hello application by deploy the Hello application by clicking on clicking on Install New Install New ApplicationApplication and browse to the and browse to the new Hello.ear filenew Hello.ear fileKeep the default values and Keep the default values and continue with deployment by continue with deployment by clicking on clicking on Next ( Next ( Un install the Un install the Hello app if you have one Hello app if you have one already installed)already installed)Make sure that at Make sure that at Step 4, Step 4, your your screen should look like the one screen should look like the one shown on this page. shown on this page. Enable the Global security from Enable the Global security from SecuritySecurity section and configure section and configure it to use local OS user registryit to use local OS user registryRestart the server with Restart the server with following commandfollowing command/opt/WebSphere//opt/WebSphere/AppServer/bin/AppServer/bin/startserverstartserver server1 server1 ––username username root root ––password rootpassword root

Page 167: about websphere

Accessing the Secure Hello ApplicationAccessing the Secure Hello Application

Browse the application Browse the application from browser by typing from browser by typing http://localhost/Hello/hhttp://localhost/Hello/hello.jspello.jspYou should be You should be prompted with the prompted with the Linux OS login prompt Linux OS login prompt before accessing before accessing hello.jsphello.jsp

Page 168: about websphere

WebSphere Coexistence & MigrationWebSphere Coexistence & MigrationCoexistence in WebSphere is the ability of multiple installationCoexistence in WebSphere is the ability of multiple installations of s of WebSphere Application Server to run on the same machine at the sWebSphere Application Server to run on the same machine at the same ame time. Multiple installations include multiple versions and multitime. Multiple installations include multiple versions and multiple ple instances of one versionsinstances of one versionsThe installation wizard looks for these existing installations tThe installation wizard looks for these existing installations to determine o determine if it should prompt you for coexistence information: if it should prompt you for coexistence information:

IBM WebSphere Application Server Standard Edition and Advanced EIBM WebSphere Application Server Standard Edition and Advanced Edition, dition, Version 3.5.5 and up Version 3.5.5 and up IBM WebSphere Application Server Advanced/Enterprise Edition, VeIBM WebSphere Application Server Advanced/Enterprise Edition, Version 4.0.2 rsion 4.0.2 and later and later

MigrationMigrationMigration from version 4.0.1(including applications) to version Migration from version 4.0.1(including applications) to version 5.0 without 5.0 without extensive tuningextensive tuningMigration from version 3.5 to version 5.0 needs manual effort.Migration from version 3.5 to version 5.0 needs manual effort.

Page 169: about websphere

Installing ND & Base on Same Machine and Vertical ClusteringInstalling ND & Base on Same Machine and Vertical Clustering1.1. Start the WebSphere Application Server LaunchPad. For example:Start the WebSphere Application Server LaunchPad. For example:

./opt/linuxi386/LaunchPad.sh (assumed that you extracted the tar./opt/linuxi386/LaunchPad.sh (assumed that you extracted the tarfile into opt folder)file into opt folder)Double click on Double click on LaunchPad.batLaunchPad.bat

2.2. In the Language Selection window, select In the Language Selection window, select English English and click and click OKOK..3.3. In the Network Deployment LaunchPad window, click In the Network Deployment LaunchPad window, click Install the Install the

productproduct, as shown, as shown

Page 170: about websphere

Installing ND & Base on Same Machine and Vertical Installing ND & Base on Same Machine and Vertical ClusteringClustering

4.4. In the wizard language selection window, select In the wizard language selection window, select English English and and click click OKOK..

5.5. In the Welcome to WebSphere Application Server Network In the Welcome to WebSphere Application Server Network Deployment window, click Deployment window, click Next Next to continue.to continue.

6.6. Accept the license agreement and click on Accept the license agreement and click on NextNext7.7. The installation wizard will check the system prerequisites. It The installation wizard will check the system prerequisites. It

should detect the existing installation of WebSphere should detect the existing installation of WebSphere application server 5.0 and you will be given the option to application server 5.0 and you will be given the option to reconfigure the product for coexistence.reconfigure the product for coexistence.DO NOTDO NOT select check box. If you select the check box new select check box. If you select the check box new values will be generated for the ports used by deployment values will be generated for the ports used by deployment manager.manager.

8.8. Click Click NextNextWe will manually reconfigure the base version to avoid port We will manually reconfigure the base version to avoid port conflictsconflicts

Page 171: about websphere

Installing ND & Base on Same Machine and Vertical Installing ND & Base on Same Machine and Vertical ClusteringClustering

9.9. Select all components Select all components exceptexcept embedded messaging client ( we embedded messaging client ( we already installed this during base install) click already installed this during base install) click NextNext

10.10. Select the installation directory and click Select the installation directory and click NextNext11.11. Keep default node name, host name and cell name and click Keep default node name, host name and cell name and click NextNext12.12. Wait to install and click Wait to install and click FinishFinish after the installationafter the installation13.13. Exit from the LaunchPad and First Steps , if they are already opExit from the LaunchPad and First Steps , if they are already openen

Page 172: about websphere

Changing Base Version Admin PortsChanging Base Version Admin Ports

The recent installation of ND is configured to serve the admin The recent installation of ND is configured to serve the admin console on ports 9090 and 9043 which conflicts with the base console on ports 9090 and 9043 which conflicts with the base WAS installation.WAS installation.We will use the Admin console of Base installation to change We will use the Admin console of Base installation to change these conflict ports. (these conflict ports. (Note:Note: The Deployment manager should The Deployment manager should not be running in order to get the base’s admin console and not be running in order to get the base’s admin console and Base server should be running)Base server should be running)Open the admin console using Open the admin console using http://localhost:9090/adminhttp://localhost:9090/admin and and login using user id admin and click login using user id admin and click OKOKIn the navigation tree, expand In the navigation tree, expand serversserversClick Click Application ServersApplication ServersSelect Select server1server1Select Select Web ContainerWeb Container under Additional Propertiesunder Additional PropertiesSelect Select HTTP TransportsHTTP Transports under Additional Propertiesunder Additional PropertiesThe page will display the ports that the web container is listenThe page will display the ports that the web container is listening ing ononClick the Click the * * for port 9090for port 9090Change port from 9090 to 9190 then click Change port from 9090 to 9190 then click OKOK to save the to save the changeschangesClick the Click the * * for port 9043for port 9043Change the port from 9043 to 9143 then click OK to save the Change the port from 9043 to 9143 then click OK to save the changeschanges

Page 173: about websphere

Changing Base Version Admin PortsChanging Base Version Admin Ports

In the left navigation tree, expand In the left navigation tree, expand EnvironmentEnvironmentClick Virtual HostsClick Virtual HostsSelect admin_hostsSelect admin_hostsSelect Host Aliases under Additional propertiesSelect Host Aliases under Additional propertiesClick the Click the * * for port 9090for port 9090Change Port from 9090 to 9190 then click Change Port from 9090 to 9190 then click OK OK to save the changesto save the changesSelect Host Aliases under Additional propertiesSelect Host Aliases under Additional propertiesClick the Click the * * for port 9043for port 9043Change Port from 9043 to 9143 then click Change Port from 9043 to 9143 then click OK OK to save the changesto save the changesClick the save in the task bar frame at the top of the pageClick the save in the task bar frame at the top of the pageClick the save button to save the configuration changesClick the save button to save the configuration changesRestart the server and click on Restart the server and click on Update Web server Update Web server pluginplugin under under Environment nodeEnvironment nodeClick logout to logout from the admin consoleClick logout to logout from the admin consoleStop the serverStop the serverStart the deployment manager usingStart the deployment manager using

./opt/WebSphere/./opt/WebSphere/DeploymentManager/startManager.shDeploymentManager/startManager.shC:C:\\>>\\WebSphereWebSphere\\DeploymentManager/startManagerDeploymentManager/startManager

Page 174: about websphere

Add Base Application Server to the CellAdd Base Application Server to the CellFirst check the status of the base server using command likeFirst check the status of the base server using command like

./opt/WebSphere/./opt/WebSphere/AppServer/bin/serverStatus.shAppServer/bin/serverStatus.sh server1server1If the server1 is started, stop it using If the server1 is started, stop it using

./opt/WebSphere/Appserver/stopServer.sh server1./opt/WebSphere/Appserver/stopServer.sh server1C:C:\\>>\\WebSphereWebSphere\\AppserverAppserver\\stopServer.batstopServer.bat server1server1

Federate the node into cellFederate the node into cell./opt/WebSphere/./opt/WebSphere/AppServer/bin/addNode.shAppServer/bin/addNode.sh localhostlocalhost 88798879C:C:\\>>\\WebSphereWebSphere\\AppServerAppServer\\binbin\\addNodeaddNode localhostlocalhost 88798879The node will be federated into cell and the node agent will be The node will be federated into cell and the node agent will be started. When the started. When the process is complete, you should see a success message like “…..hprocess is complete, you should see a success message like “…..has been as been successfully federated”successfully federated”

To see the log for these commandsTo see the log for these commandsSee the See the addNode.logaddNode.log file in the /WebSphere/AppServer/logs/ folderfile in the /WebSphere/AppServer/logs/ folder

Get the admin console of deployment manager using Get the admin console of deployment manager using http://localhost:9090/adminhttp://localhost:9090/adminAt login page enter any user id (for example admin)At login page enter any user id (for example admin)

Check the Network Deployment configuration options under Check the Network Deployment configuration options under Servers and Servers and System Administration, System Administration, you should see the options like you should see the options like Clusters, Cluster Clusters, Cluster TopologyTopology under servers and under servers and Cell, Deployment Manager, Nodes, Node Cell, Deployment Manager, Nodes, Node AgentsAgents under system administrationunder system administration

Page 175: about websphere

Creating Clusters for Vertical ScalingCreating Clusters for Vertical Scaling

1.1. Expand Expand ServersServers, then , then click on clusters , on right click on clusters , on right hand side you will see hand side you will see Server Cluster screenServer Cluster screen

2.2. Click on Click on NewNew to create to create new clusternew cluster

3.3. Enter value “Enter value “helloclusterhellocluster” ” as cluster name and Click as cluster name and Click on on NextNext by keeping the by keeping the default settings for other default settings for other fieldsfields

Page 176: about websphere

Creating Clusters for Vertical ScalingCreating Clusters for Vertical Scaling4.4. Enter “helloserver1” value in Enter “helloserver1” value in

the the NameName column as shown column as shown in the screen.in the screen.

5.5. Keep all other settings as Keep all other settings as default and click on default and click on ApplyApply, , now we should see the new now we should see the new server at the bottom of the server at the bottom of the screen and the system will screen and the system will provide the screen to enter provide the screen to enter the new serverthe new server

6.6. Enter “helloserver2” value in Enter “helloserver2” value in the the NameName column and click column and click ApplyApply

7.7. Now you should see the two Now you should see the two servers in the list at the servers in the list at the bottom of the screen, click bottom of the screen, click on the on the NextNext

8.8. Click Click FinishFinish on summary on summary pagepage

9.9. Click Click SaveSave to commit the to commit the changeschanges

10.10. Click Click SaveSave again to confirm again to confirm the changes.the changes.

Page 177: about websphere

WebSphere 5.0WebSphere 5.0 Deploying a Sample Clustered Deploying a Sample Clustered ApplicationApplication

Note: If you already installed Hello Application on base server,Note: If you already installed Hello Application on base server,uninstall the Hello application first and save the changes.uninstall the Hello application first and save the changes.

1.1. Select Select Applications Applications --> Install New Application > Install New Application in the navigation in the navigation pane on the left.pane on the left.

2.2. . In the Preparing for the application installation window, brow. In the Preparing for the application installation window, browse to se to the Hello.ear file and click the Hello.ear file and click NextNext, ,

3.3. Click Click Next Next in the following window to use the existing bindings and in the following window to use the existing bindings and mappings defined in the EAR file.mappings defined in the EAR file.

4.4. In the Install New Application window, click In the Install New Application window, click Next Next to accept the to accept the defaults for Step 1: Provide options to perform the installationdefaults for Step 1: Provide options to perform the installation..

5.5. Click Click Next Next to accept the defaults for Step 2: Map virtual hosts for to accept the defaults for Step 2: Map virtual hosts for Web modules.Web modules.

6.6. In Step 3: Map modules to application servers, check In Step 3: Map modules to application servers, check HelloWebHelloWeb in in the module list, select the module list, select helloclusterhellocluster from the list of clusters and from the list of clusters and servers, and click servers, and click ApplyApply..

You should see the You should see the HelloWebHelloWeb module mapped to the module mapped to the helloclusterhellocluster, as , as shown belowshown below

Page 178: about websphere

WebSphere 5.0 WebSphere 5.0 Deploying a Sample Clustered ApplicationDeploying a Sample Clustered Application

Page 179: about websphere

WebSphere 5.0 Vertical Cluster ConfigurationWebSphere 5.0 Vertical Cluster Configuration

7.7. In Step 4: Summary, review your selections and click In Step 4: Summary, review your selections and click Finish Finish to deploy the to deploy the enterprise application.enterprise application.

8.8. Don’t forget to click Don’t forget to click Save Save after successfully installing the application.after successfully installing the application.9.9. By default, the newly installed applications are not started. ToBy default, the newly installed applications are not started. To start the start the

application, select application, select Applications Applications --> Enterprise Applications> Enterprise Applications, check , check Hello Hello in the application list, and click in the application list, and click StartStart..

10.10. Select Select Environment Environment --> Update Web Server > Update Web Server PluginPlugin in the navigation in the navigation tree,then click tree,then click OK OK to update the Web server plugto update the Web server plug--in configuration file.in configuration file.

11.11. Copy the plugCopy the plug--in configuration file from the Deployment Manager node to the in configuration file from the Deployment Manager node to the Web server machine. For example:Web server machine. For example:

scpscp /opt/WebSphere/DeploymentManager/config/cells/plugin/opt/WebSphere/DeploymentManager/config/cells/plugin--cfg.xml cfg.xml \\websrv1l:/opt/WebSphere/AppServer/config/cells/pluginwebsrv1l:/opt/WebSphere/AppServer/config/cells/plugin--cfg.xmlcfg.xmlUse shared folders or FlashDrivesUse shared folders or FlashDrives

Note : Note : If web server machine is on separate machine than WebSphere If web server machine is on separate machine than WebSphere Network Deployment ,then we also must edit the pluginNetwork Deployment ,then we also must edit the plugin--cfg.xml file and cfg.xml file and replace all paths to /opt/WebSphere/DeploymentManager with replace all paths to /opt/WebSphere/DeploymentManager with /opt/WebSphere/ApplicationServer. Also replace the node name wit/opt/WebSphere/ApplicationServer. Also replace the node name with IP if you h IP if you don’t have DNS.don’t have DNS.

12.12. Restart the Web server to ensure the plugRestart the Web server to ensure the plug--in configuration is rein configuration is re--read:read:/opt/IBMHTTPServer/bin/apachectl restart/opt/IBMHTTPServer/bin/apachectl restartStart the service “IBM HTTP Server” from servicesStart the service “IBM HTTP Server” from services

Page 180: about websphere

WebSphere 5.0 : Testing Vertical Cluster WLMWebSphere 5.0 : Testing Vertical Cluster WLM13.13. .Using a Web browser, enter .Using a Web browser, enter

the URL for the application, for the URL for the application, for example:example:http://websrv1l/Hello/hello.jsphttp://websrv1l/Hello/hello.jsp. Requests should be workload . Requests should be workload managed across the available managed across the available cluster servers.cluster servers.As shown in the screens on As shown in the screens on next slide , our user requests next slide , our user requests are workload managed across are workload managed across the helloserver1 and the helloserver1 and helloserver2.helloserver2.To test the WLM open two To test the WLM open two new browser windows and new browser windows and paste the URL paste the URL http://websrv1/Hello/hello.jsphttp://websrv1/Hello/hello.jsp, , you should see the different you should see the different server info in two browser server info in two browser windows. As shown in screens.windows. As shown in screens.

Page 181: about websphere

WebSphere 5.0 : Testing Vertical Cluster WLMWebSphere 5.0 : Testing Vertical Cluster WLM

To test the failTo test the fail--over, Stop the over, Stop the one of the cluster member one of the cluster member server “helloserver1” As server “helloserver1” As shown in the screens.shown in the screens.

To stop the server select To stop the server select ServersServers-->Application >Application ServersServers-->Check the >Check the helloserver1helloserver1 checkbox and checkbox and click on click on StopStop

Open two new browser Open two new browser windows and paste the windows and paste the urlurlhttp://websrv1/Hello/hello.jsphttp://websrv1/Hello/hello.jsp, you should see that requests , you should see that requests will be always going to the will be always going to the “helloserver2”.“helloserver2”.

Page 182: about websphere

WebSphere 5.0 : Asynchronous Messaging (using JMS)WebSphere 5.0 : Asynchronous Messaging (using JMS)Asynchronous messaging provides a method for communication basedAsynchronous messaging provides a method for communication basedon the Java Message Service (JMS) programming interface. JMS proon the Java Message Service (JMS) programming interface. JMS provides vides a common mechanism for Java programs (clients and J2EE applicatia common mechanism for Java programs (clients and J2EE applications) ons) to create, send, receive, and read asynchronous requests, as JMSto create, send, receive, and read asynchronous requests, as JMSmessages.messages.JMS includes the common set of JMS interfaces that define how aJMS includes the common set of JMS interfaces that define how a JMS JMS client can access the facilities of a JMS provider. client can access the facilities of a JMS provider. This support enables J2EE applications, as JMS clients, to exchaThis support enables J2EE applications, as JMS clients, to exchange nge messages asynchronously with other JMS clients by using JMS messages asynchronously with other JMS clients by using JMS destinations (queues or topics)destinations (queues or topics)WebSphere 5.0 fully supports J2EE 1.3 JMS WebSphere 5.0 fully supports J2EE 1.3 JMS Supports different JMS providersSupports different JMS providers

Embedded providerEmbedded providerWebSphere MQWebSphere MQCustom JMS providersCustom JMS providers

Administrative console support for WebSphere MQ JMS providerAdministrative console support for WebSphere MQ JMS provider

Page 183: about websphere

MessageMessage--Driven BeansDriven BeansApplication server products compliant with the J2EE 1.3 specificApplication server products compliant with the J2EE 1.3 specification provide ation provide support for automatic asynchronous messaging using messagesupport for automatic asynchronous messaging using message--driven driven beans(MDBsbeans(MDBs), ), A type of enterprise bean defined in the EJB 2.0 specification, A type of enterprise bean defined in the EJB 2.0 specification, and JMS listeners, and JMS listeners, part of the JMS Application Server Facilities (ASF). part of the JMS Application Server Facilities (ASF). Messages are automatically retrieved from JMS destinations, optiMessages are automatically retrieved from JMS destinations, optionally within a onally within a transaction,then sent to the MDB in a J2EE application, without transaction,then sent to the MDB in a J2EE application, without the application the application having to explicitly poll JMS destinations.having to explicitly poll JMS destinations.A MDB is stateless component that is invoked by the J2EE containA MDB is stateless component that is invoked by the J2EE container as result of the er as result of the arrival of the JMS message at a particular JMS message at a partarrival of the JMS message at a particular JMS message at a particular JMS icular JMS destination.destination.MDB listener fully integrated with EJB container and runs in appMDB listener fully integrated with EJB container and runs in application server not lication server not in JMS serverin JMS serverMDB’sMDB’s can fully administered from WAS 5.0 administrative clientscan fully administered from WAS 5.0 administrative clients

Message listener MDB

Page 184: about websphere

Messaging TypesMessaging TypesApplication can use two styles of messagingApplication can use two styles of messaging

PointPoint--toto--point : Applications use queues to pass messages between point : Applications use queues to pass messages between each other, One application puts the message into the Q and otheeach other, One application puts the message into the Q and other r application takes the message from the Qapplication takes the message from the QPublish/subscribe : Applications publish messages to topics. To Publish/subscribe : Applications publish messages to topics. To receive receive messages, applications subscribe to topics; when a message is messages, applications subscribe to topics; when a message is published to a topic, it is automatically sent to all the applicpublished to a topic, it is automatically sent to all the applications that ations that are subscribers of that topic.are subscribers of that topic.

Page 185: about websphere

WebSphere 5 : JMS Server SupportWebSphere 5 : JMS Server Support

Full function JMS Server is included with WebSphere Application Full function JMS Server is included with WebSphere Application ServerServerInstalled as part of the server installationInstalled as part of the server installationFully integrated with the servers’ administration and runtimeFully integrated with the servers’ administration and runtimeFully compliant with J2EE 1.3 JMS compliance testsFully compliant with J2EE 1.3 JMS compliance tests

BuiltBuilt--in JMS Provider in JMS Provider –– ImplementationImplementationBased on WebSphere MQBased on WebSphere MQBuiltBuilt--in JMS provider has reduced function, smaller footprint comparedin JMS provider has reduced function, smaller footprint compared to to WebSphere MQ, Limitations includingWebSphere MQ, Limitations including

Not possible to exchange messages with queue managers outside ofNot possible to exchange messages with queue managers outside ofWASWASLimited MQ communications capabilitiesLimited MQ communications capabilities

External MQ supportExternal MQ supportAlthough WAS 5.0 provides builtAlthough WAS 5.0 provides built--in JMS provider, due to its limitations we in JMS provider, due to its limitations we might need to use external MQ providers like WebSphere MQ 5.3might need to use external MQ providers like WebSphere MQ 5.3

Usage Usage Customers who not require full function WebSphere MQ can use theCustomers who not require full function WebSphere MQ can use the internal internal JMS providerJMS providerCustomer currently using full function WebSphere MQ products areCustomer currently using full function WebSphere MQ products are expected expected to remain using the full function and can ignore the internal JMto remain using the full function and can ignore the internal JMS providerS providerCustomers can also start using Internal JMS provider as a start Customers can also start using Internal JMS provider as a start and later can and later can migrate to external .migrate to external .

Page 186: about websphere

JMS Server AdministrationJMS Server AdministrationThree types of JMS Managed ResourcesThree types of JMS Managed Resources

WebSphere JMS provider (builtWebSphere JMS provider (built--in provider)in provider)WebSphere MQ JMS providers ( external WebSphere MQ)WebSphere MQ JMS providers ( external WebSphere MQ)Third party JMS serversThird party JMS servers

In Base configuration JMS server runts within application serverIn Base configuration JMS server runts within application server processprocessIn ND , each node will have one separate JMS server process (JVMIn ND , each node will have one separate JMS server process (JVM))JMS resources defined in a JMS server are accessible from anywheJMS resources defined in a JMS server are accessible from anywhere in re in the cellthe cellJMS Applications use JNDI to look upJMS Applications use JNDI to look up

Connection factories ( drivers)Connection factories ( drivers)DestinationsDestinations

Page 187: about websphere

Administering JMS Resources Administering JMS Resources Select ProviderSelect ProviderCreate Connection FactoryCreate Connection Factory

Queue or Topic Connection Queue or Topic Connection factoryfactorySpecify JNDI nameSpecify JNDI nameUser and passwordUser and password

Create a JMS DestinationCreate a JMS DestinationQueue TopicQueue TopicJNDI nameJNDI name

Create listener portCreate listener portSelect JMS serverSelect JMS serverCreate listener portCreate listener port

To create listener ports chooseTo create listener ports chooseApplication Servers > server1 Application Servers > server1

>Message Listener Service >>Message Listener Service >At application install time, specify At application install time, specify listener port for listener port for MDBsMDBs

Page 188: about websphere

Web ServicesWeb ServicesWhat is a web service?What is a web service?

Web services are selfWeb services are self--contained, selfcontained, self--describing, modular describing, modular applications that can be published, located, and invoked across applications that can be published, located, and invoked across the the Web. Web.

A sample Web service might provide stock quotes or process A sample Web service might provide stock quotes or process credit card transactions. credit card transactions.

Once a Web service is deployed, other applications (and other WeOnce a Web service is deployed, other applications (and other Web b services) can discover and invoke the service.services) can discover and invoke the service.Web services are independent of specific programming languages oWeb services are independent of specific programming languages or r operating systems. Instead, Web services rely on preoperating systems. Instead, Web services rely on pre--existing transport existing transport technologies (such as HTTP) and standard data encoding techniquetechnologies (such as HTTP) and standard data encoding techniques s (such as XML) for their implementation.(such as XML) for their implementation.The Web services approach to programming is based on the idea ofThe Web services approach to programming is based on the idea ofbuilding applications by discovering and invoking networkbuilding applications by discovering and invoking network--available available applications to accomplish some task.applications to accomplish some task.

Page 189: about websphere

Web Services CharacteristicsWeb Services CharacteristicsThe presented serviceThe presented service--oriented architecture employs a loose coupling oriented architecture employs a loose coupling between the participants. Such a loose coupling provides greaterbetween the participants. Such a loose coupling provides greater flexibility:flexibility:In this architecture, a client is not coupled to a server, but In this architecture, a client is not coupled to a server, but to a service. to a service. Thus, the integration of the server to use takes place outside oThus, the integration of the server to use takes place outside of the scope f the scope of the client application programs.of the client application programs.Old and new functional blocks are encapsulated into components tOld and new functional blocks are encapsulated into components that work hat work as services.as services.Functional components and their interfaces are separated. TherefFunctional components and their interfaces are separated. Therefore, new ore, new interfaces can be plugged in more easily.interfaces can be plugged in more easily.Within complex applications, the control of business processes cWithin complex applications, the control of business processes can be an be isolated. A business rule engine can be incorporated to control isolated. A business rule engine can be incorporated to control the the workflow of a defined business process. Depending on the state oworkflow of a defined business process. Depending on the state of the f the workflow, the engine calls the respective services.workflow, the engine calls the respective services.Services can be incorporated dynamically during runtime.Services can be incorporated dynamically during runtime.Bindings are specified using configuration files and can thus eaBindings are specified using configuration files and can thus easily be sily be adapted to new needs.adapted to new needs.

Page 190: about websphere

Core Technologies Used in Web ServicesCore Technologies Used in Web ServicesXML XML ((eXtensibleeXtensible Markup Language) is the markup language that Markup Language) is the markup language that underlies most of the specifications used for Web services. XML underlies most of the specifications used for Web services. XML is a generic language that can be used to describe any kind of is a generic language that can be used to describe any kind of content in a structured way, separated from its presentation to content in a structured way, separated from its presentation to a a specific device.specific device.SOAP SOAP (formerly referred to as Simple Object Access Protocol, or (formerly referred to as Simple Object Access Protocol, or

ServiceService--Oriented Architecture ProtocolOriented Architecture Protocol——in fact, similarly to JDBC, in fact, similarly to JDBC, it is no longer an acronym) is a network, transport, and it is no longer an acronym) is a network, transport, and programming languageprogramming language-- neutral protocol that allows a client to neutral protocol that allows a client to call a remote service. The message format is XML.call a remote service. The message format is XML.WSDL WSDL (Web services description language) is an XML(Web services description language) is an XML--based based

interface and implementation description language. The service interface and implementation description language. The service provider uses a WSDL document in order to specify the provider uses a WSDL document in order to specify the operations a Web service provides, as well as the parameters operations a Web service provides, as well as the parameters and data types of these operations. A WSDL document also and data types of these operations. A WSDL document also contains the service access information.contains the service access information.UDDI UDDI (universal description, discovery, and integration) is both (universal description, discovery, and integration) is both

a clienta client-- side API and a SOAPside API and a SOAP--based server implementation that based server implementation that can be used to store and retrieve information on service can be used to store and retrieve information on service providers and Web services.providers and Web services.

Page 191: about websphere

Web Services Roles and FunctionsWeb Services Roles and FunctionsThe The service provider service provider creates a Web service and possibly publishes its creates a Web service and possibly publishes its interface and access information to the service registry. Each pinterface and access information to the service registry. Each provider rovider must decide which services to expose.must decide which services to expose.The The service broker service broker (also known as service registry) is responsible for (also known as service registry) is responsible for making the Web service interface and implementation access making the Web service interface and implementation access information available to any potential service requestor.information available to any potential service requestor.The The service requestor service requestor locates entries in the broker registry using locates entries in the broker registry using various find operations and then binds to the service provider ivarious find operations and then binds to the service provider in order n order to invoke one of its Web services.to invoke one of its Web services.

internet

Legacysystem

Serviceprovider

Service requester

Servicebroker

Page 192: about websphere

WebSphere 5.0 Support for Web ServicesWebSphere 5.0 Support for Web ServicesWeb services in WAS 5 have been enhanced with the addition of UDWeb services in WAS 5 have been enhanced with the addition of UDDI DI registry and web services gatewayregistry and web services gatewaySupport for SOAP based web services hosting and invocationSupport for SOAP based web services hosting and invocationWeb services support for SOAP/HTTP as service providerWeb services support for SOAP/HTTP as service providerApplication server can act as both web service requester and serApplication server can act as both web service requester and service vice providerprovider

Web services Gateway:Web services Gateway:The gateway is a middleware component that bridges the gap betweThe gateway is a middleware component that bridges the gap between en Internet and Intranet environments during Web service invocationInternet and Intranet environments during Web service invocations. You s. You use it to manage use it to manage

Web services. Web services. channels that carry requests to and responses from the services.channels that carry requests to and responses from the services.filters that act upon the services. filters that act upon the services. references to UDDI registries in which services can be registerereferences to UDDI registries in which services can be registered. d.

Gateway can be used to make your internal Web services availablGateway can be used to make your internal Web services available e externally, and to make external Web services available to your externally, and to make external Web services available to your internal internal systems.systems.Builds upon the WSDL (Web Services Description Language) and WSIBuilds upon the WSDL (Web Services Description Language) and WSIF F (Web Services Invocation Framework)(Web Services Invocation Framework)Gateway itself is a J2EE applicationGateway itself is a J2EE application

Page 193: about websphere

Tivoli Performance ViewerTivoli Performance ViewerWebSphere provides a Performance Monitor Interface (PMI) that alWebSphere provides a Performance Monitor Interface (PMI) that allows to lows to collect data on runcollect data on run--time and applications .time and applications .Performance data can be monitored and analyzed with a variety ofPerformance data can be monitored and analyzed with a variety of tools, tools, Tivoli Performance Viewer is one of the tool.Tivoli Performance Viewer is one of the tool.Tivoli Performance Viewer is previously known as Resource analyzTivoli Performance Viewer is previously known as Resource analyzererThis tool provides the ability to configure smart autoThis tool provides the ability to configure smart auto--tuning parameters that tuning parameters that will automatically make recommendations to tune critical WebSphewill automatically make recommendations to tune critical WebSphere re parameters for maximized performanceparameters for maximized performanceFew Performance Monitoring TasksFew Performance Monitoring Tasks

Enable Performance Monitoring ServicesEnable Performance Monitoring ServicesCollect the data, choose monitoring levels that determine which Collect the data, choose monitoring levels that determine which data counters are data counters are enabledenabledMonitor and analyze performance dataMonitor and analyze performance data

Page 194: about websphere

Administering Performing Monitoring ServicesAdministering Performing Monitoring Services

To monitor performance data To monitor performance data through PMI interfaces, we through PMI interfaces, we must first enable the must first enable the performance monitoring performance monitoring services through the admin services through the admin console and restart the console and restart the serverserverTo enable select ServersTo enable select Servers-->Application Servers>Application Servers-->Server1 >Server1 Click on the “Performance Click on the “Performance Monitoring Services” from Monitoring Services” from “Additional Properties ” list “Additional Properties ” list (you need to scroll the (you need to scroll the screen to this link)screen to this link)Check the Startup check box Check the Startup check box then click Applythen click ApplyRestart the serverRestart the serverEach server organized PMI Each server organized PMI data into modules and data into modules and submodulessubmodules

Page 195: about websphere

Performance Data TerminologyPerformance Data TerminologyPerformance Data HierarchyPerformance Data Hierarchy

Node : A physical machine in administrative domainNode : A physical machine in administrative domainServer: A functional unit that provides a service Server: A functional unit that provides a service Module: Module represents one of the resource categories for whiModule: Module represents one of the resource categories for which collected ch collected data is reported to the performance viewerdata is reported to the performance viewer

EJBsEJBsDatabase Connection PoolsDatabase Connection PoolsJVM run timeJVM run timeSession ManagerSession ManagerTransaction ManagerTransaction ManagerJDBC TimingsJDBC TimingsORBORBWeb modulesWeb modulesWLMWLMWeb servicesWeb services

SubmoduleSubmodule : Represents a find granularity of resource category (example: : Represents a find granularity of resource category (example: EJB EJB method, Servlet, JSP etc..method, Servlet, JSP etc..

ClassificationClassificationNumeric: Simple counts and sizesNumeric: Simple counts and sizesStatistical : Data on sample space (Average response time)Statistical : Data on sample space (Average response time)Load: Values as function of time ( Number of threads)Load: Values as function of time ( Number of threads)

Counter: Is a data type used to hold the performance data.Counter: Is a data type used to hold the performance data.Activating higher number of counters can slows down the applicaActivating higher number of counters can slows down the application tion performance.performance.

Page 196: about websphere

Data CollectionData CollectionEnterprise bean module, enterprise beanEnterprise bean module, enterprise bean -- methods in a bean Data methods in a bean Data counters for this category report load values, response times, acounters for this category report load values, response times, and life nd life cycle activities for enterprise beans Examples include the averacycle activities for enterprise beans Examples include the average ge number of active beans and the number of times bean data is loadnumber of active beans and the number of times bean data is loaded or ed or written to the database. the number of times a method is called written to the database. the number of times a method is called and the and the average response time for the method etc..average response time for the method etc..JDBC connection poolsJDBC connection pools -- Data counters for this category contain Data counters for this category contain usage information about connection pools for a database. Exampleusage information about connection pools for a database. Examples s include the average size of the connection pool or number of include the average size of the connection pool or number of connections, the average number of threads waiting for a connectconnections, the average number of threads waiting for a connection the ion the average wait time in milliseconds for a connection, and the averaverage wait time in milliseconds for a connection, and the average time age time the connection is in use.the connection is in use.JVM JVM -- Data counters for this category contain memory used by process Data counters for this category contain memory used by process as reported by JVM run time. Examples are the total memory availas reported by JVM run time. Examples are the total memory available able and the amount of free memory for the JVM. and the amount of free memory for the JVM. Servlet Session managerServlet Session manager -- Data counters for this category contain Data counters for this category contain usage information for HTTP sessions.Example include the total nuusage information for HTTP sessions.Example include the total number mber of accessed session, the average amount of time it takes for a sof accessed session, the average amount of time it takes for a session to ession to perform a request and average number of currently active HTTP perform a request and average number of currently active HTTP sessions.sessions.

Page 197: about websphere

Data CollectionData CollectionThread PoolThread Pool -- Data counters for this category contain information about Data counters for this category contain information about the thread pools for ORB threads and web container pools.Examplethe thread pools for ORB threads and web container pools.Exampleinclude number of active threads in the poolinclude number of active threads in the poolORBORB -- Data counters for this category contain information for the ORBData counters for this category contain information for the ORB. . Examples include object reference lookup time etc..Examples include object reference lookup time etc..Web Modules, ServletWeb Modules, Servlet -- Data counters for this category contain Data counters for this category contain information for the selected server. Example include the number information for the selected server. Example include the number of of loaded Servlet, number of requests for the Servlet etcloaded Servlet, number of requests for the Servlet etc

Page 198: about websphere

Tivoli Performance ViewerTivoli Performance ViewerTivoli performance viewer is a java GUI client which retrieves tTivoli performance viewer is a java GUI client which retrieves the he Performance Monitoring Infrastructure (PMI) data from an applicaPerformance Monitoring Infrastructure (PMI) data from an application tion server.server.Tivoli performance viewer is responsibleTivoli performance viewer is responsible

To provide Data in real timeTo provide Data in real timeTo record data in log To record data in log To provide data representation as charts, tabular formsTo provide data representation as charts, tabular forms

To minimize the performance impact on applications, Tivoli PerfoTo minimize the performance impact on applications, Tivoli Performance rmance Viewer polls the server at an interval set by the user.Viewer polls the server at an interval set by the user.To start Tivoli Performance Viewer use the command as followingTo start Tivoli Performance Viewer use the command as following

./opt/WebSphere/./opt/WebSphere/AppServer/bin/tperfviewer.shAppServer/bin/tperfviewer.sh localhostlocalhost 8879 SOAP8879 SOAPMake sure that you already enabled the Performance Monitor ServMake sure that you already enabled the Performance Monitor Service and ice and restarted the serverrestarted the server

Page 199: about websphere

Tivoli Performance Viewer Tivoli Performance Viewer -- ConsoleConsoleThe main console of The main console of the performance the performance viewer looks like the viewer looks like the screen on this pagescreen on this pageIt consists Resource It consists Resource Selection (left) panel Selection (left) panel and Data monitoring and Data monitoring (right) panel(right) panelThe monitoring The monitoring settings determine settings determine which counters are which counters are enabled, changes enabled, changes made to the settings made to the settings from Tivoli affect all from Tivoli affect all applications using the applications using the PMI dataPMI dataPerformance Performance monitoring level can monitoring level can be changed either be changed either from Admin console from Admin console or from Performance or from Performance Viewer as shown in Viewer as shown in the screen.the screen.Standard Standard meansmeans--all modules will set to all modules will set to HighHigh

Page 200: about websphere

Tivoli Performance Viewer Tivoli Performance Viewer -- ConsoleConsoleTo view summary To view summary reports, click the reports, click the application server icon in application server icon in the navigation treethe navigation treeView can be changed View can be changed from Tabular data form from Tabular data form to Chart by choosing the to Chart by choosing the TabsTabsWe can observe the data We can observe the data by requesting the by requesting the hello.jsphello.jsp from the from the browser and watch the browser and watch the Web Application’Web Application’s s Total RequestsTotal Requests value in value in Performance Viewer.Performance Viewer.All data reported by the All data reported by the performance Viewer can performance Viewer can be saved to a log file.be saved to a log file.

Page 201: about websphere

Other Tivoli ToolsOther Tivoli ToolsIBM Tivoli Monitoring for Web Infrastructure (IBM Tivoli Monitoring for Web Infrastructure (ITMfWIITMfWI))

Identifies potential problemsIdentifies potential problemsNotifies appropriate personnelNotifies appropriate personnelSuggests solutionsSuggests solutionsRealReal--time consoletime console

IBM Tivoli Monitoring for Transaction Performance (ITMTP)IBM Tivoli Monitoring for Transaction Performance (ITMTP)Round trip response time from between endRound trip response time from between end--user and serveruser and serverNetwork latencyNetwork latencyPage render timePage render time

Note: The above mentioned tools are not included with Note: The above mentioned tools are not included with WebSphere Application Server packagingWebSphere Application Server packagingTuning hintsTuning hints

Tuning should be done before deployment not afterTuning should be done before deployment not afterCreate stable environment, measure and document environmentCreate stable environment, measure and document environmentTune parameter on any selected objectTune parameter on any selected objectReRe--measure and evaluatemeasure and evaluate8080--20 rule20 rule-- find big performance problems firstfind big performance problems first

80% of performance gain with 20% effort80% of performance gain with 20% effort20% of additional performance gain requires 80% effort20% of additional performance gain requires 80% effort

Page 202: about websphere

WebSphere 5.0 WebSphere 5.0 -- TroubleshootingTroubleshootingProblems within an eProblems within an e--business environment can take many forms, business environment can take many forms, including poor performance, application unavailability, or unexpincluding poor performance, application unavailability, or unexpected ected results. The first step in problem resolution is to isolate the results. The first step in problem resolution is to isolate the problem and problem and understand what it is.understand what it is.WebSphere provides the following sources of feedback to help WebSphere provides the following sources of feedback to help with problem determination.with problem determination.Administrative console messagesAdministrative console messages. These provide important . These provide important information regarding runtime events and configuration problems.information regarding runtime events and configuration problems. They They are an important starting point to determine the cause of any are an important starting point to determine the cause of any configuration problem.configuration problem.Log files.Log files. Several generalSeveral general--purpose logs are provided, such as JVM purpose logs are provided, such as JVM standard logs, process (native) logs, and IBM service logs.standard logs, process (native) logs, and IBM service logs.Traces.Traces. Traces provide more detailed information about WebSphere Traces provide more detailed information about WebSphere components to determine what is wrong with your WebSphere components to determine what is wrong with your WebSphere environment.environment.Log AnalyzerLog Analyzer.The Log Analyzer is a GUI tool that permits the user to .The Log Analyzer is a GUI tool that permits the user to view any logs generated with log analyzer trace format, such as view any logs generated with log analyzer trace format, such as the IBM the IBM serviceservicelog file.log file. This tool allows the user to get error message explanations andThis tool allows the user to get error message explanations andinformation such as why the error occurred and how to recover frinformation such as why the error occurred and how to recover from it.om it.Thread Analyzer.Thread Analyzer. The Thread Analyzer technology preview assists The Thread Analyzer technology preview assists analyzing Java stack trace files and viewing the threads, both fanalyzing Java stack trace files and viewing the threads, both for hung or or hung or deadlock conditions, or to simply evaluate application processindeadlock conditions, or to simply evaluate application processing.g.

Page 203: about websphere

WebSphere 5.0 WebSphere 5.0 -- TroubleshootingTroubleshootingCollector tool.Collector tool. The Collector tool gathers information about the The Collector tool gathers information about the application server installation and packages it in an output JARapplication server installation and packages it in an output JAR file. The file. The information in the file includes logs, property files, configurainformation in the file includes logs, property files, configuration files, tion files, operating system and Java data, and prerequisite software presenoperating system and Java data, and prerequisite software presence and ce and levels. The file can be sent to IBM Customer Support to assist ilevels. The file can be sent to IBM Customer Support to assist in problem n problem determination and analysis.determination and analysis.FFDC.FFDC. The First Failure Data Capture (FFDC) function preserves the The First Failure Data Capture (FFDC) function preserves the information generated from a processing failure and returns continformation generated from a processing failure and returns control to rol to the affected engines. The captured data is saved automatically fthe affected engines. The captured data is saved automatically for use in or use in analyzing the problem, and could be collected by the Collector tanalyzing the problem, and could be collected by the Collector tool.ool.

Page 204: about websphere

TroubleshootingTroubleshooting-- Administrative Console MessagesAdministrative Console MessagesRuntime status messages are displayed at the WebSphere Status arRuntime status messages are displayed at the WebSphere Status area ea at the bottom of the administrative console, providing informatiat the bottom of the administrative console, providing information on regarding runtime events and configuration problems.regarding runtime events and configuration problems.The area consists of two frames:The area consists of two frames:

Runtime messagesRuntime messages

Configuration messagesConfiguration messages

Messages indicating configuration problems are cleared when Messages indicating configuration problems are cleared when the problem is fixedthe problem is fixedTo view the messages click on the icon To view the messages click on the icon XX or or ii or or !!

Page 205: about websphere

TroubleshootingTroubleshooting-- Log FilesLog FilesWebSphere Application Server can write system messages to severaWebSphere Application Server can write system messages to several l generalgeneral--purpose logs. These include:purpose logs. These include:JVM logs JVM logs are created by redirecting the System.out and System.err are created by redirecting the System.out and System.err streams of the JVM. By default, these files are stored as streams of the JVM. By default, these files are stored as <WAS_HOME>/logs/<server_name>/<WAS_HOME>/logs/<server_name>/SystemOut.logSystemOut.log and and SystemErr.logSystemErr.log..Process (native) logs Process (native) logs are created by redirecting the are created by redirecting the stdoutstdout and and stderrstderrstreams of the process’s native module (.streams of the process’s native module (.dllsdlls, .so, UNIX libraries, and other , .so, UNIX libraries, and other JNI native modules), including the JVM native code itself. TheseJNI native modules), including the JVM native code itself. These logs can logs can contain information relating to problems in native code or diagncontain information relating to problems in native code or diagnostic ostic information written by the JVM. By default, these files are storinformation written by the JVM. By default, these files are stored as ed as <WAS_HOME>/logs/<server_name>/native_stderr.log and <WAS_HOME>/logs/<server_name>/native_stderr.log and native_stdout.log.native_stdout.log.Service log Service log is a special log named, by default, activity.log, written in a is a special log named, by default, activity.log, written in a binary format. You cannot view the log directly using a text edibinary format. You cannot view the log directly using a text editor. Log tor. Log Analyzer or the Analyzer or the ShowlogShowlog tool is required to view the log.tool is required to view the log.

Page 206: about websphere

TroubleshootingTroubleshooting-- Configuring the JVM logsConfiguring the JVM logs

Configuring the JVM logsConfiguring the JVM logsTo view and modify the settings for the To view and modify the settings for the JVM System.out and System.err logs JVM System.out and System.err logs using the administrative consoles:using the administrative consoles:1. Click 1. Click Troubleshooting Troubleshooting --> > Logs Logs and Trace and Trace in the navigation tree.in the navigation tree.2. Select a server by clicking the server 2. Select a server by clicking the server name.name.3. Click 3. Click JVM Logs.JVM Logs.4. Select the 4. Select the Configuration Configuration tabtab5. Scroll through the window to display 5. Scroll through the window to display the attributesthe attributes6.Change appropriate values and save 6.Change appropriate values and save the click apply to save the changesthe click apply to save the changes7.Click on Save to commit the changes7.Click on Save to commit the changes

Page 207: about websphere

Troubleshooting Troubleshooting -- Process (native) LogsProcess (native) LogsProcess (native) logsProcess (native) logsThe The stdoutstdout and and stderrstderr streams written by native modules (.streams written by native modules (.dllsdlls, .so, UNIX, .so, UNIXlibraries, and other JNI modules) are redirected to the native llibraries, and other JNI modules) are redirected to the native log files atog files atapplication server startup. By default, these files are stored aapplication server startup. By default, these files are stored ass<WAS_HOME>/logs/<server_name>/native_stderr.log and <WAS_HOME>/logs/<server_name>/native_stderr.log and native_stdout.log.native_stdout.log.To view or change the log settings or to view the log:To view or change the log settings or to view the log:1. Click 1. Click Servers Servers --> Application Servers> Application Servers2. Select the server by clicking the name.2. Select the server by clicking the name.3. Select 3. Select Process Definition Process Definition in the Additional Properties table.in the Additional Properties table.4. Select 4. Select Process Logs Process Logs in the Additional Properties table.in the Additional Properties table.5. To view the settings, select the 5. To view the settings, select the Configuration Configuration tab. To view the logs tab. To view the logs select the select the Runtime Runtime tab.tab.

Page 208: about websphere

Troubleshooting Troubleshooting –– IBM Service (active) LogsIBM Service (active) LogsThe IBM service log is a special log The IBM service log is a special log written in a binary format that written in a binary format that captures events that show a captures events that show a history of WebSphere Application history of WebSphere Application Server activities, also known as the Server activities, also known as the activity logactivity log..1. Select 1. Select Troubleshooting Troubleshooting --> > Logs and TraceLogs and Trace..2. Select the server by clicking the 2. Select the server by clicking the name.name.3. Select 3. Select IBM Service LogsIBM Service Logs..4. Make appropriate changes4. Make appropriate changes5. Save the configuration5. Save the configuration6. Restart the server to apply the 6. Restart the server to apply the configuration changesconfiguration changesTo view the service log, use the To view the service log, use the showlogshowlog command in the command in the <WAS_HOME>/bin directory or <WAS_HOME>/bin directory or use Log Analyzeruse Log Analyzer

Page 209: about websphere

Troubleshooting Troubleshooting –– TracingTracingTracing can be useful if you have Tracing can be useful if you have problems with particular problems with particular components of WebSphere components of WebSphere Application Server.Application Server.By default, the trace for all By default, the trace for all WebSphere Application Server WebSphere Application Server components is disabled.components is disabled.

1.1. Select Select Troubleshooting Troubleshooting --> > Logs Logs and Traceand Trace..

2.2. Select the server by clicking the Select the server by clicking the name. You can select an name. You can select an application server, node agent, JMS application server, node agent, JMS server, or the Deployment server, or the Deployment Manager.Manager.

3.3. Select Select Diagnostic TraceDiagnostic Trace..4.4. Select the Select the Configuration Configuration tab.tab.5.5. Save the changed configuration.Save the changed configuration.6.6. Start (or restart) the server.Start (or restart) the server.

Page 210: about websphere

Troubleshooting Troubleshooting –– Enable Tracing on Running ServersEnable Tracing on Running Servers1.1. Select Select Troubleshooting Troubleshooting --> > Logs and TraceLogs and Trace..2.2. Select the server by clicking the name. You can select an applicSelect the server by clicking the name. You can select an application ation

server, node agent, JMS server, or the Deployment Manager.server, node agent, JMS server, or the Deployment Manager.3.3. Select Select Diagnostic Trace.Diagnostic Trace.4.4. Select the Select the Runtime Runtime tab.tab.

Select the Select the Save Trace Save Trace check box if you want to write your check box if you want to write your changes back to the server configuration.changes back to the server configuration.

5.5. Click Click ApplyApply..

Page 211: about websphere

Troubleshooting Troubleshooting –– Web Server Logs and TracesWeb Server Logs and TracesIf a problem is suspected with the Web server or between the WebIf a problem is suspected with the Web server or between the Webserver and the Web container, there are several tools you can usserver and the Web container, there are several tools you can use.e.Web server plugWeb server plug--in generationin generation

The Web server plugThe Web server plug--in configuration file controls what content is transferred in configuration file controls what content is transferred from the Web server to an application server. This file must be from the Web server to an application server. This file must be regenerated regenerated after certain changes to the WebSphere configuration server and after certain changes to the WebSphere configuration server and then moved then moved to the proper location on the Web server.to the proper location on the Web server.If there is a problem with requests being routed to WebSphere ApIf there is a problem with requests being routed to WebSphere Application plication Server from the Web server, make sure the Web server plugServer from the Web server, make sure the Web server plug--in has been in has been properly generated and moved to the Web server.properly generated and moved to the Web server.

Web server plugWeb server plug--in login logThe Web server plugThe Web server plug--in creates a log file containing error and informational in creates a log file containing error and informational messages. The level of information placed in this log is determimessages. The level of information placed in this log is determined by a ned by a setting in the Web server plugsetting in the Web server plug--in configuration file. Possible values in order of in configuration file. Possible values in order of significance are Trace, Warn and Error (default).significance are Trace, Warn and Error (default).

Web server plugWeb server plug--in configuration file log settingin configuration file log setting<?xml version="1.0"?><?xml version="1.0"?><<ConfigConfig>><Log <Log LogLevelLogLevel="Trace" Name="...="Trace" Name="...\\AppServerAppServer\\logslogs\\http_plugin.loghttp_plugin.log"/>"/>…..…..</</ConfigConfig>>These changes have to made manually to the pluginThese changes have to made manually to the plugin--cfg.xml file, by default WebSphere cfg.xml file, by default WebSphere keep the keep the LogLevelLogLevel as Erroras Error

Page 212: about websphere

Troubleshooting Troubleshooting –– HTTP Server LogsHTTP Server LogsThe IBM HTTP Server has the following log files that aid in probThe IBM HTTP Server has the following log files that aid in problem lem diagnosis:diagnosis:

Error logError logAccess logsAccess logs

Error logError logThe error log records IBM HTTP Server errors. The location for tThe error log records IBM HTTP Server errors. The location for the he error log is specified with the error log is specified with the ErrorLogErrorLog directive.directive.

Access logAccess logThe access log records all Web server activity, including the foThe access log records all Web server activity, including the following llowing information for each request:information for each request:

What was requestedWhat was requestedWho requested itWho requested itWhen it was requestedWhen it was requestedThe method usedThe method usedThe type of file sent in responseThe type of file sent in responseThe return codeThe return code

Page 213: about websphere

Troubleshooting Troubleshooting –– Log AnalyzerLog AnalyzerThe Log Analyzer is a GUI tool that permits the user to view The Log Analyzer is a GUI tool that permits the user to view service and activity logs. It can take one or more logs, merge service and activity logs. It can take one or more logs, merge all the data, and display the entries in sequence.all the data, and display the entries in sequence.This tool is shipped with an XML database, the This tool is shipped with an XML database, the symptom symptom databasedatabase, which contains strings for some common problems, , which contains strings for some common problems, reasons for the errors, and recovery steps. The Log Analyzer reasons for the errors, and recovery steps. The Log Analyzer compares every error record in the log file to the internal set compares every error record in the log file to the internal set of known problems in the symptom database and displays all of known problems in the symptom database and displays all the matches. This allows the user to get error message the matches. This allows the user to get error message explanations and information such as why the error occurred explanations and information such as why the error occurred and how to recover from it.and how to recover from it.The The symptom database symptom database can be updated with latest IBM’s can be updated with latest IBM’s symptom databasesymptom database

Using Log AnalyzerUsing Log Analyzer1.1. The Log Analyzer can be started from the <WAS_HOME>/bin The Log Analyzer can be started from the <WAS_HOME>/bin

directory using the directory using the wcslogbr.shwcslogbr.sh command.command.2.2. When the Log Analyzer GUI starts, select When the Log Analyzer GUI starts, select File File --> > Open Open from from

the main menu. Navigate to the <WAS_HOME>/logs the main menu. Navigate to the <WAS_HOME>/logs directory, select directory, select activity.log activity.log and click and click OpenOpen..

Page 214: about websphere

Troubleshooting Troubleshooting –– Log AnalyzerLog Analyzer3.3. Select an entry in the Select an entry in the

UnitOfWorkViewUnitOfWorkView folder and the folder and the details will appear in the upperdetails will appear in the upper--right right pane.pane.

4.4. To analyze a log entry, rightTo analyze a log entry, right--click click the entry and select the entry and select Analyze Analyze from from the popthe pop--up menu, as shown . The up menu, as shown . The entry will be compared to the entry will be compared to the symptom database. If there is a symptom database. If there is a match, the information will appear match, the information will appear in the lowerin the lower--right paneright paneLog information can be seen as Log information can be seen as shown in the second screen on this shown in the second screen on this page.page.You can update the symptom You can update the symptom database usingdatabase usingFile File --> Update Database > Update Database --> > WebSphere Application Server WebSphere Application Server Symptom Database (for WebSphere Symptom Database (for WebSphere Application Server) or WebSphere Application Server) or WebSphere Application Server Network Application Server Network Deployment Symptom DatabaseDeployment Symptom Database

Page 215: about websphere

Troubleshooting Troubleshooting –– Thread Analyzer Technology PreviewThread Analyzer Technology PreviewApplication servers sometimes produce a Java stack trace, also cApplication servers sometimes produce a Java stack trace, also called a alled a Java thread dump or Java thread dump or javacorejavacore file, as a result of errors. Tools were file, as a result of errors. Tools were needed to assist in viewing this trace.needed to assist in viewing this trace.The Thread Analyzer technical preview can assist you in analyzinThe Thread Analyzer technical preview can assist you in analyzing Java g Java stack trace files and in viewing the threads, both for hung or dstack trace files and in viewing the threads, both for hung or deadlock eadlock conditions, or to simply evaluate application processing.conditions, or to simply evaluate application processing.Thread Analyzer is not included in WebSphere package, we can doThread Analyzer is not included in WebSphere package, we can down wn load the tool from following URLload the tool from following URL

http://www7b.boulder.ibm.com/wsdd/downloads/ta.htmlhttp://www7b.boulder.ibm.com/wsdd/downloads/ta.html..Collector toolCollector tool

The Collector tool gathers information about a WebSphere ApplicaThe Collector tool gathers information about a WebSphere Application tion Server installation and packages it in an output JAR file. The fServer installation and packages it in an output JAR file. The file can be ile can be sent to IBM Customer Support to assist in problem determination sent to IBM Customer Support to assist in problem determination and and analysis. The information in the file includes logs, property fianalysis. The information in the file includes logs, property files, les, configuration files, operating system and Java data, and prerequconfiguration files, operating system and Java data, and prerequisite isite software presence and levels.software presence and levels.To run collector toll, log on to the system as root and do the To run collector toll, log on to the system as root and do the following:following:

# # mkdirmkdir workwork# # cdcd workworkwork# /opt/work# /opt/WebSphre/AppServer/bin/collector.shWebSphre/AppServer/bin/collector.sh

You can not run this tool from WebSphere home directory, and filYou can not run this tool from WebSphere home directory, and files will es will be created in work directory after the process finishedbe created in work directory after the process finished

Page 216: about websphere

Troubleshooting Troubleshooting –– OthersOthersFirst Failure Data Capture logsFirst Failure Data Capture logsThe First Failure Data Capture (FFDC) function preserves the infThe First Failure Data Capture (FFDC) function preserves the information ormation generated from a processing failure and returns control to the agenerated from a processing failure and returns control to the affected ffected engines.There are three property files which control the behavioengines.There are three property files which control the behavior of the r of the FFDC filter:FFDC filter:

properties/properties/ffdcStart.propertiesffdcStart.properties -- used while the server is startingused while the server is startingproperties/properties/ffdcRun.propertiesffdcRun.properties -- used after the server is readyused after the server is readyproperties/properties/ffdcStop.propertiesffdcStop.properties -- used while the server is stoppingused while the server is stopping

The captured data is saved automatically in the <WAS_HOME>/logs/The captured data is saved automatically in the <WAS_HOME>/logs/ffdcffdcdirectory for use in analyzing the problem, and could be collectdirectory for use in analyzing the problem, and could be collected by the ed by the Collector tool. The First Failure Data Capture tool is intended Collector tool. The First Failure Data Capture tool is intended primarily for primarily for use by IBM Service.use by IBM Service.

Page 217: about websphere

Troubleshooting Troubleshooting –– OthersOthersHTTP session monitoringHTTP session monitoring

In the event of sessionIn the event of session--related problems, it is helpful to collect all related problems, it is helpful to collect all sessionsession--related information. WebSphere Application Server V5 introduces related information. WebSphere Application Server V5 introduces an HTTP session tracker Servlet called IBMTrackerDebug. an HTTP session tracker Servlet called IBMTrackerDebug. To access the Servlet from a browser, use the following URL:To access the Servlet from a browser, use the following URL:

http://localhost:9080/Hello/servlet/com.ibm.ws.webcontainer.httphttp://localhost:9080/Hello/servlet/com.ibm.ws.webcontainer.httpsesession.IBMTrackerDebugssion.IBMTrackerDebug

System core dump analysisSystem core dump analysisIf possible, UNIX processes (including JVM process) will produceIf possible, UNIX processes (including JVM process) will produce a a system core dump as well as Java stack trace information in a prsystem core dump as well as Java stack trace information in a process's ocess's working directory if it crashes. The system core dump can providworking directory if it crashes. The system core dump can provide useful e useful information as to why the process crashed, giving you a system vinformation as to why the process crashed, giving you a system view of iew of a failing JVM process. However, the system core dump will not pra failing JVM process. However, the system core dump will not provide ovide Java class information. Everything in the dump is C library orieJava class information. Everything in the dump is C library oriented. The nted. The information provided for JVM process refers to Java's C librarieinformation provided for JVM process refers to Java's C libraries and not s and not the reference Java class files.the reference Java class files.

Page 218: about websphere

Application Debugging and TracingApplication Debugging and Tracing

Debugging applications is beyond the scope of this course. HowevDebugging applications is beyond the scope of this course. However, we er, we want to point out two facilities provided by WebSphere Applicatiwant to point out two facilities provided by WebSphere Application on Server:Server:

Application Server ToolkitApplication Server ToolkitJRasJRas extensions and logging toolkitextensions and logging toolkit

Page 219: about websphere

J2EE Best practices for better performanceJ2EE Best practices for better performance# Category Best practice description Importance

1 Servlets Do not store large object graphs in HttpSession 2

2 Servlets Release HttpSessions when finished 3

3 JSP Do not create HttpSessions in JSP’s by default 4

4 Servlets Minimize synchronization in Servlets 2

5 Enterprise Application components

Use JDBC connection pooling 3

6 Servlets Do not use SingleThreadModel 5

7 Enterprise Application components

Reuse datasources for JDBC connections 1

8 Enterprise Application components

Release JDBC resources when done 3

9 Servlets Use the HttpServlet Init method to perform expensive operations that need only be done once

4

10 Enterprise Application components

Minimize use of System.out.println 2

11 Enterprise Application components

Avoid String concatenation “+=” 1

12 EJB Access entity beans from session beans 3

13 EJB Reduce the EJB transaction isolation level where appropriate 5

14 EJB If EJBs and Clients in same JVM , Use “local” homes 2

Page 220: about websphere

WebSphere Tuning WebSphere Tuning Problem Tuning parameter

Overall throughput and response time are undesirable. Processor speed

AIX: Memory allocation error AIX file descriptors (ulimit) Scroll down to this parameter fromOperating Systems.

ORB: Response time and throughput indicate EJB requests with shorter execution times are being denied adequate access to threads in ORB thread pool.

AIX file descriptors (ulimit) Logical Pool Distribution (LPD) mechanism, set using ORB custom properties.

Solaris operating environment: Too many files open

Solaris file descriptors (ulimit) Scroll down to this parameter from Operating Systems.

Solaris operating environment: The server stalls during peak periods, responses take minutes, processor utilization remains high with all activity in the system processes, and netstat shows many sockets are open to port 80 in CLOSE_WAIT or FIN_WAIT_2 state.

Solaris tcp_time_wait_interval and Solaris p_fin_wait_2_flush_interval Scroll down to this parameter from Operating Systems.

Windows NT or Windows 2000: Netstat shows too many sockets are in TIME_WAIT. Under load, client requests do not arrive at the Web server because they time out or are rejected.

Windows NT or Windows 2000 TcpTimedWaitDelay For IBM HTTP Server on Windows NT, see ListenBackLog

Windows NT or Windows 2000: WebSphere Application Server performance decreased after an application server from another vendor was installed.

Microsoft Internet Information Server (IIS) properties

The Percent Maxed metric from the Tivoli Performance Viewer indicates that the Web container thread pool is too large or too small.

Thread pool Maximum size

Page 221: about websphere

WebSphere Tuning WebSphere Tuning Problem Tuning Parameter

Netstat shows too many TIME_WAIT state sockets for port 9080.

HTTP transports MaxKeepAliveConnections and HTTP transports MaxKeepAliveRequests

Too much disk input and output occurs due to paging. Maximum heap size

The Percent Used metric for a data source connection pool from the Tivoli Performance Viewer indicates the pool size is too large.

Maximum connection pool and Minimum connection pool

The Prepared Statement Discards metric from the Tivoli Performance Viewer indicates that the data source statement cache size is too small.

Statement cache size

Too much disk input and output occurs due to DB2 writing log records.

DB2 MinCommit

The Percent Maxed metric from the Tivoli Performance Viewer indicates that the Object Request Broker thread pool is too small.

EJB method Invocation Queuing

The Java Virtual Machine Profiler Interface (JVMPI) from the Tivoli Performance Viewer indicates over-utilization of objects when too much time is spent in garbage collection.

Detecting over-utilization of objects

The Used Memory metric from the Tivoli Performance Viewer shows memory leaks and the Java code displays an Out of Memory Exception

Detecting memory leaks

The Used Memory metric from the Tivoli Performance Viewer shows memory leaks and the Java code displays an Out of Memory exception.

Detecting memory leaks

Startup performance is poor. Using Java virtual machine settings, set a minimum heap size of at least 50MB (-Xms50m).

Page 222: about websphere

Thank You!Thank You!

http://www.jvrsystems.nethttp://www.jvrsystems.netJVR Systems, Inc.JVR Systems, Inc.Phone:Phone: (248) 471(248) 471--25792579Fax: Fax: (248) 471(248) 471--25092509