WebSphere Administration Course
Copyright © Oded Nissan 2009
Agenda
• WebSphere Overview• JEE Overview• WebSphere Architecture• Installing WebSphere• The Admin Console• Managing Applications• JEE Technologies• Summary
Copyright © Oded Nissan 2009
WebSphere Product Overview
Copyright © Oded Nissan 2009
What is WebSphere ?
• WebSphere is not a product but an IBM brand, powered by Java and JEE.
• WebSphere is infrastructure software for delivery of e-business applications.
• The WebSphere product family is divided into three categories:– Foundation and Tools– Business portals – Business Integration
Copyright © Oded Nissan 2009
WebSphere Product Family
Copyright © Oded Nissan 2009
WebSphere Product Family
• Foundation and Tools - represents the heart of the WebSphere product line; the WAS, the RAD product line, and the WebSphere tools for host integration.
• Business Portals - include WebSphere Portal Server WebSphere Commerce etc.
• Business Integration - includes the WebSphere MQ family of products for enterprise messaging, workflow, systems integration, WebSphere Business Integration.
Copyright © Oded Nissan 2009
Additional Product Families
• The Tivoli family of products for systems management and security provide additional capabilities for WebSphere.
• The Rational family of products for application development, such as Rational Application Developer, Rational Modeler for UML modeling, Rational Clear Case for SCM.
Copyright © Oded Nissan 2009
WebSphere Application Server (WAS)
• A JEE compliant application server.• Provides the core technologies used by other
WebSphere products.• Provides an environment to run web based
multi-tier e-business applications.
Copyright © Oded Nissan 2009
WebSphere Application Server (WAS)
Copyright © Oded Nissan 2009
WAS Packaging
• WAS Express V 6.0 – A lightweight edition of WAS without an EJB container.
• WAS Base V6.1 – A fully compliant JEE server supporting the JEE 1.4 spec.
• WAS Network Deployment V6.1 – extends WAS Base to include clustering capabilities, edge components and distributed configuration management.
Copyright © Oded Nissan 2009
WAS Packaging
Copyright © Oded Nissan 2009
Copyright © Oded Nissan 2009
Resources
• Info center for WAS 6.1 - http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp
• IBM Redbooks - http://www.redbooks.ibm.com/
JEE Overview
Copyright © Oded Nissan 2009
What is JEE ?
• A set of technologies for developing enterprise applications in Java
• Specified by Sun and the Java Community Process (JCP).
• Implemented by JEE vendors.• Implementations of JEE technologies are
provided within Application Servers.• Previously named J2EE (until version 1.4)
current version is JEE 5.
Copyright © Oded Nissan 2009
What is JEE ?
• Relation between JEE vendors and developers.
Copyright © Oded Nissan 2009
What is JEE ?• The Java Platform
Copyright © Oded Nissan 2009
High-EndServer
Java Technology Enabled Desktop
WorkgroupServer
Java Technology Enabled Devices
The Java Platform
Copyright © Oded Nissan 2009
OptionalPackages
Java Enterprise
Edition(JEE)
Java StandardEdition
(JavaSE)
JVM
Java Card APIs
CardVM
OptionalPackages
Personal Basis Profile
Personal Profile
Foundation Profile
CDC
MIDP
CLDC
KVM
Java Platform Micro Edition(JavaMETM)
* Under development in JCP
Why do we need JEE ?
• Standard API• Portable• Tool Support• Distribution• Transactions• Security• Scalability• Persistence
Copyright © Oded Nissan 2009
The JEE Architecture
• N-tier architecture• Comprised of technologies for the business
tier the presentation tier and other system services.
• Runs within the application server and within specific containers (web container, EJB container) within the Application server.
Copyright © Oded Nissan 2009
The JEE Architecture
• Uses the "component and container" model in which container provides system services in a well-defined and as industry standard
• JEE is a standard that also provides portability of code because it is based on Java technology and standard-based Java programming APIs
Copyright © Oded Nissan 2009
About N-Tier Architecture
• Single Tier – a simple desktop application.• Two Tier – A thin or a fat client and a server.• Three Tier – A presentation tier a business tier
and a Data tier.
Copyright © Oded Nissan 2009
Three-Tier architecture
Copyright © Oded Nissan 2009
Web Tier EJB Tier
JEE Tier Architecture
Copyright © Oded Nissan 2009
JEE Application Servers
• JEE vendors provide their implementation of JEE technologies within an Application Server.
• Each application server has its own implementation of JEE standards as well as some proprietary features.
• Comprised of a Web Container,EJB Container and other server services.
Copyright © Oded Nissan 2009
The App server and JEE containers.
Copyright © Oded Nissan 2009
JEE Development Roles
• Component provider– Bean provider
• Application assembler• Deployer• Platform provider
– Container provider• Tools provider• System administrator
Copyright © Oded Nissan 2009
The JEE Life Cycle
Copyright © Oded Nissan 2009
Creation Assembly Deployment
Created by Component Developer
Assembledand Augmentedby Application
Assembler
Processed by Deployer
Deploy
EnterpriseComponents
JEE Container
JEE APPJEE Modules
System Administrator Role
• Manage servers• Install and manage applications.• Manage and maintain configurations.• Create and maintain server topologies:
network deployment, cluster etc.• Monitor and troubleshoot production and test
deployments.• Implement a security policy.
Copyright © Oded Nissan 2009
JEE Development Tools
• Provided by Application Server vendors or open source projects.
• Usually provided as plugins to popular IDEs such as Eclipse or NetBeans.
• The tools help developers create JEE resources, debug and deploy them.
Copyright © Oded Nissan 2009
JEE Development Tools
• IBM – provides the RAD product (based on Eclipse) for developing for WebSphere.
• RAD 7.0 is compatible with WAS 6.1• The Eclipse project provides open source
plugins for most application servers.
Copyright © Oded Nissan 2009
The JEE Application Structure
Copyright © Oded Nissan 2009
JEE Application Structure
• A JEE application is packaged into an EAR file.• The EAR file contains Web modules, EJB modules and
utility jars.• The Web application is packaged into a WAR file, and
the WAR file is packaged into the EAR.• The EJB’s are packaged into a special jar file which is
the EJB module, which is packaged into the EAR file.
Copyright © Oded Nissan 2009
JEE Application Structure
Copyright © Oded Nissan 2009
The EAR File Structure
Copyright © Oded Nissan 2009
JEE projects in RAD
Copyright © Oded Nissan 2009
Copyright © Oded Nissan 2009
Packaging JEE Applications
• In order to deploy applications to WebSphere application code must be packaged into JEE modules (EAR WAR JAR etc.)
• Packaging applications can be done using:– RAD export options.– Ant scripts.
WebSphere Architecture
Copyright © Oded Nissan 2009
The WebSphere Architecture
• Base or Single Server environment features a standalone single server.
• Network Deployment or Multi Server environment, features multi servers managed centrally by a deployment management process.
Copyright © Oded Nissan 2009
The WebSphere Architecture
• A server is the smallest configuration unit and represents a WAS instance.
• A Node is a configuration unit that can include several servers, usually a node represents a physical machine running WAS.
• A Cell is a configuration unit that can include several nodes.
Copyright © Oded Nissan 2009
The WebSphere Architecture
• In a Base environment a single node manages a single server.
• In a Network Deployment environment we have a cell managing several nodes each containing one or more servers.
Copyright © Oded Nissan 2009
Base Environment
Copyright © Oded Nissan 2009
Network Deployment Environment
Copyright © Oded Nissan 2009
Java Management Extensions (JMX)
• The system management functionality of WebSphere Application Server is based on the use of Java Management Extensions (JMX). JMX is a framework that provides a standard way of exposing Java esources, for example application servers, to a system management infrastructure.
• The JMX framework allows a provider to implement functions, such as listing the configuration settings, and allows users to edit the settings. It also includes a notification layer that can be used by management applications to monitor events.
Copyright © Oded Nissan 2009
JMX Architecture
• The JMX architecture is structured into three layers:• Instrumentation layer The instrumentation layer dictates
how resources can be wrapped within special Java beans called Management Beans (MBeans).
• The agent layer consists of the MBean server and agents, which provide a management infrastructure.
• Management layer The management layer defines how external management applications can interact with the underlying layers in terms of protocols, APIs, and so on.
Copyright © Oded Nissan 2009
JMX Architecture
Copyright © Oded Nissan 2009
JMX Distributed Administration
Copyright © Oded Nissan 2009
Distributed Administration
• Administration in a distributed server environment is by necessity more complex than administration in a stand-alone server environment.
• In a distributed server environment, multiple WebSphere Application Server nodes are managed from a single central location.
Copyright © Oded Nissan 2009
Distributed Administration
• Administration is performed by three layers.
Copyright © Oded Nissan 2009
Distributed Administration
Copyright © Oded Nissan 2009
Distributed Process Discovery
• When a managed server begins its startup, it sends a discovery request message that allows other processes to discover its existence and establishcommunication channels with the process.
• Each node agent and deployment manager maintains status and configuration information by using discovery addresses, or ports. On startup, processes discover other running components, and create communication channels
Copyright © Oded Nissan 2009
Distributed Process Discovery
Copyright © Oded Nissan 2009
Configuration Management
• In a distributed server environment, the master repository of configuration and application data for the cell is managed by the deployment manager.
• Each node contains a separate copy of the repository containing only the required files.
• When an administrator makes changes to the configuration using an administration tool and saves these changes to the master repository, they are available for use. The next step is to synchronize the changes out to the nodes of the cell.
Copyright © Oded Nissan 2009
Configuration Synchronization
• Responsible for synchronizing the master configuration to all nodes in the cell.
• During the synchronization operation, the node agent checks with the deployment manager to see if any files that apply to the node have been updated in the master repository. New or updated files are sent to the node, while any deleted files are also deleted from the node.
Copyright © Oded Nissan 2009
Repository Directory Structure
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
Hardware Requirements
• For Windows (32 bit WebSphere Application Server) – Intel® Pentium processor at 500 MHz or faster – Intel EM64T or AMD Opteron – 1030 MB disk space– Minimum 512 MB physical memory; 1 GB recommended – CD-ROM drive
•For Windows (64 bit WebSphere Application Server) – AMD Opteron or Intel EM64T – 1030 MB disk space– Minimum 1 GB of physical memory recommended – CD-ROM drive
Copyright © Oded Nissan 2009
Software Requirements - OS
• Microsoft Windows Server 2008, • Microsoft Windows XP Professional with SP2 • Microsoft Vista Business• Microsoft Vista Enterprise• Microsoft Vista Ultimate• Microsoft Windows 2000• Microsoft Windows Server 2003
Copyright © Oded Nissan 2009
Software Requirements - Java
• IBM 32-bit SDK for Windows, Java 2 Technology Edition, V5.0 SR2
• IBM 64-bit SDK for Windows on AMD64/EM64T architecture, Java 2 Technology Edition, V5.0 SR2
• The Java VM supplied with WebSphere must be used to run WAS and application clients.
Copyright © Oded Nissan 2009
Software Requirements – Web Servers
• IBM HTTP Server V7.0 V6.1 V6.0• Apache HTTP Server V2.2 V2.0.54• Microsoft IIS V7.0 V6.0 V5.0• Lotus Domino Enterprise Server 6.5.4 or 7.0 • More specific details at:
– http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg27007663
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
WAS Installation
Copyright © Oded Nissan 2009
First Steps
• First Steps is a post installation tool that is started automatically at the end of installation.
• Can be started from the windows menu or command line.
• Used to verify the installation. Run the installation verification utility.
Copyright © Oded Nissan 2009
First Steps
Copyright © Oded Nissan 2009
Installing WebSphere
• Install WAS on your machine, according to the options specified in the previous slides.
• Verify the installation by running the installation verification from the FirstSteps console.
• Run the administrative console from the First Steps console.
Copyright © Oded Nissan 2009
Installing Silently
• Installing WebSphere Application Server using silent installation refers to using a file to supply installation options without user interaction.
• To configure the installation, change the options in the response file before you issue the installation command.
Copyright © Oded Nissan 2009
Customizing the Response file
• Locate the sample options response file. The file is named responsefile.base.txt in the WAS directory on the product CD-ROM or DVD.
• Copy the file to preserve it in its original form. For example, copy it as myoptions.txt on your disc drive.
• Edit the copy in your flat file editor of choice, on the target operating system. Read the directions within the response file to choose appropriate values.
Copyright © Oded Nissan 2009
Installing Silently
• Run the installer with the response file as a parameter:– "disc_drive_D:\WAS\install" -options "C:\temp\
WAS\myoptionsfile.txt" -silent
Copyright © Oded Nissan 2009
WAS Directory Structure
Copyright © Oded Nissan 2009
WAS Directory Structure
• bin – contains command line tools• _uninst – uninstaller for products.• config – XML configuration files• InstalledApps – installed applications• java – the JRE installed with WAS• logs – WAS log files• properties – property files for WAS
configuration.
Copyright © Oded Nissan 2009
WAS Directory Structure
• profiles – contains WAS profiles. (A profile defines a WAS configuration).
• lib – WAS java libraries• derby – a lightweight relational DB.• samples – sample applications with source
and jacl scripts.
Copyright © Oded Nissan 2009
Command Line Tools
• startServer – starts the server• stopServer – stops the server• serverStatus – displays server status• wasProfile – manage WAS profiles.• versionInfo – displays installed product
versions.
Copyright © Oded Nissan 2009
Log files in the logs directory
• SystemOut.log – the JVM output log, contains all WAS and application messages logged to the standard output.
• SystemErr.log – contains all WAS and application messages logged to standard error.
• startServer.log and stopServer.log – log messages related to server startup and shutdown.
• Native_stderr.log and native_stdout.log – contains log messages from native libraries logged to standard output and standard error.
Copyright © Oded Nissan 2009
The Admin Console
Copyright © Oded Nissan 2009
The WAS Admin Console
• A web based application for administrating the server.
• Configuration is read and saved into XML files in the config directory.
• The admin console itself is a JEE application installed on WebSphere.
Copyright © Oded Nissan 2009
Starting the admin console
• The admin console can be started using a browser by pointing to the URL: http://localhost:9060/ibm/console
• In the login screen we can optionally enter a username
• If security is enabled we must enter a username and password. Authentication is performed using a JAAS module.
Copyright © Oded Nissan 2009
The WAS Admin Console
Copyright © Oded Nissan 2009
Admin Console Navigation Menu
• Servers – management and administration of application servers, web servers and MQ servers.
• Applications – installation, removal and management of JEE applications.
• Resources – creation and configuration of JEE resources such as JDBC Datasources, JMS queues and messaging engines, JCA Connectors and more.
Copyright © Oded Nissan 2009
Admin Console Navigation Menu
• Security – security management and configuration for servers and applications.
• Environment – configuration of virtual hosts, web server plugin generation, environment variables, JNDI naming and more.
• System Administration – saving the master configuration and console prefrences.
Copyright © Oded Nissan 2009
Admin Console Navigation Menu
• Users and Groups – configuration and management of users, groups and roles. Relevant only if administrative security is enabled.
• Monitoring and Tuning – configuration of performance monitoring.
• Troubleshooting – logging and tracing configuration.
Copyright © Oded Nissan 2009
Admin Console Navigation Menu
• Service Integration – configuration of message buses and web services (handlers, security etc.)
• UDDI – management of UDDI nodes, UDDI is a web services registry.
• Guided Activities – wizards for connecting a web server to an application server and connecting to a database.
Copyright © Oded Nissan 2009
Customizing the Admin Console
• The console navigation provides a hierarchical view of all of the tasks available in the console. A task is a page in the work area consisting of one or more console modules.
• Use the view menu at the top of the navigation to filter the list of tasks by product. Or, you can create a customized list by selecting My tasks from the View menu.
Copyright © Oded Nissan 2009
Saving Changes
• Until you save changes to the master repository, the administrative console uses a local workspace to track your changes.
• You can update the master repository with your administrative console changes, discard your administrative console changes and continue working with the master repository, or continue working with your administrative console changes that are not saved to the master repository.
Copyright © Oded Nissan 2009
Console Preferences
• Turn on workspace automatic refresh - Specifies whether you want the administrative console workspace to redraw automatically after the administrative configuration changes.
• No confirmation on workspace discard - Specifies whether the confirmation dialog is displayed after a request is received to discard the workspace. The default is to display confirmation dialogs.
Copyright © Oded Nissan 2009
Console Preferences
• Use default scope - Specifies whether the default scope is the administrative console node.
• Show the help portlet - Specifies whether the help portlet on the right of the console displays.
• Synchronize changes with nodes - Specifies whether to synchronize changes that are saved to the deployment manager profile with all the nodes that are running.
Copyright © Oded Nissan 2009
Console Preferences
• Enable command assistance notifications - Specifies whether to send Java Management Extensions (JMX) notifications that contain command assistance data from the administrative console.
• Log command assistance commands - Specifies whether to log all the command assistance wsadmin data to a file.
Copyright © Oded Nissan 2009
Application Server Settings
Copyright © Oded Nissan 2009
Application Server Settings
• Use this page to view or change the settings of an application server instance. An application server is a server which provides services required to run enterprise applications.
• To view this administrative console page, click Servers > Application Servers > server_name.
• On the Configuration tab, you can edit fields. On the Runtime tab, you can look at read-only information. The Runtime tab is available only when the server is running.
Copyright © Oded Nissan 2009
Configuration Tab – General Properties
• Name - Specifies a logical name for the server. Server names must be unique within a node. Read only.
• Node Name – the Websphere node.• Run in development mode - Enabling this option may
reduce the startup time of an application server. • Parallel Start - Specifies that you want the server
components, services, and applications to start in parallel rather than sequentially.
Copyright © Oded Nissan 2009
Configuration Tab – General Properties
• Class loading mode - Specifies whether the class loader should search in the parent class loader or in the application class loader first to load a class.
• Access to internal server classes - Specifies whether the applications can access many of the server implementation classes.
Copyright © Oded Nissan 2009
Runtime Tab
• Process Id – the process id of the server process in the OS.
• Cell Name• Node Name• State – the server’s state
Copyright © Oded Nissan 2009
Container Settings
• Web Container – settings related to the web container.
• EJB Container – settings related to the EJB container.
• Container services – ORB service settings, profiling settings, transaction settings and more.
Copyright © Oded Nissan 2009
Server Infrastructure
• Java and process management – JVM settings, JVM system properties, process parameters etc.
• Administration – configuration of administration services, JMX connection type etc.
Copyright © Oded Nissan 2009
Communication
• Ports – the communication ports used by WebSphere, here we can change the ports.
• Messaging – the JMS messaging listener service used by MDBs.
Copyright © Oded Nissan 2009
In General
• The configuration tab contains shortcuts to categories that can be reached using the navigator.
• Use the console’s online help by pressing the help link in the upper right corner of the screen, in order to get help about the various configuration options.
Copyright © Oded Nissan 2009
Administration with Scripting
• WebSphere can also be configured using a scripting language.
• WebSphere provides a scripting interface base on the Bean Scripting Framework(BSF) called wsadmin.
• Wsadmin acts as an interface to Java objects accessed by scripts.
Copyright © Oded Nissan 2009
Administration with Scripting
• Wsadmin uses JMX beans for configuration.
Copyright © Oded Nissan 2009
The wsadmin Tool
• Wsadmin supports two different scripting language syntaxes: JACL and jython.
• JACL is on its way out, jython will be the only scripting language used in WebSphere 7.
• Most existing scripts today are written in JACL.
Copyright © Oded Nissan 2009
The wsadmin Tool
• Wsadmin supports two different scripting language syntaxes: JACL and jython.
• JACL is on its way out, jython will be the only scripting language used in WebSphere 7.
• Most existing scripts today are written in JACL.
Copyright © Oded Nissan 2009
The wsadmin Tool
• Wsadmin can be launched from <WAS_HOME>/profiles/<profile name>/bin/wsadmin.bat
• Three ways to launch:– Command option wsadmin –c <command>– Script file: wsadmin –f <script file>– Interactively: wsadmin
Copyright © Oded Nissan 2009
The wsadmin Tool
• There are five Java objects that perform different operations:– AdminConfig – create or change the configuration.– AdminApp – install modify or manage applications.– AdminControl – work with running objects, perform traces
and data type conversion.– AdminTask – access a set of task oriented administration
commands.– Help – display information and details about which
Mbeans are running.
Copyright © Oded Nissan 2009
JACL Script Example
set temp [catch {$AdminApp list} appList]puts "List of application will be uninstalled are $appList"
foreach app $appList { set temp [catch {$AdminApp uninstall $app} uninstallResult] puts "Uninstall result $uninstallResult" set temp [catch {$AdminConfig save} saveResult] puts "Save result $saveResult"}
Copyright © Oded Nissan 2009
Managing Applications
Copyright © Oded Nissan 2009
Managing Applications
• Use the console to manage existing applications. (start, stop remove etc.)
• Use the console to install new JEE applications packaged in an EAR file.
Copyright © Oded Nissan 2009
Enterprise Applications
Copyright © Oded Nissan 2009
Enterprise Applications
• Start – start the selected application.• Stop – stop the selected application.• Install – install a new application.• Uninstall – remove an existing application.• Update – update an existing application with a
new EAR file.• Remove file – remove a single file from an
application.
Copyright © Oded Nissan 2009
Enterprise Applications
• Export – export the application as an EAR file.• Export DDL – export DDL files found in the
application.• The application status shows the current
status of the application (started, stopped).
Copyright © Oded Nissan 2009
Installing an application
• We can install an application in WebSphere in 3 different ways:– Using the Admin Console.– Using wsadmin scripting files. (we will discuss
later).– Programmatically using JMX beans.
Copyright © Oded Nissan 2009
Installing an Application (step 1)
• Choose the EAR file to install
Copyright © Oded Nissan 2009
Installing an Application (step 1)
• Browse the file system and choose the EAR file to install.
• Context root – change the context root for web applications. In case we are installing a WAR file and not an EAR file.
Copyright © Oded Nissan 2009
Installing an Application (step 2)
Copyright © Oded Nissan 2009
Installing an Application (step 2)
• Precompile JavaServer Pages files - Specify whether to precompile JavaServer Pages (JSP) files as a part of installation.
• Directory to install application – install the application is a specific directory.
• Deploy enterprise beans – deploy EJBs if they have not been deployed.
• Press the next button without overriding default values.
Copyright © Oded Nissan 2009
Installing an Application (step 3)
Copyright © Oded Nissan 2009
Installing an Application (step 3)
• Use this panel to specify deployment targets where you want to install the modules contained in your application. Modules can be installed on the same deployment target or dispersed among several deployment targets. A deployment target can be an application server, cluster of application servers or Web server.
• Press the next button
Copyright © Oded Nissan 2009
Installing an Application (step 4)
Copyright © Oded Nissan 2009
Installing an Application (step 4)
• Review your settings and press finish to complete the installation.
Copyright © Oded Nissan 2009
Installing an Application (step 5)
Copyright © Oded Nissan 2009
Installing an Application (step 5)
• WebSphere displays application deployment messages. Installation problems will be displayed here.
• Chose save to master configuration to complete the application installation.
• We can now start the application by choosing the manage applications link.
Copyright © Oded Nissan 2009
JEE Technologies
Copyright © Oded Nissan 2009
JEE 1.4 Technologies
• Presentation tier technologies– Servlets 2.4– Java Server Pages (JSP) 2.0– Java Standard Tag Library– Web ServicesThese technologies enable the implementation of a
presentation tier in the JEE framework.
Copyright © Oded Nissan 2009
JEE 1.4 Technologies
• Enterprise Application Technologies– Enterprise Java Beans (EJB) 2.1– Java Connector Architecture (JCA) 1.5– Java Messaging Services (JMS) 1.1– Java Transaction API (JTA) 1.1These technologies enable the implementation of
the business tier in the JEE framework.
Copyright © Oded Nissan 2009
Enterprise Java Beans (EJB)
• What is EJB ?– EJB is a standard JEE technology developed by Sun
and the Java community– A component architecture for building distributed
applications.– A server side technology.– Usually used to implement the application’s
business logic.
Copyright © Oded Nissan 2009
Benefits of EJB
• Distributed components• Transaction management support• Security• Scalability and fail-over• Asynchronous• Persistence – object relational mapping.
Copyright © Oded Nissan 2009
EJB Types
• Stateless Session beans• Stateful Session beans• Message driven beans – asynchronous, based
on JMS.• Entities – Java Persistence architecture (JPA).
Object-relational mapping.
Copyright © Oded Nissan 2009
EJB Example
Copyright © Oded Nissan 2009
Java Messaging Services (JMS)
• Messaging systems (MOM) provide– De-coupled communication – Asynchronous communication– Plays a role of centralized post office
• Benefits of Messaging systems– Flexible, Reliable, Scalable communication systems
• Point-to-Point, Publish and Subscribe• JMS defines standard Java APIs to messaging systems
Copyright © Oded Nissan 2009
Java Connector Architecture (JCA)
• Defines standard API for integrating J2EE technology with EIS systems– CICS, SAP, PeopleSoft, etc.
• Before Connector architecture, each App server has to provide an proprietary adaptor for each EIS system– m (# of App servers) x n (# of EIS's) Adaptors
• With Connector architecture, same adaptor works with all JEE compliant containers– 1 (common to all App servers) x n (# of EIS's) Adaptors
Copyright © Oded Nissan 2009
Java Transaction API
• The Java™ Transaction API (JTA) allows applications to perform distributed transactions, that is, transactions that access and update data on two or more networked computer resources.
• The JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the application, the application server, and the resource manager that controls access to the shared resources affected by the transactions.
Copyright © Oded Nissan 2009
Java Transaction API (JTA)
• A JTA transaction is controlled by the Java EE transaction manager.
• JEE support declarative transactions, called Container Managed Transactions.
• The JTA API can also be used directly by the developer.
• JTA supports XA transactions.
Copyright © Oded Nissan 2009
Servlets
• Java™ objects which extend the functionality of a HTTP server
• Dynamic contents generation• Better alternative to CGI, NSAPI, ISAPI, etc.
– Efficient– Platform and server independent– Session management– Java-based
Copyright © Oded Nissan 2009
Servlet Example
Copyright © Oded Nissan 2009
A Servlet receives an HTTP request performs an action and generate output,
Java Server Pages (JSP)
• Enables separation of business logic from presentation– Presentation is in the form of HTML or XML/XSLT– Business logic is implemented as Java Beans or
custom tags– Better maintainability, reusability
• Extensible via custom tags• Builds on Servlet technology (JSP is compiled into a
Servlet).
Copyright © Oded Nissan 2009
JSP Example
<%@ page import="java.util.*" %> <HTML> <BODY> <% System.out.println( "Evaluating date now" ); Date date = new Date(); %> Hello! The time is now <%= date %> </BODY> </HTML>
Copyright © Oded Nissan 2009
Web Services
• What is a Web Service ?– A web service is a software system identified by a
URI, whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML-based messages conveyed by Internet protocols.
Copyright © Oded Nissan 2009
Web Services
• Provide a way to connect heterogonous systems in a Language neutral, platform neutral manner.
• Use the HTTP protocol to pass messages in the SOAP protocol.
• Described by a Web Services Description language (WSDL) document.
• Vendors provide tools to generate web service clients from a WSDL.
• Web services can be registered and looked up in a UDDI directory.
Copyright © Oded Nissan 2009
Web Services Architecture
Copyright © Oded Nissan 2009
Web Services in JEE
• Web services are a platform neutral standard, JEE provides its own platform implementation.
• JEE provide tools for exposing JEE components such as EJBs as web services.
• JEE also provides tools for generating web service clients from existing WSDL documents and an API for accessing the services.
Copyright © Oded Nissan 2009
Java Authentication and Authorizations Service (JAAS)• Pluggable authentication framework
– Userid/password– Smartcard– Kerberos– Biometric
• Application portability regardless of authentication schemes underneath– JAAS provides authentication scheme independent API– Authentication schemes are specified Login configuration
file, which will be read by JAAS
Copyright © Oded Nissan 2009
JAAS Pluggable Authentication
Copyright © Oded Nissan 2009
JNDI
• Java Naming and Directory Interface• Utilized by J2EE applications to locate
resources and objects in portable fashion– Applications use symbolic names to find object
references to resources via JNDI– The symbolic names and object references have
to be configured by system administrator when the application is deployed.
Copyright © Oded Nissan 2009
Java management Extensions (JMX)
• JMX technology provides a simple, standard way of managing resources such as applications, devices, and services.
• JMX is used to monitor and manage the JVM itself (the jconsole application is an example).
• In JEE JMX is used to manage server configuration and resources.
• All applications server vendors provide JMX beans, which manage their servers.
Copyright © Oded Nissan 2009
Java management Extensions (JMX)
Copyright © Oded Nissan 2009
Putting it All Together
Copyright © Oded Nissan 2009
The App server and JEE containers.
Copyright © Oded Nissan 2009
Resources
• Info center for WAS 6.1 - http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp
• IBM Redbook – sg247304 WAS 6.1 System Management and configuration.
• Admin Console context sensitive online help.
Copyright © Oded Nissan 2009
Copyright © Oded Nissan 2009
Summary
• WebSphere Overview• JEE Overview• WebSphere Architecture• Installing WebSphere• The Admin Console• Managing Applications• JEE Technologies
Top Related