You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2005/10/26 19:37:41 UTC

svn commit: r328691 - in /geronimo/trunk/sandbox/daytrader: README dayTrader-plan.xml derby/createDB.sh modules/web/src/webapp/WEB-INF/web.xml

Author: hogstrom
Date: Wed Oct 26 10:37:34 2005
New Revision: 328691

URL: http://svn.apache.org/viewcvs?rev=328691&view=rev
Log:
Added comments for alternate database syntax factories in the deployment plan

Modified:
    geronimo/trunk/sandbox/daytrader/README
    geronimo/trunk/sandbox/daytrader/dayTrader-plan.xml
    geronimo/trunk/sandbox/daytrader/derby/createDB.sh
    geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/WEB-INF/web.xml

Modified: geronimo/trunk/sandbox/daytrader/README
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/README?rev=328691&r1=328690&r2=328691&view=diff
==============================================================================
--- geronimo/trunk/sandbox/daytrader/README (original)
+++ geronimo/trunk/sandbox/daytrader/README Wed Oct 26 10:37:34 2005
@@ -1,16 +1,32 @@
 The code in this directory contains the code for the benchmark sample called Day Trader.  This sample was contributed by IBM to the Apache Geronimo project under the ASF license to further functional and performance testing of Geronimo.  
 
-STATUS
-The work in this directory is a work in progress and the maven scripts do not currently build a functional ear.  To allow users to evaluate and work with the benchmark sample the files necessary to get the benchmark working are included.  They are:
+BUILD
 
-dayTrader.ear
-dayTrader-plan.xml
+To build the dayTrader EAR, install maven and then type 'maven' from the dayTrader root directory (the directory containing this README).
+
+This should build the daytrader-ear-1.0-SNAPSHOT.ear in the modules/ear/target directory.
 
 INSTALL
-In addition to these files the ./bin directory contains some shell scripts to facilitate the installation of the application.  These files might need to be modified to conform to the working layout of your filesystem.  
 
-One last item, the derby directory contains scripts, DDL and command files to create the database for the application.  To create and populate the database follow these instructions.  The scripts may need to be modified for your local file system.
+Before installing the EAR, you will need to create the tradedb database.  First, make sure Geronimo is started.  Then cd into the derby directory. Make sure the GERONIMO_HOME environment variable is defined.  Run either createDB.bat (Windows) or createDB.sh (Unix). This will create the tradedb database and its tables.
+
+To install the EAR, run the following from the dayTrader root directory:
+${GERONIMO_HOME}\deploy.[bat|sh] deploy modules\ear\target\daytrader-ear-1.0-SNAPSHOT.ear dayTrader-plan.xml
+
+When the application starts, you may see exceptions such as "Error: TradeDirect:init -- error on JNDI lookups of DataSource -- TradeDirect will not work". You should be able to ignore these messages.
+
+RUN
+
+Access the dayTrader application at http://<hostname>:<port>/daytrader.  To begin trading, go to 'Configuration -> (Re)-populate Trade Database'. This creates the fictional users, stocks, prices, etc. in the database and may take a while.  After this you can go to 'Go Trade!' to begin trading.
+
+There are two application clients you can run, the streamer client and web services client.  To run these (from the geronimo bin directory):
+
+TradeStreamerAppClient:
+java -jar client.jar tradeStreamerAppclient
+
+wsappclient:
+java -jar client.jar Trade/daytrader-wsappclient-1.0-SNAPSHOT
 
-./createDB.sh will connect to a running instance of Geronimo and create the tradedb database as well as create the tables for the sample.
+ACKNOWLEDGEMENTS
 
 Many thanks to Gianny Damour and David Jencks for helping to get the sample to its working state at this point.

Modified: geronimo/trunk/sandbox/daytrader/dayTrader-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/dayTrader-plan.xml?rev=328691&r1=328690&r2=328691&view=diff
==============================================================================
--- geronimo/trunk/sandbox/daytrader/dayTrader-plan.xml (original)
+++ geronimo/trunk/sandbox/daytrader/dayTrader-plan.xml Wed Oct 26 10:37:34 2005
@@ -46,8 +46,16 @@
             <cmp-connection-factory>
                 <resource-link>jdbc/TradeDataSource</resource-link>
             </cmp-connection-factory>
-<!--            <ejb-ql-compiler-factory>com.tranql.sql.ejbcompiler.DB2EJBQLCompilerFactory</ejb-ql-compiler-factory>  -->
-<!--            <db-syntax-factory>com.tranql.sql.db2.DB2DBSyntaxFactory</db-syntax-factory>  -->
+
+<!--  For DB2 database users uncomment the following line.
+            <ejb-ql-compiler-factory>org.tranql.ejbcompiler.DB2EJBQLCompilerFactory</ejb-ql-compiler-factory>
+            <db-syntax-factory>org.tranql.sql.db2.DB2DBSyntaxFactory</db-syntax-factory>
+-->
+
+<!--  For Oracle database users uncomment the following line.
+            <ejb-ql-compiler-factory>org.tranql.ejbcompiler.OracleQLCompilerFactory</ejb-ql-compiler-factory>
+            <db-syntax-factory>org.tranql.sql.oracle.OracleDBSyntaxFactory</db-syntax-factory>
+-->
 
             <enterprise-beans>
                 <session>

Modified: geronimo/trunk/sandbox/daytrader/derby/createDB.sh
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/derby/createDB.sh?rev=328691&r1=328690&r2=328691&view=diff
==============================================================================
--- geronimo/trunk/sandbox/daytrader/derby/createDB.sh (original)
+++ geronimo/trunk/sandbox/daytrader/derby/createDB.sh Wed Oct 26 10:37:34 2005
@@ -1,11 +1,15 @@
 #!/bin/bash
-export G_PATH=~/geronimo/geronimo/modules/assembly/target/geronimo-1.0-SNAPSHOT/repository/org.apache.derby/jars
+if [ "${GERONIMO_HOME}" = "" ]
+then
+  echo Please define the GERONIMO_HOME environment variable.
+  exit
+fi
+export G_PATH=${GERONIMO_HOME}/repository/org.apache.derby/jars
 export CLASSPATH=${G_PATH}/derby-10.1.1.0.jar
 export CLASSPATH=${CLASSPATH}:${G_PATH}/derbynet-10.1.1.0.jar
 export CLASSPATH=${CLASSPATH}:${G_PATH}/derbytools-10.1.1.0.jar
 export CLASSPATH=${CLASSPATH}:${G_PATH}/derbyclient-10.1.1.0.jar
-export CLASSPATH=${CLASSPATH}:/home/db2inst1/sqllib/java/db2jcc.jar
-export
 
-java -Dij.protocol=jdbc:derby:net://localhost:1527/ org.apache.derby.tools.ij < derby.txt
-#java -Dij.driver=com.ibm.db2.jcc.DB2Driver -Dij.protocol=jdbc:derby:net://localhost:1527/ org.apache.derby.tools.ij 
+echo "Invoking IJ command line tool to create the database and tables...please wait"
+java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij < derby.txt
+echo "Table creation complete"

Modified: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/WEB-INF/web.xml?rev=328691&r1=328690&r2=328691&view=diff
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/WEB-INF/web.xml (original)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/WEB-INF/web.xml Wed Oct 26 10:37:34 2005
@@ -378,18 +378,6 @@
          <res-auth>Application</res-auth>
          <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
-      <message-destination-ref id="MessageDestinationRef_1">
-         <message-destination-ref-name>jms/TradeBrokerQueue</message-destination-ref-name>
-         <message-destination-type>javax.jms.Queue</message-destination-type>
-         <message-destination-usage>Produces</message-destination-usage>
-         <message-destination-link>daytrader-ejb-1.0-SNAPSHOT.jar#TradeBrokerQueue</message-destination-link>
-      </message-destination-ref>
-      <message-destination-ref id="MessageDestinationRef_2">
-         <message-destination-ref-name>jms/TradeStreamerTopic</message-destination-ref-name>
-         <message-destination-type>javax.jms.Topic</message-destination-type>
-         <message-destination-usage>Produces</message-destination-usage>
-         <message-destination-link>daytrader-ejb-1.0-SNAPSHOT.jar#TradeStreamerTopic</message-destination-link>
-      </message-destination-ref>
       <ejb-ref>
          <ejb-ref-name>ejb/Trade</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
@@ -418,6 +406,18 @@
          <local>org.apache.geronimo.samples.daytrader.ejb.LocalAccount</local>
          <ejb-link>AccountEJB</ejb-link>
       </ejb-local-ref>
+      <message-destination-ref id="MessageDestinationRef_1">
+         <message-destination-ref-name>jms/TradeBrokerQueue</message-destination-ref-name>
+         <message-destination-type>javax.jms.Queue</message-destination-type>
+         <message-destination-usage>Produces</message-destination-usage>
+         <message-destination-link>daytrader-ejb-1.0-SNAPSHOT.jar#TradeBrokerQueue</message-destination-link>
+      </message-destination-ref>
+      <message-destination-ref id="MessageDestinationRef_2">
+         <message-destination-ref-name>jms/TradeStreamerTopic</message-destination-ref-name>
+         <message-destination-type>javax.jms.Topic</message-destination-type>
+         <message-destination-usage>Produces</message-destination-usage>
+         <message-destination-link>daytrader-ejb-1.0-SNAPSHOT.jar#TradeStreamerTopic</message-destination-link>
+      </message-destination-ref>
       <service-ref>
         <description>WSDL Service Trade</description>
         <service-ref-name>service/Trade</service-ref-name>