Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

DayTrader is benchmark application built around the paradigm of an online stock trading system. Originally developed by IBM as the Trade Performance Benchmark Sample, DayTrader was donated to the Apache Geronimo community in 2005. This application allows users to login, view their portfolio, lookup stock quotes, and buy or sell stock shares. With the aid of a Web-based load driver such as Mercury LoadRunner, Rational Performance Tester, or Apache JMeter, the real-world workload provided by DayTrader can be used to measure and compare the performance of Java Platform, Enterprise Edition (Java EE) application servers offered by a variety of vendors.

...

This document is organized in the following sections:

...

...

Application Architecture

DayTrader is built on a core set of Java EE technologies that includes Java Servlets and JavaServer Pages (JSPs) for the presentation layer and Java database connectivity (JDBC), Java Message Service (JMS), Enterprise JavaBeans (EJBs) and Message-Driven Beans (MDBs) for the back-end business logic and persistence layer. The following diagram provides a high-level overview of the full workload application architecture.

...

Daytrader is available in the Apache's subversion repository, run the following command to checkout the source files into the daytrader-2.0 directory.

svn co http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/Image Removed <daytrader_home>

...

  • Start Geronimo by running the following command:
    <geronimo_home>/bin/geronimo start
  • The provided database creation script requires setting the GERONIMO_HOME environment variable. On the same window you start Geronimo run the following command:
    set GERONIMO_HOME=<geronimo_home>
  • Change directory to the directory containing the database creation scripts.
    cd <daytrader_home>/bin/dbscripts/derby
  • Open createDerbyDB script and verify/modify the Derby version to match the one being used by Geronimo ( e.g. <geronimo_home>/repository/org/apache/derby/derby/10.2.2.0 ). Once you verified the versions match run the script.
    createDerbyDB
    You sould see a scree similar to the one illustrated below.
    No FormatbgColor#000000borderStylesolid D:\daytrader-2.0\bin\dbscripts\derby>createDerbyDB.bat "Invoking IJ command line tool to create the database and tables...please wait" ij version 10.2.2.0 ij> ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'HOLDINGEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTPROFILEEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'QUOTEEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'KEYGENEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ORDEREJB' because it does not exist. ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> ij> Table creation complete
  • You can verify the database was created by pointing your browser to the Geronimo Administration Console and clicking on DB Manager.
  • The last step in this configuration is to update the deployment plan. Edit the daytrader-g-2.0-SNAPSHOT-plan.xml deployment plan located in the <daytrader_home>\plans directory and replace ge-activemq-rar/1.2-beta/rar with ge-activemq-rar/1.2/rar.

...

You should see a deployment confirmation screen similar to the one shown below. No FormatbgColor

#000000borderStylesolid D:\geronimo-tomcat6-javaee5-2.1\bin>deploy --user system --password manager deploy \daytrader-2.0\modules\ear\target\daytrader-ear-2.0-SNAPSHOT.ear \daytrader-2.0\plans\daytrader-g-2.0-SNAPSHOT-plan.xml Using GERONIMO_BASE: D:\geronimo-tomcat6-javaee5-2.1 Using GERONIMO_HOME: D:\geronimo-tomcat6-javaee5-2.1 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-javaee5-2.1\var\temp Using JRE_HOME: JRE_HOME: C:\Java\jdk1.5.0_06\jre Deployed geronimo/daytrader/2.0-SNAPSHOT/car `-> web.war @ http://localhost:8080/daytrader `-> dt-ejb.jar `-> geronimo/daytrader-wsapp-client/2.0-SNAPSHOT/car `-> geronimo/daytrader-streamer-client/2.0-SNAPSHOT/car `-> TradeDataSource `-> TradeJMS

Daytrader is now ready for testing.

...

  • Access the application pointing your browser to http://localhost:8080/daytraderImage Removed



  • Click on the Configuration tab.
  • Click on (Re)-populate DayTrader Database to generate the sample data, this will open a new window showing the progress.
    The initial population size consists of 200 accounts and 400 stock quotes. These values can be updated via the "Configure DayTrader run-time parameters" link on the "Configuration" tab.

...

So far we saw what primitives are available, which of those can be set to run multiple iterations and how to configure the application runtime parameters.

  • Point your browser to http://localhost:8080/daytraderImage Removed
  • Click on Configuration.
  • Click on Configure DayTrader run-time parameters.
  • Select EJB from Run-Time Mode.
  • Seclect JSP-Images from WebInterface.
  • Set Primitive Iteration to 100.
  • Click on Update Config.
  • Click on Primitives.
  • Click on PingServlet2EntityEJBLocal.

...

We just saw how to run singular functions/operations tests via the available primitives. The very same settings you configured for running those primitives also affect the GUI for trading simulation.

  • Point your browser to http://localhost:8080/daytraderImage Removed
  • Click on Trading & Portfolios.
  • Accept the default user and password and click on Login.
  • You should now be able to begin trading!

...

Additional details for configuring and running Daytrader can be found in the application FAQ available by pointing your web browser to http://localhost:8080/daytraderImage Removed

Back to square one

After you performed some tests and want to run a new set from scratch you will need to reset the runtime configuration and transaction data from the database.

  • Point your browser to http://localhost:8080/daytraderImage Removed
  • Click on Configuration.
  • Click on Reset DayTrader (to be done before each run).
  • Click on (Re)-populate DayTrader Database.

...

In order for the quote price updates to get published to the JMS topic, the "Publish Quote Updates" flag on the configuration page must be enabled.

  • Point your browser to http://localhost:8080/daytraderImage Removed
  • Click on Configuration.
  • Click on Configure DayTrader run-time parameters.
  • Make sure you select the Publish Quote Updates checkbox.

...