websphere application server v3.02 adv install.doc.doc.doc

47
WebSphere Application Server 버버 3.0 버버버 버버 Installing WebSphere Application Server 3.02 Advanced Edition for Windows NT using DB2 and IBM HTTP Server This guide describes in simple terms how to install a single configuration of WebSphere Application Server Advanced Edition that uses-- Windows NT IBM HTTP Server DB2 UDB A single node 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 1 / 47

Upload: tess98

Post on 21-Nov-2014

924 views

Category:

Documents


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

Installing WebSphere Application Server 3.02 Advanced Edition for Windows NT using DB2 and IBM HTTP ServerThis guide describes in simple terms how to install a single configuration of WebSphere Application Server Advanced Edition that uses--

Windows NT

IBM HTTP Server

DB2 UDB

A single node

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.

Contents

Prerequisites

Deciding which steps to follow

Installing IBM JDK n1.1.7p build level 0823

Installing IBM HTTP Server 1.3.6

Installing DB2 Universal Database (UDB)

Testing installation of prerequisites

Installing WebSphere Application Server

Testing your installation

1 / 38

Page 2: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

Configuring an Enterprise Bean

Setting up TCP/IP for standalone operations

Prerequisites

Hardware

A Pentium II or comparable processor or later

Support for a communications adapter

75 MB of free disk space for installation; plus 20 MB for installing IBM HTTP Server; plus 150

MB for installing DB2 UDB

256 MB of memory (512 recommended)

Operating system

Microsoft Windows NT Server Version 4.0 with Service Pack (SP) 4

Software

IBM JDK n1.1.7p for Windows NT, build level 0823

IBM HTTP Server Version 1.3.6

DB2 UDB 6.1 with fixpack 2, or DB2 UDB 5.2 with fixpack 10 or 11. If you already have DB2

UDB 5.2 installed with an earlier fixpack, you can install a fixpack over it. If you are using

VisualAge for Java 3.0 and DB2 UDB 5.2, you must use fixpack 11.

WebSphere Application Server 3.02 Advanced Edition

A Web browser that supports HTML 4 and Cascading Style Sheets (such as Netscape

Navigator 4.07 or Microsoft Internet Explorer 4.01 or higher)

You may also need a text editor to edit files and a ZIP tool to unpack files.

Deciding which steps to follow

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.

2 / 38

Page 3: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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:

Install any needed components in the following order:

1. Install IBM JDK n1.1.7p for Windows NT

2. Install IBM HTTP Server Version 1.3.6

3. Install DB2 UDB 6.1 with fixpack 2, or DB2 UDB 5.2 with fixpack 10 or 11

4. Install WebSphere Application Server 3.02 Advanced Edition

This is the recommended approach because it allows you to ensure that the prerequisites install correctly before attempting to install WebSphere Application Server.

Proceed directly to "Installing WebSphere Application Server" and instruct the installation

program to install the IBM JDK, IBM HTTP Server, and DB2 UDB products for you along with

WebSphere Application Server.

If your system is not connected to the network, also complete the steps in "Setting up TCP/IP for standalone operations".

Installing IBM JDK n1.1.7p build level 0823

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:

1. Run the file ibm-jdk-n117p-win32-x86.exe.

2. Select Yes, select Next, read the license agreement, and accept it.

3 / 38

Page 4: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

3. Leave the default selections and then select Next twice.

4. Select Finish.

Installing IBM HTTP Server 1.3.6

To install IBM HTTP Server, which you can obtain from an IBM Web site, do the following:

1. If you have the product CD, run \httpd\Setup.exe. If you have the downloaded file, run the

program HTTPServer_ex.exe.

2. Select the language and click OK.

3. Click Next, read the license agreement, and accept it.

4. Select the installation directory. The following example uses C:\http\.

4 / 38

Page 5: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

5. Select Yes to create the directory. Then select Next.

6. Select the Typical installation stream, click Next and then Next to accept the Program

folder. The Information for Service Setup window displays:

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

5 / 38

Page 6: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

7. Click Install, opt not to restart your computer, and finish the install package.

8. Configure the HTTP Admin server password:

1. Go to a command prompt for the c:\http directory, and enter:

htpasswd -m conf\admin.passwd <userid>

2. Type a password, and confirm it.

9. Configure the ServerName of the Web server at this point. (Or, using the Administration

console of HTTP Server, configure the Web server at a later time.)

1. Using a text editor such as Notepad, Editpad or WordPad, edit the file c:\http\conf\

httpd.conf.

2. Go to the line #ServerName new.host.name. Remove the # and replace

new.host.name with the domain name of your machine. For example, insert

smith.ibm.com. If you don't know your host name, enter hostname at a command

prompt.

3. Save the file.

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."

Installing DB2 Universal Database (UDB)

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".

Installing the base product

1. If you have the WebSphere Application Server CD, run db2inst.exe in the \install

subdirectory for the appropriate language. For example, for English look in the \nt\db2\en\

install subdirectory.

6 / 38

Page 7: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

2. Select Next, choose the Workgroup Edition, and then select Next.

3. Put a check mark beside the Typical installation, keep the default installation directory (C:\

SQLLIB), and click Next.

4. Overwrite the default Username and Password with the same user ID you specified

previously (if you installed IBM HTTP Server). This will make it the DB2 administration ID as

well.

5. Select Next, and continue with the installation.

6. After the product installs, opt to restart your system.

Installing the DB2 UDB fixpack

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

7 / 38

Page 8: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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:

1. From the Services panel of the Control Panel, stop the services 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.

2. Unzip the fixpack file into a temporary directory. Delete the DB2 install directory if you

wish.

3. Run setup.exe from the fixpack temporary directory.

4. Click Next, and then Next again. Select the check box to always start the DB2 instance.

Consider selecting the check box to start the control center.

5. Click Next. If needed, fill in your Username and password, and click Next again. Then, click

Install.

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

8 / 38

Page 9: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

Testing installation of prerequisites

1. If you have installed some prerequisites and have not since restarted your computer, do so

now.

2. Start IBM HTTP Server. From the Start menu, select Programs -> IBM HTTP Server ->

Start HTTP Server; or use a Services dialog, which is available from a Control Panel, to

start the IBM HTTP Server.

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.

3. Open a browser and browse http://localhost/. You should see:

9 / 38

Page 10: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

4. Select Configure server.

5. When prompted, enter the username and password that you entered in the htpasswd

command.

10 / 38

Page 11: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

When you enter these you should see the configuration page for the Web server.

6. Use the basic settings to check the server name parameter you set earlier.

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.

Installing WebSphere Application Server

To install WebSphere Application Server, do the following:

11 / 38

Page 12: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

1. If IBM HTTP Server or another Web server on your system is running, stop the Web server.

2. Run the downloaded executable if you obtained Version 3.02 from the product Web site. Or,

run \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.

3. If you installing from the product CD, select a language and click OK.

4. Click Next to pass the introductory page.

5. If you already have a JDK and database program installed, but do not have supported

versions, a dialog opens informing you of the need to upgrade the prerequisite software. If

this dialog is not shown, proceed to step 6.

6. If WebSphere Application Server with the appropriate prerequisites is already installed on

your system, a dialog giving you the option to upgrade WebSphere Application Server

displays:

You now have two options:

o To upgrade the product installation, put a check mark in the Upgrade installed

product only check box and select Next. The installation package will upgrade the

files on your system. After the installation package runs, proceed to "Testing your

12 / 38

Page 13: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

installation".

o To re-install files, do not place a check mark in the Update installed product only

check box. Simply click Next. Then, continue with the installation.

If WebSphere Application Server is not already installed on your system, proceed to step 7.

7. In the Install Options dialog, select Custom Installation and the installation directory;

then click Next.

8. In the Choose Application Server Components dialog, select the following options:

o Select IBM HTTP Server V1.3.6 on the right-hand side. You can install the

WebSphere plug-ins (which connect the Web server to the servlet engine) into

multiple Web servers at once. However, this guide has you install the plug-ins into

IBM HTTP Server.

o Select Configure administrative domain with default.... This step is important,

because the standard installation doesn't install the sample servlets or configure a

EJB container or servlet engine.

13 / 38

Page 14: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

If you are installing from the downloaded file, you will now see:

If you are installing from the product CD, you will see:

o If you do not have either IBM HTTP Server or DB2 UDB currently installed, select

those products you need. (You only have this option if you are installing from the

14 / 38

Page 15: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

product CD.)

9. Click Next. If necessary, shut down all Web servers you plan to run with WebSphere

Application Server and proceed.

10. The system should find any level of IBM JDK that is installed. If you do note have the IBM

JDK installed, click Install JDK 1.1.7. "Installing IBM HTTP Server 1.3.6" has information on

installing IBM JDK.

15 / 38

Page 16: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

If you have other JDKs installed, make sure you select the IBM JDK, and click Next.

11. You are now prompted with the Security/Database Options page, which configures the

database access and user IDs. The database access is important to WebSphere Application

Server, because the product stores the configuration of the server in a set of specially

defined tables in the database.

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

16 / 38

Page 17: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

Password specified when installing DB2 UDB. Then click Next.

12. Click Next again to begin the installation.

13. Near the end of the installation, you are prompted for the location of the IBM HTTP Server

configuration file. The installation tool should successfully find the file for you, so you

should see:

17 / 38

Page 18: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

14. Click OK, and it will finish updating the files and installing.

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/.

18 / 38

Page 19: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

15. Click Finish, and choose to restart.

Finishing prerequisite configuration

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:

1. Go to the Control Center dialog. If it did not open automatically after rebooting, open it as

follows: from the Start menu, select Programs -> DB2 for Windows NT ->

Administrative Tools -> Control Center.

2. In the DB2 Control Center, expand the tree under Systems. Your DB2 databases are listed

under Databases. Examine the list to see if WAS is in it.

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.

Setting up administrative configuration

If the DB2 database WAS has not yet been created, do the following:

1. From the Start menu, select Programs -> DB2 for Windows NT -> Command Line

Processor.

2. Enter CREATE DATABASE WAS

19 / 38

Page 20: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

3. Wait a minute to allow time for DB2 to create the database.

4. Enter UPDATE DB CFG FOR WAS USING APPLHEAPSZ 256

5. Type quit to leave the CLP, and then exit to finish the command prompt.

6. Restart the machine.

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:

UPDATE DB CFG FOR WAS USING APPLHEAPSZ 512

Testing your installation

1. If you have not rebooted since installing WebSphere Application Server or any of its

prerequisites, do so now.

2. Check that WebSphere administrative server has been registered in the Services dialog.

Open the Control Panel and select Services. If you scroll down you should see IBM WS

AdminServer.

3. Start the service by selecting IBM WS AdminServer and then selecting Start.

Wait patiently. To see whether the system is still trying to start the server, examine the Performance page of the Task Manager.

20 / 38

Page 21: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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:

net start "IBM WS AdminServer"

net stop "IBM WS AdminServer"

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.

4. To start the server, run the administrative console, which is how you manage WebSphere

Application Server 3.0. From the Start menu, select Programs-> IBM WebSphere ->

Application Server 3.0 -> Administrator's Console. This starts a new command shell,

followed by a window showing the startup screen. You can minimize the Administrator's

Console command shell, which states No remote host or port argument... As to the window,

you should see something like this:

21 / 38

Page 22: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

5. Wait until the little icon in the bottom left corner stops rotating. Then start to administer the

server:

1. The basic administrative console is split into three tabs: Tasks, Types, and

Topology. Click on the Topology tab, and then click on the + sign next to

WebSphere Administrative Domain to expand the view.

2. Your host name should be listed. Expand the view of that node, and you should see

an entry called Default Server. Expand that and you will see the default container

and servletEngine.

22 / 38

Page 23: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

3. If the Current State is Stopped, click the green Start button on the tool bar. After

an information dialog displays, stating that the server us running, click OK. Note

that the current state changes from Stopped to Running.

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

23 / 38

Page 24: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

administrative server will automatically restart it. Even if the administrative server fails, it will continue to run.

6. Test the server. Ensure that the IBM HTTP Server is running (Start -> Programs -> IBM

HTTP Server -> Start HTTP Server). Then, open a browser and go to

localhost/servlet/snoop, which is a standard sample servlet installed by default. You should

see a result like this:

The next step is to configure an Enterprise Bean and test the bean.

Configuring an Enterprise 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

24 / 38

Page 25: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

Creating a database

If you have not done so already, create the database sample for use with Increment:

1. From the Start menu, select Programs -> DB2 for Windows NT -> First Steps.

2. In the DB2 First Steps dialog, select Create the SAMPLE database.

3. In the dialog that opens, confirm the creation operation.

Setting up a DataSource

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:

25 / 38

Page 26: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

1. Go to the Types tab, right-click on JDBCDrivers, and then select Create.

2. For Name, enter 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.)

3. Click Create and, after a dialog opens stating that the create command was successful,

click OK.

26 / 38

Page 27: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

4. Right-click on DataSources and select Create. In the Create a DataSource dialog, enter

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.

5. Click on the Advanced tab. You will see the connection pool parameters, which control the

performance of the pool.

27 / 38

Page 28: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

6. Accept the defaults by clicking on Create, and then OK. If you now click on the Topology

view you should see the sampledb and DB2AppDriver objects:

28 / 38

Page 29: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

If you don't, try refreshing the view. Select WebSphere Admin Domain and click on the Refresh selected subtree button.

7. Install the driver by right-clicking on the DB2AppDriver object and selecting Install.

8. Select the node on which to install--in this case there will be only one--and then click

Browse:

9. Browse for the JDBC driver JAR/ZIP file which contains the JDBC driver for this database. For

DB2 and the standard installation this is C:\SQLLIB\java\db2java.zip. Select the file, then

click Open, Install, and OK.

Deploying and installing the Enterprise Bean

1. In the administrative console and from the Topology view, make sure the node (your host),

and Default Server is expanded. Right-click on the Default Container entry, and select

Create -> EnterpriseBean.

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.

29 / 38

Page 30: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

You are prompted with a dialog:

2. Click on Browse and navigate to C:\WebSphere\AppServer\deployableEJBs\ (or the

directory where it is installed). You are browsing the server directories here, so even if you

were using the console on a remote machine, this would be the server directory you see.

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:

3. Double-click on the .ser file to select it. When prompted, select Yes:

30 / 38

Page 31: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

4. When the system finishes deploying the Enterprise Bean, a dialog opens stating that the

deployment was sucessful. Click OK and you will be presented with the Bean dialog again,

but now with the fields filled in.

The Database Access field (greyed out) is set to Shared, which is equivalent to Option C locking/caching, and supports clustering. You can

31 / 38

Page 32: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

5. After you finish viewing the deployment descriptor, click OK to return to the first dialog,

and select the DataSource tab. Click Change and, in the Datasource dialog, select the

sampledb DataSource:

32 / 38

Page 33: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

6. Click Ok.

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.

7. Click on the Advanced tab. The following is displayed:

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

33 / 38

Page 34: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

8. Click Create. The following dialog is displayed:

9. Click OK to clear the dialog.

10. You can deploy a new Enterprise Bean into an already running container. To start the bean,

select the Increment object, which is under Default Server and Default Container in

the Topology view, and select the green Start button on the tool bar. Then, click OK to

clear the dialog that Increment is running.

Testing the deployment

To test the deployment, go to the samples page:

1. From the Start menu, select Programs -> IBM WebSphere -> Application Server 3.0

-> Samples.

2. Click on Enterprise Beans in the left frame, and then choose Increment from the right

frame.

3. Select Run this sample, and you should see:

34 / 38

Page 35: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

4. Click Visit, and the number of visits information should be displayed:

Click on Visit Again repeatedly, and the number will increase by one each time.

You have now installed and configured an EJB application.

35 / 38

Page 36: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

Examining the database

To see what is going on in the database, start up the DB2 Command Line Processor:

1. From the Start menu, select DB2 for Windows NT -> Command Line Processor.

2. Enter

3. connect to sample

4. select * from ejb.incrementbeantbl

Data similar to the following is displayed:

db2 => connect to sample

Database Connection Information

Database server = DB2/NT 5.2.0

SQL authorization ID = MYID

Local database alias = SAMPLE

db2 => select * from ejb.incrementbeantbl

COUNT PRIMARYKEY

------- ---------------------

5 count

1 record(s) selected.

db2 =>

Setting up TCP/IP 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.

36 / 38

Page 37: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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

37 / 38

Page 38: Websphere Application server V3.02 Adv Install.doc.doc.doc

WebSphere Application Server 버전 3.0 릴리즈 노트

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.

38 / 38