Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Presentation Layer

The presentation layer consists of several Java Servlets and JSPs that loosely adhere to a Model-View-Controller (MVC) design pattern. TradeAppServlet is the primary controller servlet responsible for recieving incoming client requests, triggering the desired business logic, and forwarding responses to the appropriate JSP page. Additional servlets and JSPs are used to configure the DayTrader runtime options and manage the supporting database.

Business Logic and Persistence Layer

The business logic and persistence layer form the bulk of the DayTrader application. The TradeServices interface defines the core set of business operations available in the application, such as register, login, getHoldings, buy, completeOrder, logout, etc. DayTrader provides three different implementations of these services, corresponding to three commonly used JavaEE application design patterns. These implementations are discussed below. Users can switch between these implemenations on the configuration page by changed the Runtime Mode.

...

Operation

Details

Asynchrounous Order Processing

When a buy or sell operation is performed, an order request is placed on the TradeBroker JMS queue using a client connection. The TradeBrokerMDB consumes messages on this queue and completes the buy or sell operation.

Quote Price Updates

As stocks are traded, the associated quote prices are updated in the database and published to a JMS topic. The TradeStreamerMDB subscribes to these updates consuming the price updates messages, but does nothing more with them. The TradeStreamer JavaEE client that is bundled with DayTrader can be started to view the quote prices updates in real time.

Business Objects and Relationships

The following diagram represents the database schema and associated business objects. Container managed relationships (CMRs) are also depicted in the diagram.

Create diagram and add here

Business Operations (as defined in TradeServices)

As previously mentioned, all of the primary buisness operations provided by DayTrader are defined in the TradeServices interface. These operations are discussed further in the following table.

TradeServices Operation

Details

login

 

logout

 

buy

 

sell

 

getMarketSummary

 

queueOrder

 

completeOrder

 

cancelOrder

 

orderCompleted

 

getOrders

 

getClosedOrders

 

createQuote

 

getQuote

 

getAllQuotes

 

updateQuotePriceVolume

 

getHoldings

 

getHolding

 

getAccountData

 

getAccountProfileData

 

updateAccountProfile

 

register

 

resetTrade

 

User Inerface (UI) Operations

The DayTrader JSP/Servlet-based web client provides a basic set of operations that one would expect to find in any stock trading and portfolio management application. These high level user operations trigger specific buisness operations (defined above) within the buisness logic and persistence layers to perform the desired task. The following table summarizes the buisness tasks performed by each user operation/action.

...