Deploying your Applications on WebSphere Application Server 7.0-6.0

After installing an application server, we would want to deploy applications. Applications can be installed manually or in an automated fashion using scripts. In this two-part article by Pankaj Kumar Singh, we will cover how to manually deploy a J2EE (Enterprise Edition) application. As we walk through this article, we will show you how to deploy two applications. One application does not require database connectivity; the second is a database aware application which requires some WebSphere configuration to provide database connectivity to the application.

In this article, we will cover the following topics:

  • Application server internals
  • The web container
  • Virtual hosts
  • WebSphere ports
  • Data sources
  • Java Naming and Directory Interface (JNDI)
  • Application deployment
  • J2EE applications
  • Enterprise Archive (EAR)
  • Web Archive (WAR)
  • Java Archive (JAR)

Inside the Application Server

Before we look at deploying an application, we will quickly run over the internals of WebSphere Application Server (WAS). The anatomy of WebSphere Application Server is quite detailed, so for now, we will briefly explain the important parts of WebSphere Application Server.

The figure below shows the basic architecture model for a WebSphere Application Server JVM.

WebSphere Application Server 7.0 Administration Guide

An important thing to remember is that the WebSphere product code base is the same for all operating-systems (platforms). The Java applications that are deployed are written once and can be deployed to all versions of a given WebSphere release without any code changes.

JVM

All WebSphere Application Servers are essentially Java Virtual Machines (JVMs). IBM has implemented the J2EE application server model in a way which maximizes the J2EE specification and also provides many enhancements creating specific features for WAS. J2EE applications are deployed to an Application Server.

Web container

A common type of business application is a web application. The WAS web container is essentially a Java-based web server contained within an application server's JVM, which serves the web component of an application to the client browser.

Virtual hosts

A virtual host is a configuration element which is required for the web container to receive HTTP requests. As in most web server technologies, a single machine may be required to host multiple applications and appear to the outside world as multiple machines. Resources that are associated with a particular virtual host are designed to not share data with resources belonging to another virtual host, even if the virtual hosts share the same physical machine. Each virtual host is given a logical name and assigned one or more DNS aliases by which it is known. A DNS alias is the TCP/ host name and port number that are used to request a web resource, for example: <hostname>:9080/<servlet>.

By default, two virtual host aliases are created during installation. One for the administration console called admin_host and another called default_host which is assigned as the default virtual host alias for all application deployments unless overridden during the deployment phase. All web applications must be mapped to a virtual host, otherwise web browser clients cannot access the application that is being served by the web container.

Environment settings

WebSphere uses Java environment variables to control settings and properties relating to the server environment. WebSphere variables are used to configure product path names, such as the location of a database driver, for example, ORACLE_JDBC_DRIVER_PATH, and environmental values required by internal WebSphere services and/or applications.

Resources

Configuration data is stored in XML files in the underlying configuration repository of the WebSphere Application Server. Resource definitions are a fundamental part of J2EE administration. Application logic can vary depending on the business requirement and there are several types of resource types that can be used by an application. Below is a list of some of the most commonly used resource types.

Resource Types

Description

JDBC (Java database connectivity)

Used to define providers and data sources

URL Providers

Used to define end-points for external services for example web services...

JMS Providers

Used to defined messaging configurations for Java Message Service, MQ connection factories and queue destinations etc.

Mail Providers

Enable applications to send and receive mail, typically use the SMTP protocol.

TermDescriptionVoteScore
Websphare 6 2
-2