This guide describes in simple terms how to install a single configuration of WebSphere Application Server Advanced Edition that uses--
This guide covers installing from the WebSphere Application Server CD as well as upgrading to Version 3.02 by running an executable downloaded from the product Web site at http://www.ibm.com/software/webservers/appserv/.
This guide does not describe how to migrate your files used for a previous version of WebSphere Application Server. For information on migrating files and for detailed information about the installation process, see the WebSphere Application Server Version 3.02 Advanced Edition Getting Started manual, which is accessible from the product Web site.
You may also need a text editor to edit files and a ZIP tool to unpack files.
If your system already holds WebSphere Application Server and the correct levels of IBM JDK, IBM HTTP Server and DB2 UDB, proceed directly to "Installing WebSphere Application Server" and opt to upgrade your installation.
If your system does not already hold WebSphere Application Server, IBM JDK, IBM HTTP Server, and DB2 UDB, obtain the product CD for WebSphere Application Server or download the components listed in "Software" above from the Web. Then, do either of the following:
This is the recommended approach because it allows you to ensure that the prerequisites install correctly before attempting to install WebSphere Application Server.
If your system is not connected to the network, also complete the steps in "Setting up TCP/IP for standalone operations".
Attention: Sun JDK 1.2 causes unexpected results if you install it before installing WebSphere Application Server 3.02 and IBM JDK 1.1.7. To prevent these results, uninstall Sun JDK 1.2 before installing WebSphere Application Server.
To install IBM JDK n1.1.7p, which you can obtain from an IBM Web site, do the following:
ibm-jdk-n117p-win32-x86.exe.
To install IBM HTTP Server, which you can obtain from an IBM Web site, do the following:
\httpd\Setup.exe. If you have the
downloaded file, run the program HTTPServer_ex.exe.
For the user ID and password, consider using a single Windows NT user ID and password for all of the WebSphere and support software packages--DB2, HTTP and WebSphere. Also consider using a user ID which has administrative rights, although this would not be recommended for a production system. Fill in the user ID and password here. If you need to create a new user ID and password, do it using the Windows NT User Manager. Note the comments in the README file; if this machine is a Domain Controller you need to perform an additional step as described in the README file.
htpasswd -m conf\admin.passwd <userid>
hostname at a command prompt.
For example, if entering hostname at a command prompt returns
smith, go to the line #ServerName new.host.name in the httpd.conf
file and add ServerName smith below the line. The file now shows:
If you need to install DB2 UDB, don't reboot yet. If you have already installed DB2 UDB, reboot your system and proceed to "Testing installation of prerequisites."
If you already have installed DB2 UDB Version 6.1 with fixpack 2 (or fixpack 1a if fixpack 2 is not available) or DB2 UDB Version 5.2 with fixpack 11 (or fixpack 10), then proceed to "Testing installation of prerequisites" or "Installing WebSphere Application Server".
db2inst.exe in
the \install subdirectory for the appropriate language. For example, for English look
in the \nt\db2\en\install subdirectory.
If you downloaded
DB2 UDB, unzip the DB2 zip file to a temporary directory using an option
that recreates the directory structure. Then, run the setup.exe
file from the directory.
If you installed DB2 UDB from the WebSphere Application Server CD and you are not using VisualAge for Java Version 3.0, proceed to "Testing installation of prerequisites". DB2 UDB fixpack 10 was installed when you installed the base UDB product.
If you did not install DB2 UDB from the WebSphere Application Server CD or are using VisualAge for Java Version 3.0, download the appropriate DB2 UDB fixpack from the product Web site. VisualAge for Java Version 3.0 requires fixpack 11. Otherwise, you may use fixpack 10 or 11.
Next, do the following:
DB2 - DB2 and DB2 - DB2DAS00.
If you have the Netfinity Support Manager or other monitoring agents
you may need to stop these as well, since they can lock DB2.
setup.exe from the fixpack temporary directory.
When the installation finishes, restart your computer and login as the user you have been using to configure the software.
After your system restarts, the DB2 First Steps and Control Center dialogs may display. At this point, you may create the database sample used by the WebSphere Application Server samples. To create the database sample, click Create the SAMPLE database in the DB2 First Steps dialog and then click Yes in the confirmation dialog.
If you receive an error message stating that the database was not created, go to the Services dialog accessible from a Control Panel and ensure that the status for the DB2-DB2 service is Started. The startup type for the DB2-DB2 service should be Automatic and the hardware profile should be Enabled. Once you start the DB2-DB2 service, try creating the database sample again.
After you finish, close the DB2 dialogs.
If the server does not start, check the README file in the IBM HTTP Server installation directory (c:\http for this guide) and take whatever appropriate action is noted in the README file.
When you enter these you should see the configuration page for
the Web server.
You have now tested and configured DB2 and HTTP Server. Also check that
you have the right JDK installed and configured by starting a command
prompt and typing:
java -fullversion
You should see the response
java full version "JDK 1.1.7 IBM build n117p-19990823 (JIT enabled: ibmjitc)
If you don't, check that c:\jdk1.1.7 (or whatever you specified for the IBM JDK directory) has been added to your path.
To install WebSphere Application Server, do the following:
\nt\setup.exe if you have the product CD.
You will need 30-50Mb free in your temp directory (usually on the C drive), even if you are installing on another drive, because the installation shield package unpacks to the temp directory. This will kick off an installation shield package.
You now have two options:
If WebSphere Application Server is not already installed on your system, proceed to step 7.
If you are installing from the downloaded file, you will now see:
If you are installing from the product CD, you will see:
If you have other JDKs installed, make sure you select
the IBM JDK, and click Next.
Note: If you use an invalid user ID to install WebSphere, it will not successfully register the WebSphere Administrative Server to the NT services database.
Fill in the user ID, security password, and confirming password; and
specify the user ID and password for the database. For the database values,
if you have already installed DB2 UDB, ensure that you specify the Username
and Password specified when installing DB2 UDB. Then click Next.
The next panel points you to the README and, if you are installing
the samples, states where the samples have been installed and the server
to use.
For the most recent version of the README or release notes, go to Library section of the product Web site at http://www.ibm.com/software/webservers/appserv/.
If you installed IBM HTTP Server or DB2 UDB as part of the WebSphere Application Server installation (that is, you did not install either prerequisite product before installing Application Server), you may need to configure them. See "Installing IBM HTTP Server 1.3.6" or "Installing DB2 Universal Database (UDB)" for details.
Further, if you installed DB2 UDB as part of the WebSphere Application Server installation,
the installation program should create a database to store the
administrative configuration when your system starts up after rebooting.
The database definition is based on the JDBC URL you
specified during installation; the steps in this guide use jdbc:db2:was
for the JDBC URL. Thus, the installation program should create the
WAS database with its DB2 application heap size set to 256.
To ensure that the WAS database exists, do the following:
If you see WAS in the list, proceed to "Testing your installation".
If you do not see WAS listed, go to the Services dialog accessible from a Control Panel and set the startup for the DB2-DB2 service to Automatic. Also, ensure that the hardware profile for the DB2-DB2 service is enabled. Then, complete the steps in the next section, "Setting up administrative configuration." Optionally, for information about why the installation program did not create the WAS database, look at the wasdb2.log file.
If the DB2 database WAS has not yet been created, do the following:
CREATE DATABASE WAS
UPDATE DB CFG FOR WAS USING APPLHEAPSZ 256
quit to leave the CLP, and then exit to finish
the command prompt.
If an application heap size of 256 doesn't work for your system, return to the DB2 Command Line Processor and change the application heap size to, for example, 512 using the command:
Wait patiently. To see whether the system is still trying to start the server, examine the Performance page of the Task Manager.
If the server is slow to start or does not start successfully, look at the last line in the \WebSphere\AppServer\logs\tracefile log. If the trace file says server is open for e-business, the server has started.
Hint: You can control the server from a command line or batch file using the following commands:
Explaining the AdminServer: The AdminServer doesn't run any servlets, Java Server Pages, or Enterprise Beans. Each node can have multiple JVMs known as servers which run the application code. The Admin Server manages these servers, and if they stop, it restarts them. Each server can have EJB Containers to run EJBs, and a servlet engine to run servlets. Servers can either be independent, running different code, or clones which are identical, and the infrastructure manages spreading the incoming requests across the servers. A cluster consists of multiple nodes, each with clones.
Although the installation has created a default server, it hasn't started it, so you can't run anything yet.
Once the server starts, it is marked in the configuration database that it should be running. If it stops, or if you reboot the machine, the administrative server will automatically restart it. Even if the administrative server fails, it will continue to run.
The next step is to configure an Enterprise Bean and test the bean.
To test an Enterprise Bean inside WebSphere Application Server, configure one of the samples, and use a sample servlet to test it. The samples in general are documented, and can be located in the Programs -> IBM WebSphere -> Application Server V3.0 -> Samples choice of the Start menu.
This exercise uses the Enterprise Bean Increment. This bean is simply a counter.
If you have not done so already, create the database sample for use with Increment:
Increment is an Entity Bean, thus it requires a database to store the values of the bean. WebSphere Application Server 3.02 uses a concept from JDBC 2.0 to implement access to persistent stores such as databases, although Version 3.02 is not yet JDBC2.0 compliant. This is called a DataSource.
The DataSource is important for two reasons. First, it gives connection pooling to databases, so WebSphere can reuse database connections. Second, for BMP or session beans, it creates a model where the bean can ask the application server for a connection. This gives the application server the hook it needs to grab the XA resource manager handle so that it can become the transaction coordinator for the transaction. The way this works is by defining a JDBCDriver to the Application Server, then a particular database as a DataSource. This database is given a local name, which will be made available in the JNDI name space.
Servlets and BMP or Session Beans that want to access the DataSource can retrieve it using a JNDI lookup, and then get a standard JDBC connection from the DataSource. This is documented under Connection Pooling in the online help.
The DataSource is the object that applications will be configured to use. WebSphere Application Server 3.02 separates the DataSource from the JDBC driver. This is important, because you may want to reconfigure a DataSource to use an alternative driver (for example, one that supports two-phase commits for transactions).
To configure a DataSource:
DB2AppDriver and, for Implementation
class, select COM.ibm.db2.jdbc.app.DB2Driver. Leave the
URL prefix as jdbc:db2 and JTA Enabled as false.
(JTA is the transaction API. DB2 6.1 FP1 provides a JTA enabled driver, but 5.2
does not.)
sampledb for Name and sample
for Database name.
The first entry, Name, is used to create the JNDI directory entry
for the database. For CMP Enterprise Beans such as the sample Increment,
the server will automatically pick this up. For servlets and non-CMP beans, this
will make a JNDI name of jdbc/sampledb. See the connection pool
sample program for a programming example.
The second entry, Database name, is the name of the database, and is concatenated with the URL prefix field (see above) to make the full JDBC URL of the database. The name in this example, sample, was created when you installed DB2.
For the last field, Driver, the only choice is DB2AppDriver
because it is the only JDBCDriver defined.
The minimum and maximum connection pool sizes are clear.
The Connection timeout (default 300 seconds = 5 minutes) means that if the pool reaches the maximum, new connections will wait this long for a new connection before timing out.
The Idle timeout of 1800 seconds (30 minutes), means that if connections in the pool are unused for 30 minutes they will be closed down to the minimum.
The Orphan timeout field indicates how long a connection can remain allocated before the server decides that the owner thread has died and the connection should be recovered.
If you don't, try refreshing the view. Select WebSphere Admin Domain and click on the Refresh selected subtree button.
Note that the right-click behavior is different when the object is running. You must hold down the right mouse button while you browse the pop-up menu, and then let go on the selection you want to make. This prevents a random click from affecting the server.
You are prompted with a dialog:
Note: Each EJB-JAR file can contain more than one EJB. WebSphere Application Server Version 3.02 includes a EJB-JAR browser, and this example uses an individual bean to deploy.
Select Increment.jar and double-click on it.
You should see "inside" the JAR file now:
A dialog stating that the Enterprise Bean is deploying briefly displays.
During this deployment process, the product generates the code to actually run the Enterprise Bean in the server. This includes code to persist the state (for an Entity Bean), manage transactions, and also the RMI-IIOP stubs and ties.
The Database Access field is set to Shared, which is
equivalent to Option C locking/caching, and supports clustering.
You can now look at the deployment descriptor by clicking the Edit
button:
Only the JNDI name and the environment variables are editable here. This is because updating other properties requires re-generating the code. To update other properties, edit the deployment descriptor using VisualAge for Java Enterprise Edition, or use the standalone EJB tool, jetace, which is included with WebSphere Application Server. Don't change any properties now.
Because WebSphere is running under the user ID that has full rights to DB2, you can leave the user ID and password blank. Alternatively you can enter a valid user ID and password that has access to this database.
This defines the pool size for the bean. In general, WebSphere tries to optimize Enterprise Bean access by re-using existing beans where the semantics of the EJB specification allow it. Note that the maximum is not a hard maximum, but the maximum number of instances that will be held alive.
The Find for update field specifies the locking behavior of the bean. It reduces deadlock when beans are updated. Normally, when a findByPrimaryKey is issued, WebSphere Application Server puts a shared lock on the database row and then, if the client updates the bean, WebSphere Application Server converts it to an exclusive lock. If two transactions run at the same time, deadlock occurs. If this is likely to happen, enabling Find for update causes the product to use an exclusive lock when the find is issued, avoiding deadlock.
To test the deployment, go to the samples page:
Click on Visit Again repeatedly, and the number will increase by one each time.
You have now installed and configured an EJB application.
To see what is going on in the database, start up the DB2 Command Line Processor:
Data similar to the following is displayed:
If your system is not connected to a network, you must set up WebSphere Application Server for standalone operations.
To set up your system for standalone operations, you must have TCP/IP networking installed. If you will run WebSphere Application Server as a standalone (not connected to a network), your host name must remain fixed. WebSphere Application Server is a "networked" system that can be clustered into a single domain, with the administration and other aspects rely upon the IP networking. When the product starts for the first time, it records the host name. When it restarts, it needs to be able to contact that IP address again. If you wish to use WebSphere Application Server "disconnected", you must still always be able to "ping" your host name successfully.
If you need to set up a fixed IP address, go to the Network section of the Control Panel, in the Adapters tab, and install the MS Loopback Adapter.
Then, go to the Protocols tab, open TCP/IP properties, and specify a fixed TCP/IP
address of 10.0.0.1 (which is an address reserved for private use and thus appropriate
for standalone operations), and a subnet mask of 255.255.255.0.
No default gateway for this adapter was specified. Go to the Bindings tab,
select all protocols, expand TCP/IP Protocol, and then move the
MS Loopback Adapter to the top of the TCP/IP Protocol list as shown below.
Save the changes and reboot. After rebooting, you should be able to ping your host name whether or not you are connected to a network. To test your new TCP/IP setup, ping your host name while running standalone and, optionally, while connected to a network.