To build the Online Auction sample application, you need to
ensure that all system prerequisites are met and that the
development and run-time environments are correctly installed and
configured.
The hardware and operating system prerequisites for building and running the
Online Auction sample application are the same as those that are specified for
the IBM Rational Developer product. This scenario was developed for the IBM Rational Deployment Toolkit for WebLogic Server.
In addition to IBM Rational Developer and its prerequisites, you
need the following software in order to build and run the Online
Auction sample application :
- DB2 Universal Database(TM) (UDB) for
Windows(R) Version 7.2 or 8.1. DB2(R) is included with most
configurations of the IBM Rational Developer product family. If DB2 was
not included in your IBM Rational Developer package, you can download
it from http://www.ibm.com/software/data/db2.
- BEA WebLogic Server 6.1 SP7, 7.0 SP5, 8.1 SP3 for Windows.
The optional software is as follows:
In preparation for building and running the Online Auction
sample application, you need to perform the following activities,
which are described in the sections that follow.
In this section, you get some tips on how to install the CVS
server and set up the repository for team development. The
installation of CVS is optional for the sample application, but
there are sections in the sample application instructions that
explain how to use it with IBM Rational Developer for team programming.
You can download a free copy of CVS from http://www.cvshome.org/.
To install and configure the CVS server:
- Install the CVS product using the product zip file. If you
are planning to use it for production purposes, it is recommended
that you install the product on a Linux server.
- Add the repository (or repositories) by creating a directory
and running the cvs init command.
- Authorize the users. It is recommended that you use an SSH
connection method and create a user ID on the server for each
developer.
- Configure the server to run the SSH daemon by default.
More detailed information about installing, configuring, and
using the CVS server can be found in the CVS
manual.
Install IBM Rational Developer (and the IBM Rational Deployment Toolkit
for WebLogic Server) using the installation instructions that accompany the product.
In this section, you perform the following activities:
- Install DB2 (if not already installed).
- Change your DB2 installation to use the JDBC 2.0 driver.
- Run the mandatory DB2 script, which creates an auction
database named dreamauc as an alias of the SAMPLE database. The
script also creates two tables in the dreamauc database that are
named ejb.OnlineItem and ejb.NameValue.
IBM Rational Developer includes a copy of DB2 UDB Personal Edition.
You can also download a free copy of DB2 UDB Personal Edition
from http://www.ibm.com/software/data/db2.
To enable the JDBC 2.0 driver and create the database:
- If DB2 is not already installed, install it by running
the DB2 installation program.
- Change your DB2 installation to use JDBC 2.0 by completing
the following steps:
- Open a DB2 command window (Start > Programs > IBM
DB2 > Command Line Tools > Command Window), then navigate to
DB2_installdir\SQLLIB\java12 (where DB2_installdir
is the installation path of DB2).
- Stop all DB2 services and make a note of the services you
stopped, then run the following command to change your database
installation to use JDBC 2.0: usejdbc2.bat
- Restart the services that you stopped, then in a DB2 command
window, issue the following command to ensure the essential DB2
processes are running: db2start.
- Create the DB2 UDB SAMPLE database (if not already created)
by completing the following steps:
- Select Start > Programs > IBM DB2 > Set-up Tools > First
Steps.
- Click Create Sample Databases.
- Select the DB2 UDB Sample check box and click
OK. (Note that if you created the sample database
previously, the check box will be cleared.)
- When a message box indicates that the database has been
created, click OK and close the First Steps wizard.
- If you would rather create a new database than use the DB2
UDB Sample database, then edit the crtOnlineItems.sql script.
- In the DB2 Command Window, navigate to the following directory (where install_path is the directory where you have installed IBM Rational Developer):
install_path\eclipse\plugins\com.ibm.etools.weblogic.scenario.auction.doc
- In the crtOnlineItems.sql script, all tables are created with the schema ejb. Change
this to your DB2 username by replacing all occurrences of ejb with your
username.
- In the DB2 Command Window, run the script by issuing the
following command: db2 -tf crtOnlineItems.sql This creates
the required tables and populates them with some test data.
- Close the DB2 Command Window.
Install WebLogic Server using the instructions that accompany the product.
You will need to set up a WebLogic domain -- refer to the BEA WebLogic documentation for details.
To install IBM Rational Deployment Toolkit for WebLogic Server:
- Start IBM Rational Developer and open the Install/Update wizard (Help > Software Updates > Find and Install).
- Select Search for new features to install and click Next.
- You will be using either a remote IBM Rational update site or an archived site from a zip file to install the IBM Rational Deployment Toolkit for WebLogic Server feature.
- If using a remote site, click New Remote Site and enter the URL and name of the site.
- If using an archive site, click New Archived Site and select the zip file containing the IBM Rational Deployment Toolkit for WebLogic Server.
- In the list of sites to search, check the newly added site and click Next.
- In the list of features to install, check IBM Rational Deployment Toolkit for WebLogic Server and click Next.
- Review and then accept the license that is shown. It must be accepted to complete the install. Click Next to continue to the next page.
- Click Finish to start the install process.
- The Feature Verification page will identify that the JAR files in the update site have not been signed; this is expected. Click Install to complete the install process.
- Allow IBM Rational Developer to restart when prompted.
Once IBM Rational Deployment Toolkit for WebLogic Server has been installed, it is necessary to configure a server
preference in IBM Rational Developer to give the toolkit access to server resources.
- From the menu, go to Window > Preferences.
- Select Server in the left pane. The Server page opens.
- Check Create server resources in workspace and click OK.
To create a WebLogic server runtime, do the following:
- From the Window menu, select Preferences.
- In the Preferences dialog, expand Server and then select Installed Runtimes.
- Click the Add button to create a WebLogic runtime.
- Select the type of BEA WebLogic server runtime to create and click Next.
- Specify the correct paths for your installation of WebLogic.
- Click Finish to save your changes.
Tip: Set the highest J2EE version used for development to 1.3 since WebLogic Server only supports up to J2EE 1.3.
- From the menu, go to Window > Preferences.
- Select J2EE in the left pane. The J2EE page opens.
- Set Highest J2EE version used for development to 1.3 and click OK.
Tip: EJB projects that use a WebLogic server should have automatic validation
disabled to improve performance. To disable automatic validation in WebSpehere
Studio by default:
- From the Window menu, select Preferences.
- In the Preferences window, click on Validation.
- Clear the Allow projects to override these preference settings checkbox and then clear the
Run validation automatically when you save changes to a resource checkbox.
- Click OK to save your changes.