Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WASdev/sample.daytrader7/llms.txt

Use this file to discover all available pages before exploring further.

DayTrader 7 runs on Open Liberty with an embedded Apache Derby database for zero-configuration local development. The Maven build downloads Open Liberty automatically, packages the application as an EAR, and deploys it to an embedded Liberty server — so you need nothing beyond a JDK, Maven, and Git to get a fully functional trading application running on your workstation.
Prerequisites
  • JDK 8 or later — required by the Maven compiler plugin (maven.compiler.source=1.8)
  • Maven 3.x — used for building the multi-module project and driving the Liberty server
  • Git — to clone the repository

Getting Up and Running

1

Clone the repository

Clone the DayTrader 7 repository from GitHub and change into the project directory:
git clone https://github.com/WASdev/sample.daytrader7.git
cd sample.daytrader7
2

Build with Maven

Run mvn install from the root of the repository. This command builds all three modules (daytrader-ee7-ejb, daytrader-ee7-web, and daytrader-ee7) in order, producing the final EAR artifact and downloading the Open Liberty runtime into the daytrader-ee7/target/liberty/ directory:
mvn install
The build resolves all dependencies — including the embedded Apache Derby JDBC driver — from Maven Central. No manual Liberty installation is required.
3

Start the server

Change into the EAR module and start the embedded Liberty server using the liberty:run goal. The server starts in the foreground and listens on port 9082:
cd daytrader-ee7
mvn liberty:run
Watch the console output for the message The daytrader-ee7 server is ready to run a smarter planet. before proceeding.The application is available at http://localhost:9082/daytrader.
4

Initialize the database

Open a browser and navigate to the database management page:
http://localhost:9082/daytrader/configure.html
Perform these two steps in order:
  1. Click (Re)-create DayTrader Database Tables and Indexes — this creates the schema in the embedded Derby database.
  2. Click (Re)-populate DayTrader Database — this seeds the database with the default set of users, stock quotes, accounts, and holdings required for the benchmark workload.
5

Restart the server

A server restart is required after the initial database population so that the application picks up the newly seeded data correctly.Return to the terminal where mvn liberty:run is running and stop the server with Ctrl+C, then start it again:
mvn liberty:run
6

Access the application

Open your browser and navigate to the main trading interface:
http://localhost:9082/daytrader
Log in with the default pre-seeded credentials:
  • User ID: uid:0
  • Password: xxx
You should see the DayTrader home page with the market summary, your portfolio, and navigation to quotes, orders, and account settings.

Application URLs

Once the server is running and the database is initialised, the following URLs are available:
URLDescription
/daytraderMain trading interface — home page, portfolio, quotes, buy/sell
/daytrader/scenarioBenchmark workload scenario driver — simulates user actions for load testing
/daytrader/configRuntime configuration page — switch runtime mode, order processing mode, and other parameters
/daytrader/configure.htmlDatabase management page — create schema, populate data, and reset benchmark statistics
Ready to run a performance benchmark? Head to the Benchmarking section to learn how to configure Apache JMeter with the DayTrader scenario driver, interpret run statistics from /daytrader/config, and tune Liberty server settings for maximum throughput.

Build docs developers (and LLMs) love