Sie sind auf Seite 1von 28

Welcome to:

Application Installation
Unit Objectives
After completing this unit, you should be able to:
•Discuss methods of installing Enterprise Applications in
WebSphere Application Server Version 5.0
–Using the Administrative Console
–Using the command line administration tool wsadmin
•Discuss Enterprise Application Properties
Installing Enterprise Applications
Administrative Console

Read
XML Administrative
Configuration Server Interactive
Files Write

JACL
Command
wsadmin File
Installation Tasks
•Create an Application Server (optional)
•Configure the application environment as required (variables,
virtual hosts, classpath, security)
•Configure application resources (JDBC provider, Data
sources)
•Install Application
•Manage static content (files served by Web server, not in
EAR file).
Place the Application Files in a Directory
•Most often, the application file you will receive will be an
Enterprise Application Archive (.ear) file.
•The .ear file is composed of one or more of the following
objects and their data descriptors:
–Enterprise JavaBeans (EJB) Module, consisting of Java
archive (.jar) files
–Web Archive (.war) files, consisting of Web content, JSPs,
and Servlets
–Client Archive .jar file
–Resource Archive files (.rar)
–Supporting files or classes
•The directory most often used to hold the .ear file before it is
installed is <as_root>/installableApps
Create an Application Server (1 of 3)
•You can create an Application Server by selecting:
–Servers > Application Servers then click New
Create an Application Server (2 of 3)
•Select Node
•Enter Application
Server name
•Generate unique ports
•Select template
•Click Next
Create an Application Server (3 of 3)
•Read and understand the Possible issues listed
•Confirm the creation of the new server by clicking Finish.
Other Configuration Elements
•After installing the EAR file there probably are more
configuration tasks before application can be run
–JDBC Provider
–Data sources
–JMS connection factories, queues and topics
–JMS server
–Global security
–J2C authentication aliases
–Virtual Hosts
Creating JDBC Provider Resources
•Create JDBC provider before
defining Data sources
•One JDBC provider needed
for each unique Database
driver
•To use XA JDBC provider for
DB2 run usejdbc2 script first
•JDBC providers can be
defined at cell, node or server
scope

Click first

Create Data Sources next


Creating a Data Source (1 of 2)
Creating a Data Source (2 of 2)

1
Creating a J2C Authentication Alias
•Click New to create a new
Alias
•Enter
– Alias name, can prefix
name with host name
– User ID and
corresponding
Password
– Optional description
Setting Data Source Custom Properties

•Of all these


custom
properties
databaseName
must be set to
point to the real
database name.
•A description can
also be optionally
added
Enterprise Application Installation (1 of 8)
•Select Applications > Install New Application
•Click Browse and locate the EAR file containing the
application’s modules
•Click Next
Enterprise Application Installation (2 of 8)
•Configure JNDI
bindings for:
–Prefixes
–EJB 1.1 bindings
–Connection Factory
•Virtual Host for Web
modules
•In most cases this page
can be skipped without
changes
•Click Next
Enterprise Application Installation (3 of 8)
•Pre-compile JSPs
•Change installed
application directory
•Deploy EJBs
•Change Application
name
Enterprise Application Installation (4 of 8)
•The next few pages of the wizard allow you to tweak the configuration
of the Application components.

Step Function
2 Provide JNDI Names for Beans
3 Provide default datasource mapping for modules
containing 2.0 entity beans
4 Map datasources for all 2.0 CMP beans
5 Map EJB references to beans
6 Map resource env entry references to resources
7 Map virtual hosts for web modules
8 Map modules to application servers
9 Map security roles to users/groups
10 Ensure all unprotected 2.0 methods have the correct
level of protection
11 Summary
Enterprise Application Installation (5 of 8)
•On this page you determine which modules run on which
Application Server.
–Select the Application Server
–Check module for the selected server
–Click Apply
Enterprise Application Installation (6 of 8)
•Users and Groups can be mapped to groups
Enterprise Application Installation (7 of 8)
•Once all configuration parameters have been set to your
satisfaction, click Finish to install the Enterprise Application
Enterprise Application Installation (8 of 8)
•After installation install you can:
– Start
– Stop
– Uninstall
– Update
– Export
– Export DDL
wsadmin - Command Line Application Installer
•Takes an assembled J2EE application (.ear file) and prepares
it to run on the server.
•Walks the modules in the .ear file to locate and resolve
bindings.
•Updates the server’s configuration files to reflect the
application is installed.
•Expands the .ear file into the server run time directories
Classloaders
•Classloaders are part of the JVM code
JVM classloaders •They find and load class files
•Classloaders affect:
–The packaging of applications
–The run-time behavior of packaged
WebSphere extensions
applications deployed to application
classloader servers
•Several classloaders are used to enable
the J2EE specification
•Each classloader is a child of the
Application module
classloader(s)
classloader above it
Classloaders

•JVM classloaders include boot


JVM classloaders
(global classpath) classloader, extensions classloader and
CLASSPATH classloader

•WebSphere extensions classloader loads


WebSphere extensions WebSphere and J2EE classes required at
classloader
(ws.ext.dirs) runtime
•Defined by ws.ext.dirs system property

•Modules running in the server are loaded


Application module by one or more application module
classloader(s)
(J2EE spec)
classloaders
•These follow specific J2EE loading rules
to load classes and JAR files
Classloader Isolation Policies
•Classloader isolation policies determine the number and
function of classloaders

•Application classloader policy (defined in Application Server


configuration)
–SINGLE – use a single classloader, shared by all
applications
–MULTIPLE (default) – use a different classloader for each
application
•WAR classloader policy (defined in Application configuration)
–APPLICATION – the application classloader loads the Web
module’s classes
–MODULE (default) – each Web module has its own
classloader
Classloader Mode
•Classloader mode determines whether the classloader
searches in the parent classloader or in the application
classloader first
–PARENT_FIRST (default) – search in the parent
classloader before searching in the application classloader
to load a class.
–PARENT_LAST – search in the application classloader
before searching in the parent classloader to load a class.

•Specified in three places:


–Application Server – used if classloader policy is SINGLE
–Application – used if classloader policy is MULTIPLE
–Web Module – used if WAR classloader policy is MODULE
Unit Summary
•Methods for installing and updating applications
–Administrative Console
–wsadmin for command line installation

•Configure other resources to support applications


–Application Server
–JDBC providers and data sources
–Classloaders

Das könnte Ihnen auch gefallen