DayTrader 7 is organised as a Maven multi-module project with a root parent POM that coordinates three sub-modules built in dependency order. The root POM (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.
sample.daytrader7/pom.xml) declares the module list and shared build metadata; each sub-module owns its own pom.xml with module-specific dependencies, plugins, and packaging configuration.
Project Module Structure
The repository is laid out as follows:daytrader-ee7-ejb— Contains all business logic and data-access code: theTradeServicesinterface, the Full EJB3 implementation (TradeSLSBBean), the Direct JDBC/JMS implementation (TradeDirect), all JPA entities (AccountDataBean,HoldingDataBean,OrderDataBean,QuoteDataBean), and the JMS Message-Driven Beans that process asynchronous orders.daytrader-ee7-web— Contains the web tier: JSF-backed pages, JSP views, Servlet controllers (including the scenario driver at/daytrader/scenario), CDI managed beans, WebSocket server endpoints for real-time quote price push, and Bean Validation constraints on form inputs.daytrader-ee7— The EAR assembler. Packages the EJB JAR and WAR intodaytrader-ee7.ear, maps the WAR context root to/daytrader, and contains the Liberty server configuration for both Derby (development) and DB2 (production) deployments.
Build Commands
Run the following from the root of the cloned repository:libertyRoot system property:
Build Output
After a successfulmvn install, the key output artifacts are:
| Path | Description |
|---|---|
daytrader-ee7/target/daytrader-ee7.ear | The assembled EAR artifact, ready for deployment to any compatible Liberty server |
daytrader-ee7/target/liberty/wlp/ | The Open Liberty runtime downloaded and configured by the Maven Liberty plugin |
daytrader-ee7/target/liberty/wlp/usr/shared/resources/DerbyLibs/ | Derby JDBC driver copied here for use by the embedded Liberty server |
liberty:run Maven goal starts the server directly from daytrader-ee7/target/liberty/, so no separate Liberty installation step is required for local development:
Building for Production with DB2
For performance benchmarking, IBM DB2 is the recommended database. After runningmvn install to produce the EAR, deploy to a pre-configured Liberty server using the server_db2.xml configuration included in the module:
- Install Open Liberty 8.5.5.6 or later on the target system.
-
Configure a DB2 JDBC data source in your Liberty
server.xml, referencing the DB2 driver JARs. -
Copy the EAR to the Liberty
apps/directory: -
Use
server_db2.xmlas yourserver.xml(or merge its data source and JMS configuration into your existing server configuration): -
Start the server and follow the same database initialisation steps — navigate to
/daytrader/configure.htmlto create and populate the schema.
The embedded Apache Derby database included in the development configuration is convenient for local development and functional testing but is not suitable for performance benchmarking. Derby introduces its own concurrency limitations that will artificially cap throughput. For any meaningful benchmark comparison, use IBM DB2 (or another enterprise-grade database) with the
server_db2.xml Liberty configuration.