Daytrader3 Sample

This sample contains the DayTrader 3 benchmark, which is an application built around the paradigm of an online stock trading system. The 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 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. In addition to the full workload, the application also contains a set of primitives used for functional and performance testing of various Java EE components and common design patterns.

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 Persistence Architecture (JPA), 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. Daytrader 3 also adds some simple Java Server Faces (JSF) and Java API for RESTful Web Services (JAX-RS) functionality.

This sample contains a server definition that includes ejbLite-3.1, jmsMdb-3.1, wasJmsServer-1.0, wasJmsClient-1.1, jpa-2.0, jaxrs-1.1, jsf-2.0 and other necessary features. It also contains a demo application daytrader3-ee6.ear, which demonstrates multiple features supported by the Liberty profile.

This sample can be installed onto runtime versions and later.

Installation Instructions

Online installation (requires or later):

  1. Install the sample by running the command below from the bin directory of your server installation:
    installUtility install Daytrader3Sample

Any missing features required by the server will be installed for you.

Offline installation:

  1. Download the Daytrader3Sample.jar using the download button at the top of the page and place it in the root of your server installation.
  2. Extract the sample into the Liberty installation by running the command below from the root of your server installation:
    java -jar Daytrader3Sample.jar

Any missing features required by the server will need to be installed separately.

Running The Application

To run the Daytrader3Sample application:

  1. Start the Daytrader3Sample server by running the command below from the bin directory in the Liberty profile installation:
    server run DayTrader3Sample
  2. Confirm the application started by looking for the following message in the log:
    CWWKZ0001I: Application daytrader3 started in XX.XX seconds.
  3. In your browser, enter the URL for the application: http://localhost:9080/daytrader/ (where port 9080 assumes the httpEndpoint provided in the sample server.xml has not been modified).


This sample requires a Liberty Profile installation that includes the jmsMdb-3.1, wasJmsServer-1.0, and wasJmsClient-1.1 features. These features are available as part of the Liberty Profile extended content.

The daytrader3-ee6.ear file contains the source and binaries for the application, and can be used to import it to Eclipse.

Sample Structure

  • wlp
    • usr
      • servers
        • Daytrader3Sample
          • Copyright.txt
          • dropins
            • daytrader3-ee6.ear
          • lafiles
            • LA_en
            • LI_en
          • readme.html
          • server.xml
      • shared
        • resources
          • Daytrader3SampleDerbyLibs
            • derby-