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.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.
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
Clone the repository
Clone the DayTrader 7 repository from GitHub and change into the project directory:
Build with Maven
Run The build resolves all dependencies — including the embedded Apache Derby JDBC driver — from Maven Central. No manual Liberty installation is required.
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:Start the server
Change into the EAR module and start the embedded Liberty server using the Watch the console output for the message
liberty:run goal. The server starts in the foreground and listens on port 9082:The daytrader-ee7 server is ready to run a smarter planet. before proceeding.The application is available at http://localhost:9082/daytrader.Initialize the database
Open a browser and navigate to the database management page:Perform these two steps in order:
- Click (Re)-create DayTrader Database Tables and Indexes — this creates the schema in the embedded Derby database.
- 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.
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:Application URLs
Once the server is running and the database is initialised, the following URLs are available:| URL | Description |
|---|---|
/daytrader | Main trading interface — home page, portfolio, quotes, buy/sell |
/daytrader/scenario | Benchmark workload scenario driver — simulates user actions for load testing |
/daytrader/config | Runtime configuration page — switch runtime mode, order processing mode, and other parameters |
/daytrader/configure.html | Database management page — create schema, populate data, and reset benchmark statistics |