###How to build
- Import the mongo-tx directory (the top directory of this repository) with Eclipse as a Maven project (Right click in "Package Explorer"->Import->"Existing Maven Projects"->select the mongo-tx directory as the root->select pom.xml in the directory).
- Download Daytrader3Sample.jar from IBM site and store it into /samples/daytrader/.
- open /samples/daytrader/build.xml and run "extract" task, then refresh the mongo-tx project (with F5 ususally). You can find some files and directories are extracted under /samples/daytrader/.
- Add /samples/daytrader/Daytrader3Sample/dt-ejb.jar into the build path and add /samples/daytrader/src/java as an eclipse source directory for the mongo-tx project (and build code in the directory).
- Confirm no error exists in mongo-tx project.
- Run
ant ear
with /samples/daytrader/build.xml. ant will generate /samples/daytrader/dist/daytrader3-ee6.ear.
###How to deploy
- Download WebSphere Liberty runtime from IBM site and install it in your machine (
$LIBERTY_HOME
). cd $LIBERTY_HOME
andunzip Daytrader3Sample.jar
.- Copy /samples/daytrader/server.xml to
$LIBERTY_HOME/usr/servers/Daytrader3Sample/
- Copy mongo-java-driver-3.0.4.jar commons-logging-1.2.jar (you will be find ) in
$LIBERTY_HOME/Daytrader3Sample/lib
. rm $LIBERTY_HOME/usr/servers/Daytrader3Sample/dropins/*
.mkdir $LIBERTY_HOME/usr/servers/Daytrader3Sample/apps/
- Copy dist/daytrader3-ee6.ear to
$LIBERTY_HOME/usr/servers/Daytrader3Sample/apps/
. - Start your MongoDB with 27017 TCP/IP port.
- Start Liberty (
bin/server start Daytrader3Sample
). - Enjoy trading via http://localhost:9080/daytrader/ or http://localhost:9080/daytrader/scenario .