You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by vi...@apache.org on 2011/02/17 09:24:04 UTC

svn commit: r1071543 [1/15] - in /geronimo/daytrader/trunk: ./ assemblies/javaee/ javaee6/ javaee6/assemblies/ javaee6/assemblies/daytrader-ear/ javaee6/assemblies/daytrader-ear/src/ javaee6/assemblies/daytrader-ear/src/main/ javaee6/assemblies/daytrad...

Author: violalu
Date: Thu Feb 17 08:23:57 2011
New Revision: 1071543

URL: http://svn.apache.org/viewvc?rev=1071543&view=rev
Log:
DAYTRADER-91
Phase 1 update: Liberal usage of annotations, JDBC resource definition
Bean validation against perisistent entity
EJBs in wars(Web/classes)
and replace tab with spaces in some files

Added:
    geronimo/daytrader/trunk/javaee6/
    geronimo/daytrader/trunk/javaee6/assemblies/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/App.java
    geronimo/daytrader/trunk/javaee6/assemblies/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/
    geronimo/daytrader/trunk/javaee6/modules/core/
    geronimo/daytrader/trunk/javaee6/modules/core/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/core/src/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBeanWS.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/RunStatsDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/FinancialUtils.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/KeySequenceDirect.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeAction.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJDBCDirect.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJEEDirect.java
    geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJPADirect.java
    geronimo/daytrader/trunk/javaee6/modules/entities/
    geronimo/daytrader/trunk/javaee6/modules/entities/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/entities/src/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/AccountDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/AccountProfileDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/HoldingDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/OrderDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/java/org/apache/geronimo/daytrader/javaee6/entities/QuoteDataBean.java
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/LICENSE
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/NOTICE
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
    geronimo/daytrader/trunk/javaee6/modules/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/utils/
    geronimo/daytrader/trunk/javaee6/modules/utils/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/utils/src/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/KeyBlock.java
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/Log.java
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/MDBStats.java
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/TimerStat.java
    geronimo/daytrader/trunk/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/TradeConfig.java
    geronimo/daytrader/trunk/javaee6/modules/web/
    geronimo/daytrader/trunk/javaee6/modules/web/pom.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/OrdersAlertFilter.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeAppServlet.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeBuildDB.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeConfigServlet.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeDirectContextListener.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeJDBCContextListener.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeJPAContextListener.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeScenarioServlet.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeServletAction.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/DirectSLSBBean.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/DirectSLSBLocal.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/DirectSLSBRemote.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBLocal.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBRemote.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ExplicitGC.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingBean.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingJDBCRead.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingJDBCWrite.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2Include.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2IncludeRcv.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2JNDI.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2Jsp.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2Servlet.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2ServletRcv.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServletWriter.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingSession1.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingSession2.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingSession3.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingSession3Object.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2MDBQueue.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2MDBTopic.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2CMROne2Many.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2CMROne2One.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2Entity.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2EntityCollection.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2JDBC.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Session2JDBCCollection.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2TwoPhase.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/META-INF/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/db2/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/db2/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/derby/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/derby/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/informix/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/informix/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/mysql/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/mysql/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/oracle/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/oracle/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/other/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/other/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/postgre/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/postgre/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/sqlserver/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/resources/dbscripts/sqlserver/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/META-INF/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/META-INF/LICENSE
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/META-INF/NOTICE
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/META-INF/context.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/PingHtml.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/PingJsp.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/PingJspEL.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/PingServlet2Jsp.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/geronimo-web.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/ibm-web-bnd.xmi
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/ibm-web-bnd.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/ibm-web-ext.xmi
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/WEB-INF/web.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/account.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/accountImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/config.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/configure.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/contentHome.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/db2/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/db2/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/derby/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/derby/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/informix/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/informix/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/mysql/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/mysql/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/oracle/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/oracle/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/other/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/other/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/postgre/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/postgre/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/sqlserver/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/dbscripts/sqlserver/Table.ddl
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/displayQuote.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/benchmarking.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/documentation.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/glossary.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/rtCharacterisitics.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/tradeFAQ.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/docs/tradeversion.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/error.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/footer.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/header.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/DayTraderHead_blue.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/DayTraderHead_red.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/SOAPconfig.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/about.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/account.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/arrowdown.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/arrowup.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/bottomRedBar.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/configuration.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/copyRight.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/dayTraderLogo.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/faq.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/graph.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/home.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/homeBanner.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/line.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/logout.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/lower_banner.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/menuHome.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/portfolio.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/primitives.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/quotes.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/reports.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/spacer.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/ticker-anim.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/topRedBar.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/topline.jpg   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/tradeOverview.png   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/images/tradingAndPortfolios.gif   (with props)
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/index.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/leftMenu.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/marketSummary.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/order.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/orderImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/portfolio.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/portfolioImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/quote.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/quoteImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/register.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/registerImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/runStats.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/sample.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/style.css
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/tradehome.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/tradehomeImg.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/web_prmtv.html
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/welcome.jsp
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/webapp/welcomeImg.jsp
    geronimo/daytrader/trunk/javaee6/pom.xml
Modified:
    geronimo/daytrader/trunk/assemblies/javaee/pom.xml
    geronimo/daytrader/trunk/modules/pom.xml
    geronimo/daytrader/trunk/pom.xml

Modified: geronimo/daytrader/trunk/assemblies/javaee/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/assemblies/javaee/pom.xml?rev=1071543&r1=1071542&r2=1071543&view=diff
==============================================================================
--- geronimo/daytrader/trunk/assemblies/javaee/pom.xml (original)
+++ geronimo/daytrader/trunk/assemblies/javaee/pom.xml Thu Feb 17 08:23:57 2011
@@ -31,7 +31,7 @@
     <packaging>pom</packaging>
     
     <modules>
-    		<module>daytrader-war</module>
+    <module>daytrader-war</module>
         <module>daytrader-ear</module>
         <!--
         <module>dojo-ui-war</module>

Added: geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml (added)
+++ geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml Thu Feb 17 08:23:57 2011
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>assemblies</artifactId>
+    <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+  
+  <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+  <artifactId>daytrader-ear</artifactId>
+  
+  <packaging>ear</packaging>
+   <name>DayTrader :: Assemblies - Java EE 6 EAR</name>
+   <description>Daytrader Java EE 6 EAR </description>
+  
+  <dependencies>
+    <dependency>
+            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+            <artifactId>utils</artifactId>     
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+            <artifactId>core</artifactId>
+            <version>${project.version}</version>              
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+            <artifactId>entities</artifactId>           
+            <version>${project.version}</version>              
+             </dependency>              
+           <dependency>
+            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+            <artifactId>web</artifactId>
+            <version>${project.version}</version>
+            <type>war</type>
+        </dependency>
+        </dependencies>
+  <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-ear-plugin</artifactId>
+                <!--<version>2.3.1</version>-->
+                <configuration>
+                    <displayName>DayTrader EAR</displayName>
+                    <description>DayTrader Stock Trading Performance Benchmark Sample</description>
+                    <version>5</version>
+                    <modules>
+                        <javaModule>
+                            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+                            <artifactId>utils</artifactId>
+                            <bundleFileName>util.jar</bundleFileName>
+                            <includeInApplicationXml>false</includeInApplicationXml>
+                        </javaModule>
+                        <javaModule>
+                            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+                            <artifactId>core</artifactId>
+                            <bundleFileName>core.jar</bundleFileName>
+                            <includeInApplicationXml>false</includeInApplicationXml>
+                        </javaModule>
+                        <javaModule>
+                            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+                            <artifactId>entities</artifactId>
+                            <bundleFileName>entities.jar</bundleFileName>
+                            <includeInApplicationXml>false</includeInApplicationXml>
+                        </javaModule> 
+                        <webModule>
+                            <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+                            <artifactId>web</artifactId>
+                            <contextRoot>/daytrader</contextRoot>
+                            <bundleFileName>web.war</bundleFileName>
+                        </webModule>                
+                    </modules>
+                    <!--
+                    HACK: Include legal muck from maven-remote-resources-plugin
+                    -->
+                    <resourcesDir>${project.build.outputDirectory}</resourcesDir>
+                    <earSourceDirectory>${basedir}/src/main/resources</earSourceDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/App.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/App.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/App.java (added)
+++ geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/src/main/java/org/apache/geronimo/daytrader/javaee6/App.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,13 @@
+package org.apache.geronimo.daytrader.javaee6;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Added: geronimo/daytrader/trunk/javaee6/assemblies/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/assemblies/pom.xml?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/assemblies/pom.xml (added)
+++ geronimo/daytrader/trunk/javaee6/assemblies/pom.xml Thu Feb 17 08:23:57 2011
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>javaee6</artifactId>
+    <groupId>org.apache.geronimo.daytrader</groupId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+  
+  <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+  <artifactId>assemblies</artifactId>
+  <packaging>pom</packaging>
+  <name>DayTrader :: Java EE 6 :: Assemblies</name>
+  <description>Daytrader Java EE 6 Assemblies</description>
+  
+   <modules>
+    <module>daytrader-ear</module>
+  </modules>
+</project>
\ No newline at end of file

Added: geronimo/daytrader/trunk/javaee6/modules/core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/pom.xml?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/pom.xml (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/pom.xml Thu Feb 17 08:23:57 2011
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <parent>
+    <artifactId>modules</artifactId>
+    <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+  
+  <artifactId>core</artifactId> 
+  <name>DayTrader :: Java EE 6 :: Modules - Core</name>
+  <description>Daytrader Java EE 6 Core Module</description>
+  
+  <dependencies>
+        <dependency>     
+        <groupId>org.apache.geronimo.daytrader.javaee6</groupId> 
+            <artifactId>utils</artifactId>
+<version>${project.version}</version>            
+        </dependency>
+        
+        <dependency>            
+        <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+            <artifactId>entities</artifactId>  
+<version>${project.version}</version>                        
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>    
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jpa_2.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-annotation_1.1_spec</artifactId>
+        <scope>provided</scope>
+</dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.1_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa</artifactId>
+            <scope>provided</scope>
+        </dependency>        
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>        
+    </build>
+</project>

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,38 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.api;
+
+
+/**
+  * TradeDBServices interface specifies the DB specific methods provided by SOME TradeServices instances.
+  *
+  * @see TradeJDBCDirect
+  * @see TradeJEEDirect
+  *
+  */ 
+public interface TradeDBServices {
+    
+    /**
+     * TradeBuildDB needs this abstracted method
+     */
+    public String checkDBProductName() throws Exception;
+    
+    /**
+     * TradeBuildDB needs this abstracted method
+     */
+    public boolean recreateDBTables(Object[] sqlBuffer, java.io.PrintWriter out) throws Exception;
+}   

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,285 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.api;
+
+
+import java.math.BigDecimal;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import org.apache.geronimo.daytrader.javaee6.entities.AccountDataBean;
+import org.apache.geronimo.daytrader.javaee6.entities.AccountProfileDataBean;
+import org.apache.geronimo.daytrader.javaee6.entities.HoldingDataBean;
+import org.apache.geronimo.daytrader.javaee6.entities.OrderDataBean;
+import org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean;
+import org.apache.geronimo.daytrader.javaee6.core.beans.MarketSummaryDataBean;
+import org.apache.geronimo.daytrader.javaee6.core.beans.RunStatsDataBean;
+
+/**
+  * TradeServices interface specifies the business methods provided by the Trade online broker application.
+  * These business methods represent the features and operations that can be performed by customers of 
+  * the brokerage such as login, logout, get a stock quote, buy or sell a stock, etc.
+  * This interface is implemented by {@link Trade} providing an EJB implementation of these
+  * business methods and also by {@link TradeDirect} providing a JDBC implementation.
+  *
+  * @see Trade
+  * @see TradeDirect
+  *
+  */ 
+public interface TradeServices extends Remote {
+
+   /**
+     * Compute and return a snapshot of the current market conditions
+     * This includes the TSIA - an index of the price of the top 100 Trade stock quotes
+     * The openTSIA ( the index at the open)
+     * The volume of shares traded,
+     * Top Stocks gain and loss
+     *
+     * @return A snapshot of the current market summary
+     */
+    public MarketSummaryDataBean getMarketSummary() throws Exception, RemoteException;
+
+
+   /**
+     * Purchase a stock and create a new holding for the given user.
+     * Given a stock symbol and quantity to purchase, retrieve the current quote price,
+     * debit the user's account balance, and add holdings to user's portfolio.
+     * buy/sell are asynchronous, using J2EE messaging, 
+     * A new order is created and submitted for processing to the TradeBroker
+     *
+     * @param userID the customer requesting the stock purchase
+     * @param symbol the symbol of the stock being purchased
+     * @param quantity the quantity of shares to purchase     
+     * @return OrderDataBean providing the status of the newly created buy order
+     */
+
+
+    public OrderDataBean buy(String userID, String symbol, double quantity, int orderProcessingMode) throws Exception, RemoteException;
+
+   /**
+     * Sell a stock holding and removed the holding for the given user.
+     * Given a Holding, retrieve current quote, credit user's account,
+     * and reduce holdings in user's portfolio.
+     *
+     * @param userID the customer requesting the sell
+      * @param holdingID the users holding to be sold
+     * @return OrderDataBean providing the status of the newly created sell order
+     */
+    public OrderDataBean sell(String userID, Integer holdingID, int orderProcessingMode) throws Exception, RemoteException;
+
+
+   /**
+     * Queue the Order identified by orderID to be processed 
+     * 
+     * Orders are submitted through JMS to a Trading Broker
+     * and completed asynchronously. This method queues the order for processing
+     * 
+     * The boolean twoPhase specifies to the server implementation whether or not the
+     * method is to participate in a global transaction
+     *
+     * @param orderID the Order being queued for processing
+     * @return OrderDataBean providing the status of the completed order
+     */
+    public void queueOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+
+   /**
+     * Complete the Order identefied by orderID
+     * Orders are submitted through JMS to a Trading agent
+     * and completed asynchronously. This method completes the order
+     * For a buy, the stock is purchased creating a holding and the users account is debited
+     * For a sell, the stock holding is removed and the users account is credited with the proceeds
+     * 
+     * The boolean twoPhase specifies to the server implementation whether or not the
+     * method is to participate in a global transaction
+     *
+     * @param orderID the Order to complete
+     * @return OrderDataBean providing the status of the completed order
+     */
+    public OrderDataBean completeOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+    
+   /**
+     * Cancel the Order identefied by orderID
+     * 
+     * The boolean twoPhase specifies to the server implementation whether or not the
+     * method is to participate in a global transaction
+     *
+     * @param orderID the Order to complete
+     * @return OrderDataBean providing the status of the completed order
+     */
+    public void cancelOrder(Integer orderID, boolean twoPhase) throws Exception, RemoteException;
+
+
+   /**
+     * Signify an order has been completed for the given userID
+     * 
+     * @param userID the user for which an order has completed
+     * @param orderID the order which has completed
+     * 
+     */
+    public void orderCompleted(String userID, Integer orderID) throws Exception, RemoteException;
+    
+
+   /**
+     * Get the collection of all orders for a given account
+     *
+     * @param userID the customer account to retrieve orders for
+     * @return Collection OrderDataBeans providing detailed order information
+     */
+    public Collection getOrders(String userID) throws Exception, RemoteException;
+
+   /**
+     * Get the collection of completed orders for a given account that need to be alerted to the user
+     *
+     * @param userID the customer account to retrieve orders for
+     * @return Collection OrderDataBeans providing detailed order information
+     */
+    public Collection getClosedOrders(String userID) throws Exception, RemoteException;
+
+
+    /**
+     * Given a market symbol, price, and details, create and return a new {@link QuoteDataBean}
+     *
+     * @param symbol the symbol of the stock
+     * @param price the current stock price
+     * @param details a short description of the stock or company
+     * @return a new QuoteDataBean or null if Quote could not be created
+     */
+    public QuoteDataBean createQuote(String symbol, String companyName, BigDecimal price) throws Exception, RemoteException;
+
+   /**
+     * Return a {@link QuoteDataBean} describing a current quote for the given stock symbol
+     *
+     * @param symbol the stock symbol to retrieve the current Quote
+     * @return the QuoteDataBean
+     */
+    public QuoteDataBean getQuote(String symbol) throws Exception, RemoteException;
+
+   /**
+     * Return a {@link java.util.Collection} of {@link QuoteDataBean} 
+     * describing all current quotes
+     * @return A collection of  QuoteDataBean
+     */
+    public Collection getAllQuotes() throws Exception, RemoteException;
+
+   /**
+     * Update the stock quote price and volume for the specified stock symbol
+     *
+     * @param symbol for stock quote to update
+     * @param price the updated quote price
+     * @return the QuoteDataBean describing the stock
+     */
+    public QuoteDataBean updateQuotePriceVolume(String symbol, BigDecimal newPrice, double sharesTraded) throws Exception, RemoteException;
+
+        
+   /**
+     * Return the portfolio of stock holdings for the specified customer
+     * as a collection of HoldingDataBeans
+     *
+     * @param userID the customer requesting the portfolio     
+     * @return Collection of the users portfolio of stock holdings
+     */
+    public Collection getHoldings(String userID) throws Exception, RemoteException;
+
+   /**
+     * Return a specific user stock holding identifed by the holdingID
+     *
+     * @param holdingID the holdingID to return     
+     * @return a HoldingDataBean describing the holding
+     */
+    public HoldingDataBean getHolding(Integer holdingID) throws Exception, RemoteException;
+
+    /**
+     * Return an AccountDataBean object for userID describing the account
+     *
+     * @param userID the account userID to lookup
+     * @return User account data in AccountDataBean
+     */    
+   public AccountDataBean getAccountData(String userID) 
+           throws Exception, RemoteException;                              
+
+    /**
+     * Return an AccountProfileDataBean for userID providing the users profile
+     *
+     * @param userID the account userID to lookup
+     * @param User account profile data in AccountProfileDataBean
+     */
+   public AccountProfileDataBean getAccountProfileData(String userID) throws Exception, RemoteException;                              
+
+    /**
+     * Update userID's account profile information using the provided AccountProfileDataBean object
+     *
+     * @param userID the account userID to lookup
+     * @param User account profile data in AccountProfileDataBean
+     */
+   public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData) throws Exception, RemoteException;                              
+
+
+    /**
+     * Attempt to authenticate and login a user with the given password
+     *
+     * @param userID the customer to login
+     * @param password the password entered by the customer for authentication
+     * @return User account data in AccountDataBean
+     */
+   public AccountDataBean login(String userID, String password) throws Exception, RemoteException;                              
+
+    /**
+     * Logout the given user
+     *
+     * @param userID the customer to logout 
+     * @return the login status
+     */
+
+   public void logout(String userID) throws Exception, RemoteException; 
+                                            
+    /**
+     * Register a new Trade customer.
+     * Create a new user profile, user registry entry, account with initial balance,
+     * and empty portfolio.
+     *
+     * @param userID the new customer to register
+     * @param password the customers password
+     * @param fullname the customers fullname
+     * @param address  the customers street address
+     * @param email    the customers email address
+     * @param creditcard the customers creditcard number
+     * @param initialBalance the amount to charge to the customers credit to open the account and set the initial balance
+     * @return the userID if successful, null otherwise
+     */
+    public AccountDataBean register(String userID,
+                                  String password,
+                                  String fullname,
+                                  String address,
+                                  String email,
+                                  String creditcard,
+                                  BigDecimal openBalance) throws Exception, RemoteException;  
+                          
+
+   /**
+     * Reset the TradeData by
+     * - removing all newly registered users by scenario servlet
+     *    (i.e. users with userID's beginning with "ru:")     * 
+     * - removing all buy/sell order pairs 
+     * - setting logoutCount = loginCount
+     *  
+      *  return statistics for this benchmark run
+     */
+    public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception, RemoteException;
+    
+}   
+

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBean.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBean.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBean.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,239 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+
+import org.apache.geronimo.daytrader.javaee6.core.direct.FinancialUtils;
+import org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean;
+import org.apache.geronimo.daytrader.javaee6.utils.Log;
+import org.apache.geronimo.daytrader.javaee6.utils.TradeConfig;
+
+public class MarketSummaryDataBean implements Serializable
+{
+
+    private BigDecimal     TSIA;            /* Trade Stock Index Average */
+    private BigDecimal     openTSIA;        /* Trade Stock Index Average at the open */    
+    private double      volume;         /* volume of shares traded */
+    private Collection     topGainers;        /* Collection of top gaining stocks */
+    private Collection     topLosers;        /* Collection of top losing stocks */    
+    //FUTURE private Collection     topVolume;        /* Collection of top stocks by volume */        
+    private Date            summaryDate;   /* Date this summary was taken */
+    
+    //cache the gainPercent once computed for this bean
+    private BigDecimal  gainPercent=null;
+
+    public MarketSummaryDataBean(){ }
+    public MarketSummaryDataBean(BigDecimal TSIA,
+                            BigDecimal  openTSIA,
+                            double        volume,
+                            Collection     topGainers,
+                            Collection     topLosers//, Collection topVolume
+                            )
+    {
+        setTSIA(TSIA);
+        setOpenTSIA(openTSIA);
+        setVolume(volume);
+        setTopGainers(topGainers);
+        setTopLosers(topLosers);
+        setSummaryDate(new java.sql.Date(System.currentTimeMillis()));
+        gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+        
+    }
+    
+    public static MarketSummaryDataBean getRandomInstance() {
+        Collection gain = new ArrayList();
+        Collection lose = new ArrayList();
+        
+        for (int ii = 0; ii < 5; ii++) {
+            QuoteDataBean quote1 = QuoteDataBean.getRandomInstance();
+            QuoteDataBean quote2 = QuoteDataBean.getRandomInstance();
+            
+            gain.add(quote1);
+            lose.add(quote2);
+        }
+        
+        return new MarketSummaryDataBean(
+            TradeConfig.rndBigDecimal(1000000.0f),
+            TradeConfig.rndBigDecimal(1000000.0f),
+            TradeConfig.rndQuantity(),
+            gain,
+            lose
+        );
+    }
+
+    public String toString()
+    {
+        String ret = "\n\tMarket Summary at: " + getSummaryDate()
+            + "\n\t\t        TSIA:" + getTSIA()
+            + "\n\t\t    openTSIA:" + getOpenTSIA()
+            + "\n\t\t        gain:" + getGainPercent()
+            + "\n\t\t      volume:" + getVolume()
+            ;
+
+        if ( (getTopGainers()==null) || (getTopLosers()==null) )
+            return ret;
+        ret += "\n\t\t   Current Top Gainers:";
+        Iterator it = getTopGainers().iterator();
+        while ( it.hasNext() ) 
+        {
+            QuoteDataBean quoteData = (QuoteDataBean) it.next();
+            ret += ( "\n\t\t\t"  + quoteData.toString() );
+        }
+        ret += "\n\t\t   Current Top Losers:";
+        it = getTopLosers().iterator();
+        while ( it.hasNext() ) 
+        {
+            QuoteDataBean quoteData = (QuoteDataBean) it.next();
+            ret += ( "\n\t\t\t"  + quoteData.toString() );
+        }
+        return ret;        
+    }
+    public String toHTML()
+    {
+        String ret = "<BR>Market Summary at: " + getSummaryDate()
+            + "<LI>        TSIA:" + getTSIA() + "</LI>"
+            + "<LI>    openTSIA:" + getOpenTSIA() + "</LI>"
+            + "<LI>      volume:" + getVolume() + "</LI>"
+            ;
+        if ( (getTopGainers()==null) || (getTopLosers()==null) )
+            return ret;
+        ret += "<BR> Current Top Gainers:";
+        Iterator it = getTopGainers().iterator();
+        while ( it.hasNext() ) 
+        {
+            QuoteDataBean quoteData = (QuoteDataBean) it.next();
+            ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+        }
+        ret += "<BR>   Current Top Losers:";
+        it = getTopLosers().iterator();
+        while ( it.hasNext() ) 
+        {
+            QuoteDataBean quoteData = (QuoteDataBean) it.next();
+            ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+        }
+        return ret;
+    }
+    public void print()
+    {
+        Log.log( this.toString() );
+    }    
+    
+    public BigDecimal getGainPercent()
+    {
+        if ( gainPercent == null )
+            gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+        return gainPercent;
+    }
+
+
+    /**
+     * Gets the tSIA
+     * @return Returns a BigDecimal
+     */
+    public BigDecimal getTSIA() {
+        return TSIA;
+    }
+    /**
+     * Sets the tSIA
+     * @param tSIA The tSIA to set
+     */
+    public void setTSIA(BigDecimal tSIA) {
+        TSIA = tSIA;
+    }
+
+    /**
+     * Gets the openTSIA
+     * @return Returns a BigDecimal
+     */
+    public BigDecimal getOpenTSIA() {
+        return openTSIA;
+    }
+    /**
+     * Sets the openTSIA
+     * @param openTSIA The openTSIA to set
+     */
+    public void setOpenTSIA(BigDecimal openTSIA) {
+        this.openTSIA = openTSIA;
+    }
+
+    /**
+     * Gets the volume
+     * @return Returns a BigDecimal
+     */
+    public double getVolume() {
+        return volume;
+    }
+    /**
+     * Sets the volume
+     * @param volume The volume to set
+     */
+    public void setVolume(double volume) {
+        this.volume = volume;
+    }
+
+    /**
+     * Gets the topGainers
+     * @return Returns a Collection
+     */
+    public Collection getTopGainers() {
+        return topGainers;
+    }
+    /**
+     * Sets the topGainers
+     * @param topGainers The topGainers to set
+     */
+    public void setTopGainers(Collection topGainers) {
+        this.topGainers = topGainers;
+    }
+
+    /**
+     * Gets the topLosers
+     * @return Returns a Collection
+     */
+    public Collection getTopLosers() {
+        return topLosers;
+    }
+    /**
+     * Sets the topLosers
+     * @param topLosers The topLosers to set
+     */
+    public void setTopLosers(Collection topLosers) {
+        this.topLosers = topLosers;
+    }
+
+    /**
+     * Gets the summaryDate
+     * @return Returns a Date
+     */
+    public Date getSummaryDate() {
+        return summaryDate;
+    }
+    /**
+     * Sets the summaryDate
+     * @param summaryDate The summaryDate to set
+     */
+    public void setSummaryDate(Date summaryDate) {
+        this.summaryDate = summaryDate;
+    }
+
+}

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBeanWS.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBeanWS.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBeanWS.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/MarketSummaryDataBeanWS.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,224 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.beans;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Collection;
+import java.util.Date;
+
+import org.apache.geronimo.daytrader.javaee6.core.direct.FinancialUtils;
+import org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean;
+import org.apache.geronimo.daytrader.javaee6.utils.Log;
+
+/**
+ * 
+ *
+ * This is a duplicate MarketSummaryDataBean to handle web service handling
+ * of collections.  Instead this class uses typed arrays.
+ */
+public class MarketSummaryDataBeanWS implements Serializable
+{
+
+    private BigDecimal     TSIA;            /* Trade Stock Index Average */
+    private BigDecimal     openTSIA;        /* Trade Stock Index Average at the open */    
+    private double      volume;         /* volume of shares traded */
+    private QuoteDataBean     topGainers[];        /* Collection of top gaining stocks */
+    private QuoteDataBean     topLosers[];        /* Collection of top losing stocks */    
+    private Date            summaryDate;   /* Date this summary was taken */
+    
+    //cache the gainPercent once computed for this bean
+    private BigDecimal  gainPercent=null;
+
+    public MarketSummaryDataBeanWS(){ }
+    public MarketSummaryDataBeanWS(BigDecimal TSIA,
+                            BigDecimal  openTSIA,
+                            double        volume,
+                            QuoteDataBean[]     topGainers,
+                            QuoteDataBean[]     topLosers//, Collection topVolume
+                            )
+    {
+        setTSIA(TSIA);
+        setOpenTSIA(openTSIA);
+        setVolume(volume);
+        setTopGainers(topGainers);
+        setTopLosers(topLosers);
+        setSummaryDate(new java.sql.Date(System.currentTimeMillis()));
+        gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+        
+    }
+    
+
+    public String toString()
+    {
+        String ret = "\n\tMarket Summary at: " + getSummaryDate()
+            + "\n\t\t        TSIA:" + getTSIA()
+            + "\n\t\t    openTSIA:" + getOpenTSIA()
+            //+ "\n\t\t        gain:" + getGainPercent()
+            + "\n\t\t      volume:" + getVolume()
+            ;
+
+        if ( (getTopGainers()==null) || (getTopLosers()==null) )
+            return ret;
+        ret += "\n\t\t   Current Top Gainers:";
+        for (int ii = 0; ii < topGainers.length; ii++) {
+            QuoteDataBean quoteData = topGainers[ii];
+            ret += ( "\n\t\t\t"  + quoteData.toString() );
+        }
+        ret += "\n\t\t   Current Top Losers:";
+        for (int ii = 0; ii < topLosers.length; ii++) {
+            QuoteDataBean quoteData = topLosers[ii];
+            ret += ( "\n\t\t\t"  + quoteData.toString() );
+        }
+        return ret;        
+    }
+    public String toHTML()
+    {
+        String ret = "<BR>Market Summary at: " + getSummaryDate()
+            + "<LI>        TSIA:" + getTSIA() + "</LI>"
+            + "<LI>    openTSIA:" + getOpenTSIA() + "</LI>"
+            + "<LI>      volume:" + getVolume() + "</LI>"
+            ;
+        if ( (getTopGainers()==null) || (getTopLosers()==null) )
+            return ret;
+        ret += "<BR> Current Top Gainers:";
+        for (int ii = 0; ii < topGainers.length; ii++) {
+            QuoteDataBean quoteData = topGainers[ii];
+            ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+        }
+        ret += "<BR>   Current Top Losers:";
+        for (int ii = 0; ii < topLosers.length; ii++) {
+            QuoteDataBean quoteData = topLosers[ii];
+            ret += ( "<LI>"  + quoteData.toString()  + "</LI>" );
+        }
+        return ret;
+    }
+    public void print()
+    {
+        Log.log( this.toString() );
+    }    
+    
+    
+    /* Disabled for D185273
+    public BigDecimal getGainPercent()
+    {
+        if ( gainPercent == null )
+            gainPercent = FinancialUtils.computeGainPercent(getTSIA(), getOpenTSIA());
+        return gainPercent;
+    }
+    */
+
+
+    /**
+     * Gets the tSIA
+     * @return Returns a BigDecimal
+     */
+    public BigDecimal getTSIA() {
+        return TSIA;
+    }
+    /**
+     * Sets the tSIA
+     * @param tSIA The tSIA to set
+     */
+    public void setTSIA(BigDecimal tSIA) {
+        TSIA = tSIA;
+    }
+
+    /**
+     * Gets the openTSIA
+     * @return Returns a BigDecimal
+     */
+    public BigDecimal getOpenTSIA() {
+        return openTSIA;
+    }
+    /**
+     * Sets the openTSIA
+     * @param openTSIA The openTSIA to set
+     */
+    public void setOpenTSIA(BigDecimal openTSIA) {
+        this.openTSIA = openTSIA;
+    }
+
+    /**
+     * Gets the volume
+     * @return Returns a BigDecimal
+     */
+    public double getVolume() {
+        return volume;
+    }
+    /**
+     * Sets the volume
+     * @param volume The volume to set
+     */
+    public void setVolume(double volume) {
+        this.volume = volume;
+    }
+
+    /**
+     * Gets the topGainers
+     * @return Returns a Collection
+     */
+    public QuoteDataBean[] getTopGainers() {
+        return topGainers;
+    }
+    /**
+     * Sets the topGainers
+     * @param topGainers The topGainers to set
+     */
+    public void setTopGainers(QuoteDataBean[] topGainers) {
+        this.topGainers = topGainers;
+    }
+
+    /**
+     * Gets the topLosers
+     * @return Returns a Collection
+     */
+    public QuoteDataBean[] getTopLosers() {
+        return topLosers;
+    }
+    /**
+     * Sets the topLosers
+     * @param topLosers The topLosers to set
+     */
+    public void setTopLosers(QuoteDataBean[] topLosers) {
+        this.topLosers = topLosers;
+    }
+
+    /**
+     * Gets the summaryDate
+     * @return Returns a Date
+     */
+    public Date getSummaryDate() {
+        return summaryDate;
+    }
+    /**
+     * Sets the summaryDate
+     * @param summaryDate The summaryDate to set
+     */
+    public void setSummaryDate(Date summaryDate) {
+        this.summaryDate = summaryDate;
+    }
+    
+    public static MarketSummaryDataBeanWS convertBean(org.apache.geronimo.daytrader.javaee6.core.beans.MarketSummaryDataBean origBean) {
+        Collection gainCol = origBean.getTopGainers();
+        QuoteDataBean gain[] = (QuoteDataBean[])gainCol.toArray(new QuoteDataBean[0]);
+        Collection loseCol = origBean.getTopLosers();
+        QuoteDataBean lose[] = (QuoteDataBean[])loseCol.toArray(new QuoteDataBean[0]);
+        return new MarketSummaryDataBeanWS(origBean.getTSIA(), origBean.getOpenTSIA(), origBean.getVolume(), gain, lose);
+    }
+
+}

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/RunStatsDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/RunStatsDataBean.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/RunStatsDataBean.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/beans/RunStatsDataBean.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,255 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.beans;
+
+
+import java.io.Serializable;
+
+public class RunStatsDataBean implements Serializable
+{
+    //Constructors
+    public RunStatsDataBean(){ }
+
+    // count of trade users in the database (users w/ userID like 'uid:%')
+    private int tradeUserCount;
+    // count of trade stocks in the database (stocks w/ symbol like 's:%')
+    private int tradeStockCount;
+    
+    // count of new registered users in this run (users w/ userID like 'ru:%') -- random user
+    private int newUserCount;
+    
+    // sum of logins by trade users
+    private int sumLoginCount;
+    // sum of logouts by trade users    
+    private int sumLogoutCount;
+
+    // count of holdings of trade users    
+    private int holdingCount;
+
+    // count of orders of trade users        
+    private int orderCount;    
+    // count of buy orders of trade users            
+    private int buyOrderCount;
+    // count of sell orders of trade users            
+    private int sellOrderCount;
+    // count of cancelled orders of trade users            
+    private int cancelledOrderCount;
+    // count of open orders of trade users            
+    private int openOrderCount;
+    // count of orders deleted during this trade Reset
+    private int deletedOrderCount;
+
+    public String toString()
+    {
+        return "\n\tRunStatsData for reset at " + new java.util.Date()
+            + "\n\t\t      tradeUserCount: " + getTradeUserCount()
+            + "\n\t\t        newUserCount: " + getNewUserCount()
+            + "\n\t\t       sumLoginCount: " + getSumLoginCount()
+            + "\n\t\t      sumLogoutCount: " + getSumLogoutCount()
+            + "\n\t\t        holdingCount: " + getHoldingCount()
+            + "\n\t\t          orderCount: " + getOrderCount()
+            + "\n\t\t       buyOrderCount: " + getBuyOrderCount()
+            + "\n\t\t      sellOrderCount: " + getSellOrderCount()
+            + "\n\t\t cancelledOrderCount: " + getCancelledOrderCount()
+            + "\n\t\t      openOrderCount: " + getOpenOrderCount()
+            + "\n\t\t   deletedOrderCount: " + getDeletedOrderCount()
+            ;
+    }
+
+
+    /**
+     * Gets the tradeUserCount
+     * @return Returns a int
+     */
+    public int getTradeUserCount() {
+        return tradeUserCount;
+    }
+    /**
+     * Sets the tradeUserCount
+     * @param tradeUserCount The tradeUserCount to set
+     */
+    public void setTradeUserCount(int tradeUserCount) {
+        this.tradeUserCount = tradeUserCount;
+    }
+
+    /**
+     * Gets the newUserCount
+     * @return Returns a int
+     */
+    public int getNewUserCount() {
+        return newUserCount;
+    }
+    /**
+     * Sets the newUserCount
+     * @param newUserCount The newUserCount to set
+     */
+    public void setNewUserCount(int newUserCount) {
+        this.newUserCount = newUserCount;
+    }
+
+    /**
+     * Gets the sumLoginCount
+     * @return Returns a int
+     */
+    public int getSumLoginCount() {
+        return sumLoginCount;
+    }
+    /**
+     * Sets the sumLoginCount
+     * @param sumLoginCount The sumLoginCount to set
+     */
+    public void setSumLoginCount(int sumLoginCount) {
+        this.sumLoginCount = sumLoginCount;
+    }
+
+    /**
+     * Gets the sumLogoutCount
+     * @return Returns a int
+     */
+    public int getSumLogoutCount() {
+        return sumLogoutCount;
+    }
+    /**
+     * Sets the sumLogoutCount
+     * @param sumLogoutCount The sumLogoutCount to set
+     */
+    public void setSumLogoutCount(int sumLogoutCount) {
+        this.sumLogoutCount = sumLogoutCount;
+    }
+
+    /**
+     * Gets the holdingCount
+     * @return Returns a int
+     */
+    public int getHoldingCount() {
+        return holdingCount;
+    }
+    /**
+     * Sets the holdingCount
+     * @param holdingCount The holdingCount to set
+     */
+    public void setHoldingCount(int holdingCount) {
+        this.holdingCount = holdingCount;
+    }
+
+    /**
+     * Gets the buyOrderCount
+     * @return Returns a int
+     */
+    public int getBuyOrderCount() {
+        return buyOrderCount;
+    }
+    /**
+     * Sets the buyOrderCount
+     * @param buyOrderCount The buyOrderCount to set
+     */
+    public void setBuyOrderCount(int buyOrderCount) {
+        this.buyOrderCount = buyOrderCount;
+    }
+
+    /**
+     * Gets the sellOrderCount
+     * @return Returns a int
+     */
+    public int getSellOrderCount() {
+        return sellOrderCount;
+    }
+    /**
+     * Sets the sellOrderCount
+     * @param sellOrderCount The sellOrderCount to set
+     */
+    public void setSellOrderCount(int sellOrderCount) {
+        this.sellOrderCount = sellOrderCount;
+    }
+
+    /**
+     * Gets the cancelledOrderCount
+     * @return Returns a int
+     */
+    public int getCancelledOrderCount() {
+        return cancelledOrderCount;
+    }
+    /**
+     * Sets the cancelledOrderCount
+     * @param cancelledOrderCount The cancelledOrderCount to set
+     */
+    public void setCancelledOrderCount(int cancelledOrderCount) {
+        this.cancelledOrderCount = cancelledOrderCount;
+    }
+
+    /**
+     * Gets the openOrderCount
+     * @return Returns a int
+     */
+    public int getOpenOrderCount() {
+        return openOrderCount;
+    }
+    /**
+     * Sets the openOrderCount
+     * @param openOrderCount The openOrderCount to set
+     */
+    public void setOpenOrderCount(int openOrderCount) {
+        this.openOrderCount = openOrderCount;
+    }
+
+    /**
+     * Gets the deletedOrderCount
+     * @return Returns a int
+     */
+    public int getDeletedOrderCount() {
+        return deletedOrderCount;
+    }
+    /**
+     * Sets the deletedOrderCount
+     * @param deletedOrderCount The deletedOrderCount to set
+     */
+    public void setDeletedOrderCount(int deletedOrderCount) {
+        this.deletedOrderCount = deletedOrderCount;
+    }
+
+    /**
+     * Gets the orderCount
+     * @return Returns a int
+     */
+    public int getOrderCount() {
+        return orderCount;
+    }
+    /**
+     * Sets the orderCount
+     * @param orderCount The orderCount to set
+     */
+    public void setOrderCount(int orderCount) {
+        this.orderCount = orderCount;
+    }
+
+    /**
+     * Gets the tradeStockCount
+     * @return Returns a int
+     */
+    public int getTradeStockCount() {
+        return tradeStockCount;
+    }
+    /**
+     * Sets the tradeStockCount
+     * @param tradeStockCount The tradeStockCount to set
+     */
+    public void setTradeStockCount(int tradeStockCount) {
+        this.tradeStockCount = tradeStockCount;
+    }
+
+}
+

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/FinancialUtils.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/FinancialUtils.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/FinancialUtils.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/FinancialUtils.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,114 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.direct;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.math.BigDecimal;
+
+import org.apache.geronimo.daytrader.javaee6.entities.*;
+
+public class FinancialUtils {
+    //TODO -- FinancialUtils should have parts reimplemented as JSPTaglibs 
+
+    public final static int ROUND = BigDecimal.ROUND_HALF_UP;
+    public final static int SCALE = 2;    
+    public final static BigDecimal ZERO = (new BigDecimal(0.00)).setScale(SCALE);
+    public final static BigDecimal ONE = (new BigDecimal(1.00)).setScale(SCALE);
+    public final static BigDecimal HUNDRED = (new BigDecimal(100.00)).setScale(SCALE);
+
+    public static BigDecimal computeGain(BigDecimal currentBalance,
+                                            BigDecimal openBalance) 
+    {
+        return currentBalance.subtract(openBalance).setScale(SCALE);
+    }
+    
+    public static BigDecimal computeGainPercent(BigDecimal currentBalance,
+                                                BigDecimal openBalance) 
+    {
+        if (openBalance.doubleValue() == 0.0) return ZERO;
+        BigDecimal gainPercent =
+            currentBalance.divide(openBalance, ROUND).subtract(ONE).multiply(HUNDRED);
+        return gainPercent;
+    }
+
+    public static BigDecimal computeHoldingsTotal(Collection holdingDataBeans) {
+        BigDecimal holdingsTotal = new BigDecimal(0.0).setScale(SCALE);
+        if (holdingDataBeans == null)
+            return holdingsTotal;
+        Iterator it = holdingDataBeans.iterator();
+        while (it.hasNext()) {
+            HoldingDataBean holdingData = (HoldingDataBean) it.next();
+            BigDecimal total =
+                holdingData.getPurchasePrice().multiply(new BigDecimal(holdingData.getQuantity()));
+            holdingsTotal = holdingsTotal.add(total);
+        }
+        return holdingsTotal.setScale(SCALE);
+    }
+
+    public static String printGainHTML(BigDecimal gain) {
+        String htmlString, arrow;
+        if (gain.doubleValue() < 0.0) {
+            htmlString = "<FONT color=\"#ff0000\">";
+            arrow = "arrowdown.gif";
+        } else {
+            htmlString = "<FONT color=\"#009900\">";
+            arrow = "arrowup.gif";            
+        }
+
+        htmlString += gain.setScale(SCALE, ROUND) + "</FONT><IMG src=\"images/" + arrow + "\" width=\"10\" height=\"10\" border=\"0\"></IMG>";
+        return htmlString;
+    }
+
+    public static String printChangeHTML(double change) {
+        String htmlString, arrow;
+        if (change < 0.0) {
+            htmlString = "<FONT color=\"#ff0000\">";
+            arrow = "arrowdown.gif";                        
+        } else {
+            htmlString = "<FONT color=\"#009900\">";
+            arrow = "arrowup.gif";                        
+        }
+
+
+        htmlString += change + "</FONT><IMG src=\"images/" + arrow + "\" width=\"10\" height=\"10\" border=\"0\"></IMG>";
+        return htmlString;
+    }
+
+    public static String printGainPercentHTML(BigDecimal gain) {
+        String htmlString, arrow;
+        if (gain.doubleValue() < 0.0) {
+            htmlString = "(<B><FONT color=\"#ff0000\">";
+            arrow = "arrowdown.gif";                                    
+        } else {
+            htmlString = "(<B><FONT color=\"#009900\">+";
+            arrow = "arrowup.gif";                                    
+        }
+
+        htmlString += gain.setScale(SCALE, ROUND);
+        htmlString += "%</FONT></B>)<IMG src=\"images/" + arrow + "\" width=\"10\" height=\"10\" border=\"0\"></IMG>";
+        return htmlString;
+    }
+    
+    public static String printQuoteLink(String symbol)    
+    {
+        String htmlString;
+        return "<A href=\"app?action=quotes&symbols="+ symbol+"\">" + symbol + "</A>";
+    }
+    
+
+}
\ No newline at end of file

Added: geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/KeySequenceDirect.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/KeySequenceDirect.java?rev=1071543&view=auto
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/KeySequenceDirect.java (added)
+++ geronimo/daytrader/trunk/javaee6/modules/core/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/KeySequenceDirect.java Thu Feb 17 08:23:57 2011
@@ -0,0 +1,111 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.daytrader.javaee6.core.direct;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.HashMap;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.geronimo.daytrader.javaee6.utils.*;
+
+import org.apache.geronimo.daytrader.*;
+
+public class KeySequenceDirect {
+
+    private static HashMap keyMap = new HashMap();
+
+    public static synchronized Integer getNextID(Connection conn, String keyName, boolean inSession, boolean inGlobalTxn)
+        throws Exception {
+        Integer nextID = null;
+        // First verify we have allocated a block of keys
+        // for this key name
+        // Then verify the allocated block has not been depleted
+        // allocate a new block if necessary
+        if (keyMap.containsKey(keyName) == false)
+            allocNewBlock(conn, keyName, inSession, inGlobalTxn);
+        Collection block = (Collection) keyMap.get(keyName);
+
+        Iterator ids = block.iterator();
+        if (ids.hasNext() == false)
+            ids = allocNewBlock(conn, keyName, inSession, inGlobalTxn).iterator();
+        // get and return a new unique key
+        nextID = (Integer) ids.next();
+
+        if (Log.doTrace())
+            Log.trace("KeySequenceDirect:getNextID inSession(" + inSession + ") - return new PK ID for Entity type: "
+                + keyName + " ID=" + nextID);
+        return nextID;
+    }
+
+    private static Collection allocNewBlock(Connection conn, String keyName, boolean inSession, boolean inGlobalTxn)
+        throws Exception {
+        try {
+            if (inGlobalTxn == false && !inSession)
+                conn.commit(); // commit any pending txns
+            PreparedStatement stmt = conn.prepareStatement(getKeyForUpdateSQL);
+            stmt.setString(1, keyName);
+            ResultSet rs = stmt.executeQuery();
+            if (!rs.next()) {
+                // No keys found for this name - create a new one
+                PreparedStatement stmt2 = conn.prepareStatement(createKeySQL);
+                int keyVal = 0;
+                stmt2.setString(1, keyName);
+                stmt2.setInt(2, keyVal);
+                int rowCount = stmt2.executeUpdate();
+                stmt2.close();
+                stmt.close();
+                stmt = conn.prepareStatement(getKeyForUpdateSQL);
+                stmt.setString(1, keyName);
+                rs = stmt.executeQuery();
+                rs.next();
+            }
+
+            int keyVal = rs.getInt("keyval");
+
+            stmt.close();
+
+            stmt = conn.prepareStatement(updateKeyValueSQL);
+            stmt.setInt(1, keyVal + TradeConfig.KEYBLOCKSIZE);
+            stmt.setString(2, keyName);
+            int rowCount = stmt.executeUpdate();
+            stmt.close();
+
+            Collection block = new KeyBlock(keyVal, keyVal + TradeConfig.KEYBLOCKSIZE - 1);
+            keyMap.put(keyName, block);
+            if (inGlobalTxn == false && !inSession)
+                conn.commit();
+            return block;
+        } catch (Exception e) {
+            String error =
+                "KeySequenceDirect:allocNewBlock - failure to allocate new block of keys for Entity type: " + keyName;
+            Log.error(e, error);
+            throw new Exception(error + e.toString());
+        }
+    }
+
+    private static final String getKeyForUpdateSQL = "select * from keygenejb kg where kg.keyname = ?  for update";
+
+    private static final String createKeySQL =
+        "insert into keygenejb " + "( keyname, keyval ) " + "VALUES (  ?  ,  ? )";
+
+    private static final String updateKeyValueSQL = "update keygenejb set keyval = ? " + "where keyname = ?";
+
+}