...
Client (UI) Operation | Flow of Buisness Operations |
---|---|
Register |
|
Login |
|
View Account |
|
View Account Profile |
|
Update Account Profile |
|
View Portfolio |
|
Sell Holding |
|
View Quotes |
|
Buy Stock |
|
Logout |
|
Getting the source
...
Daytrader is available in the Apache's subversion repository, run the following command to checkout the source files into the daytrader-1.2 directory.
...
This process may take several minutes depending on the machine and network connectivity speed.
Building Daytrader
Once all the sources get checked out the next step is to build Daytrader. From the <daytrader_home> directory run the following command.
...
- Start Geronimo by running the following command:
<geronimo_home>/bin/geronimo start
- The provided database creation script requires setting the GERONIMO_HOME environment variable. On the same window you start Geronimo run the following command:
set GERONIMO_HOME=<geronimo_home>
- Change directory to the directory containing the database creation scripts.
cd <daytrader_home>/bin/dbscripts/derby
- Open
createDerbyDB
script and verify/modify the Derby version to match the one being used by Geronimo ( e.g. <geronimo_home>/repository/org/apache/derby/derby/10.1.3.1 ). Once you verified the versions match run the script.
createDerbyDB
You sould see a scree similar to the one illustrated below.
No Format bgColor #000000 borderStyle solid D:\daytrader-1.2\bin\dbscripts\derby>createDerbyDB.bat "Invoking IJ command line tool to create the database and tables...please wait" ij version 10.1 ij> ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'HOLDINGEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTPROFILEEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'QUOTEEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'KEYGENEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTEJB' because it does not exist. ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ORDEREJB' because it does not exist. ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> 0 rows inserted/updated/deleted ij> ij> Table creation complete
- You can verify the database was created by pointing your browser to the Geronimo Administration Console and clicking on DB Manager.
- The last step in this configuration is to update the deployment plan. Edit the
daytrader-1.2-beta-plan.xml
deployment plan located in the <daytrader_home>\plans\ directory and replace "ge-activemq-rar/1.2-beta/rar
" with "ge-activemq-rar/1.2/rar
".
- cd \geronimo-tomcat-j2ee-1.2\bin
- deploy --user system --password manager deploy \<daytrader_home>\modules\ear\target\daytrader-ear-1.2-SNAPSHOT.ear \<daytrader_home>\plans\daytrader-1.2-beta-plan.xml
Using GERONIMO_BASE: D:\geronimo-tomcat-j2ee-1.2
Using GERONIMO_HOME: D:\geronimo-tomcat-j2ee-1.2
Using GERONIMO_TMPDIR: D:\geronimo-tomcat-j2ee-1.2\var\temp
Using JRE_HOME: C:\Java\jdk1.5.0_06\jre
Deployed geronimo/daytrader/1.2-SNAPSHOT/car
`-> web.war @ http://localhost:8080/daytrader
`-> dt-ejb.jar
`-> geronimo/daytrader-wsapp-client/1.2-SNAPSHOT/car
`-> geronimo/daytrader-streamer-client/1.2-SNAPSHOT/car
`-> TradeDataSource
`-> TradeJMS
...