Running the ready-made sample application

This document describes how to run the ready-made Online Auction sample application that was built using IBM Rational Developer. The sample application features an auction Web site, where you can browse auction items, submit items for sale, and bid on items. The sample application will give you a quick feel for the kinds of J2EE applications that you can build with IBM Rational Developer.

This document contains the following sections:

Create a server and add a data source

In this section, you create a WebLogic server and configure it so that it can work with the auction application and the auction database.

To create a WebLogic server:

  1. In the J2EE perspective, right-click in the Servers view and select New > Server.
  2. The New Server wizard opens. This wizard will create a new server that will use your specified WebLogic server runtime.
  3. Click Next. If the selected WebLogic server type does not have a server runtime predefined in Preferences, a page will be presented for you to create the runtime. One should have been created in the Install IBM Rational Deployment Toolkit for WebLogic Server section of "Preparing for the Online Auction sample application". Note that this page will not be displayed if a server runtime was already created beforehand.
  4. Click Next. Fill in all the WebLogic Server settings. Ensure that the correct WebLogic Server administrator username and password is in the Username and Password fields.
  5. Click Finish. The new WebLogic server will appear in the Servers view.

To configure the server classpath:

  1. In the Servers view, double-click the WebLogic server to open the Server Editor.
  2. At the bottom of the editor, click the Classpath tab.
  3. In the editor, click Add External Jars and add the JAR containing the DB2 driver classes. For example:
    C:\Program Files\IBM\SQLLIB\java\db2java.zip
    C:\Program Files\IBM\SQLLIB\java\db2jcc.zip (for DB2 8.1)
  4. Similarly, add the JARs containing IBM Rational Developer classes required to run the the auction application on the WebLogic server (where install_path is the directory where you have installed IBM Rational Developer).
    install_path\eclipse\plugins\com.ibm.etools.dbjars_6.0.0\jars\dbbeans.jar
    install_path\runtimes\base_v6_stub\lib\ivjejb35.jar
  5. Click File > Save to save your changes.

Note: The exact paths for the JARs may vary according to where you have installed DB2 and IBM Rational Developer.

Set up the database connection pool and data source for the auction database (Note: The steps below are specific to WebLogic Server 7.0, but the general steps and information can be applied to versions 6.1 and 8.1.):

  1. In the Servers view, right-click on the WebLogic server and select Start. This will start the WebLogic server; it may take a few moments for the server to start.
  2. After the WebLogic server has started, view the Overview page of the server editor (used in the previous steps).
  3. Click the Launch WebLogic Server console button in the editor.
  4. Login using the WebLogic Server administrator username and password. The WebLogic Server home page will now be displayed in a browser window.
  5. Under the Services Configurations section, click Connection Pools to configure a new connection pool using the following information:
    Name: DreamAucConnectionPool
    URL: jdbc:db2:DREAMAUC
    Driver Classname: COM.ibm.db2.jdbc.app.DB2Driver
    Properties: user=xxx;password=yyy where xxx is the user name to connect to the database with (e.g. db2admin) and yyy is the password to connect with
  6. Click Create and then select the Targets tab to enable the connection pool for the target server.
  7. Navigate back to the homepage by clicking the Home icon in the top-right corner of the page.
  8. Under the Services Configurations section, click Tx Data Sources or (Data Sources in WLS 8.1) to configure a new JDBC TX Data Source using the following information:
    Name: DreamAucDataSource
    JNDI Name: jdbc/dreamauc
    Pool Name: DreamAucConnectionPool
  9. Click Create and then select the Targets tab to enable the connection pool for the target server.
  10. Close the WebLogic Server console.

Start the Application

To start the sample application:

  1. In the Project Explorer view, right-click the AuctionWeb project and select Run > Run on Server. The Server selection wizard opens. (If a message is displayed that indicates that the port is already in use, open the Server Editor again and view the Overview page. In the Ports section of the page, change the port number to a number that is not being used and click File > Save to save the changes.)
  2. Click the Choose an existing server radio button. Select the WebLogic server and click Next.
  3. Add the Auction enterprise application project to the server by moving it to the right pane.
  4. Click Finish.
  5. The Online Auction home page opens in the browser (although this may take a moment or two).
  6. Explore the Online Auction Web site. Note that only some of the options and features in the sample application are actually operational. For example, some of the categories in the Category List are simply cosmetic enhancements to the Web pages and perform no actual function.

Congratulations! You have successfully run the ready-made Online Auction sample application.

Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2004. All Rights Reserved.