├── .gitignore ├── .travis.yml ├── Containerfile_db2 ├── Dockerfile ├── LICENSE ├── README.md ├── README_LOAD_TEST.md ├── daytrader-ee7-ejb ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── ibm │ │ └── websphere │ │ └── samples │ │ └── daytrader │ │ ├── TradeAction.java │ │ ├── TradeServices.java │ │ ├── beans │ │ ├── MarketSummaryDataBean.java │ │ └── RunStatsDataBean.java │ │ ├── direct │ │ ├── KeySequenceDirect.java │ │ └── TradeDirect.java │ │ ├── ejb3 │ │ ├── DTBroker3MDB.java │ │ ├── DTStreamer3MDB.java │ │ ├── MarketSummarySingleton.java │ │ ├── TradeSLSBBean.java │ │ ├── TradeSLSBLocal.java │ │ └── TradeSLSBRemote.java │ │ ├── entities │ │ ├── AccountDataBean.java │ │ ├── AccountProfileDataBean.java │ │ ├── HoldingDataBean.java │ │ ├── OrderDataBean.java │ │ └── QuoteDataBean.java │ │ └── util │ │ ├── CompleteOrderThread.java │ │ ├── FinancialUtils.java │ │ ├── KeyBlock.java │ │ ├── Log.java │ │ ├── MDBStats.java │ │ ├── TimerStat.java │ │ ├── TradeConfig.java │ │ └── WebSocketJMSMessage.java │ └── resources │ └── META-INF │ ├── DEPENDENCIES │ ├── LICENSE.txt │ ├── MANIFEST.MF │ ├── daytrader.sql │ ├── ejb-jar.xml │ ├── ibm-ejb-jar-bnd.xml │ └── persistence.xml ├── daytrader-ee7-web ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ ├── META-INF │ │ ├── DEPENDENCIES │ │ ├── LICENSE │ │ └── persistence.xml │ ├── build.properties │ └── com │ │ └── ibm │ │ └── websphere │ │ └── samples │ │ └── daytrader │ │ └── web │ │ ├── OrdersAlertFilter.java │ │ ├── TestServlet.java │ │ ├── TradeAppServlet.java │ │ ├── TradeBuildDB.java │ │ ├── TradeConfigServlet.java │ │ ├── TradeScenarioServlet.java │ │ ├── TradeServletAction.java │ │ ├── TradeWebContextListener.java │ │ ├── jsf │ │ ├── AccountDataJSF.java │ │ ├── ExternalContextProducer.java │ │ ├── HoldingData.java │ │ ├── JSFLoginFilter.java │ │ ├── LoginValidator.java │ │ ├── MarketSummaryJSF.java │ │ ├── OrderData.java │ │ ├── OrderDataJSF.java │ │ ├── PortfolioJSF.java │ │ ├── QuoteData.java │ │ ├── QuoteJSF.java │ │ ├── TradeActionProducer.java │ │ ├── TradeAppJSF.java │ │ └── TradeConfigJSF.java │ │ ├── prims │ │ ├── ExplicitGC.java │ │ ├── PingBean.java │ │ ├── PingCDIBean.java │ │ ├── PingCDIJSFBean.java │ │ ├── PingEJBIFace.java │ │ ├── PingEJBLocal.java │ │ ├── PingEJBLocalDecorator.java │ │ ├── PingInterceptor.java │ │ ├── PingInterceptorBinding.java │ │ ├── PingJDBCRead.java │ │ ├── PingJDBCRead2JSP.java │ │ ├── PingJDBCWrite.java │ │ ├── PingJSONP.java │ │ ├── PingManagedExecutor.java │ │ ├── PingManagedThread.java │ │ ├── PingReentryServlet.java │ │ ├── PingServlet.java │ │ ├── PingServlet2DB.java │ │ ├── PingServlet2Include.java │ │ ├── PingServlet2IncludeRcv.java │ │ ├── PingServlet2JNDI.java │ │ ├── PingServlet2Jsp.java │ │ ├── PingServlet2PDF.java │ │ ├── PingServlet2Servlet.java │ │ ├── PingServlet2ServletRcv.java │ │ ├── PingServlet30Async.java │ │ ├── PingServlet31Async.java │ │ ├── PingServlet31AsyncRead.java │ │ ├── PingServletCDI.java │ │ ├── PingServletCDIBeanManagerViaCDICurrent.java │ │ ├── PingServletCDIBeanManagerViaJNDI.java │ │ ├── PingServletLargeContentLength.java │ │ ├── PingServletSetContentLength.java │ │ ├── PingServletWriter.java │ │ ├── PingSession1.java │ │ ├── PingSession2.java │ │ ├── PingSession3.java │ │ ├── PingSession3Object.java │ │ ├── PingUpgradeServlet.java │ │ ├── PingWebSocketBinary.java │ │ ├── PingWebSocketJson.java │ │ ├── PingWebSocketTextAsync.java │ │ ├── PingWebSocketTextSync.java │ │ └── ejb3 │ │ │ ├── PingServlet2Entity.java │ │ │ ├── PingServlet2MDBQueue.java │ │ │ ├── PingServlet2MDBTopic.java │ │ │ ├── PingServlet2Session2CMROne2Many.java │ │ │ ├── PingServlet2Session2CMROne2One.java │ │ │ ├── PingServlet2Session2Entity.java │ │ │ ├── PingServlet2Session2Entity2JSP.java │ │ │ ├── PingServlet2Session2EntityCollection.java │ │ │ ├── PingServlet2SessionLocal.java │ │ │ ├── PingServlet2SessionRemote.java │ │ │ └── PingServlet2TwoPhase.java │ │ └── websocket │ │ ├── ActionDecoder.java │ │ ├── ActionMessage.java │ │ ├── JsonDecoder.java │ │ ├── JsonEncoder.java │ │ ├── JsonMessage.java │ │ ├── MarketSummaryWebSocket.java │ │ └── RecentStockChangeList.java │ └── webapp │ ├── META-INF │ ├── LICENSE │ └── MANIFEST.MF │ ├── PingCDIJSF.xhtml │ ├── PingHtml.html │ ├── PingJsf.xhtml │ ├── PingJsp.jsp │ ├── PingJspEL.jsp │ ├── PingServlet2Jsp.jsp │ ├── PingWebSocketBinary.html │ ├── PingWebSocketJson.html │ ├── PingWebSocketTextAsync.html │ ├── PingWebSocketTextSync.html │ ├── WAS_V7_64-bit_performance.pdf │ ├── WEB-INF │ ├── beans.xml │ ├── classes │ │ ├── META-INF │ │ │ ├── DEPENDENCIES │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── persistence.xml │ │ └── build.properties │ ├── faces-config.xml │ ├── ibm-web-bnd.xml │ ├── ibm-web-ext.xml │ └── web.xml │ ├── account.jsp │ ├── account.xhtml │ ├── accountImg.jsp │ ├── config.jsp │ ├── config.xhtml │ ├── configure.html │ ├── configure.xhtml │ ├── contentHome.html │ ├── dbscripts │ ├── db2 │ │ └── Table.ddl │ ├── db2i │ │ └── Table.ddl │ ├── derby │ │ └── Table.ddl │ └── oracle │ │ └── Table.ddl │ ├── displayQuote.jsp │ ├── docs │ ├── benchmarking.html │ ├── documentation.html │ ├── glossary.html │ ├── rtCharacterisitics.html │ ├── tradeFAQ.html │ ├── tradeFAQ.xhtml │ └── tradeversion.html │ ├── error.jsp │ ├── favicon.ico │ ├── footer.html │ ├── header.html │ ├── images │ ├── DayTraderHead_blue.gif │ ├── DayTraderHead_red.gif │ ├── Thumbs.db │ ├── about.gif │ ├── account.gif │ ├── arrowdown.gif │ ├── arrowup.gif │ ├── bottomRedBar.gif │ ├── configuration.gif │ ├── dayTraderLogo.gif │ ├── daytrader_simple_arch.gif │ ├── faq.gif │ ├── graph.gif │ ├── home.gif │ ├── homeBanner.gif │ ├── line.gif │ ├── logout.gif │ ├── lower_banner.gif │ ├── menuHome.gif │ ├── nav_bg.png │ ├── portfolio.gif │ ├── primitives.gif │ ├── quotes.gif │ ├── reports.gif │ ├── spacer.gif │ ├── ticker-anim.gif │ ├── topRedBar.gif │ ├── topline.jpg │ ├── tradeOverview.png │ └── tradingAndPortfolios.gif │ ├── index.html │ ├── index.xhtml │ ├── leftMenu.html │ ├── marketSummary.html │ ├── marketSummary.jsp │ ├── marketSummary.xhtml │ ├── order.jsp │ ├── order.xhtml │ ├── orderImg.jsp │ ├── portfolio.jsp │ ├── portfolio.xhtml │ ├── portfolioImg.jsp │ ├── properties │ └── daytrader.properties │ ├── quote.jsp │ ├── quote.xhtml │ ├── quoteDataPrimitive.jsp │ ├── quoteImg.jsp │ ├── register.jsp │ ├── register.xhtml │ ├── registerImg.jsp │ ├── runStats.jsp │ ├── sample.jsp │ ├── style-jsf.css │ ├── style.css │ ├── tradehome.jsp │ ├── tradehome.xhtml │ ├── tradehomeImg.jsp │ ├── web_prmtv.html │ ├── web_prmtv.xhtml │ ├── welcome.jsp │ ├── welcome.xhtml │ └── welcomeImg.jsp ├── daytrader-ee7 ├── .gitignore ├── pom.xml ├── resources │ └── data │ │ └── tradedb │ │ ├── README_DO_NOT_TOUCH_FILES.txt │ │ ├── log │ │ ├── README_DO_NOT_TOUCH_FILES.txt │ │ ├── log.ctrl │ │ ├── log286.dat │ │ └── logmirror.ctrl │ │ ├── seg0 │ │ ├── README_DO_NOT_TOUCH_FILES.txt │ │ ├── c10.dat │ │ ├── c101.dat │ │ ├── c111.dat │ │ ├── c121.dat │ │ ├── c130.dat │ │ ├── c141.dat │ │ ├── c150.dat │ │ ├── c161.dat │ │ ├── c171.dat │ │ ├── c180.dat │ │ ├── c191.dat │ │ ├── c1a1.dat │ │ ├── c1b1.dat │ │ ├── c1c0.dat │ │ ├── c1d1.dat │ │ ├── c1e0.dat │ │ ├── c1f1.dat │ │ ├── c20.dat │ │ ├── c200.dat │ │ ├── c211.dat │ │ ├── c221.dat │ │ ├── c230.dat │ │ ├── c241.dat │ │ ├── c251.dat │ │ ├── c260.dat │ │ ├── c271.dat │ │ ├── c281.dat │ │ ├── c290.dat │ │ ├── c2a1.dat │ │ ├── c2b1.dat │ │ ├── c2c1.dat │ │ ├── c2d0.dat │ │ ├── c2e1.dat │ │ ├── c2f0.dat │ │ ├── c300.dat │ │ ├── c31.dat │ │ ├── c311.dat │ │ ├── c321.dat │ │ ├── c331.dat │ │ ├── c340.dat │ │ ├── c351.dat │ │ ├── c361.dat │ │ ├── c371.dat │ │ ├── c380.dat │ │ ├── c391.dat │ │ ├── c3a1.dat │ │ ├── c3b1.dat │ │ ├── c3c0.dat │ │ ├── c3d1.dat │ │ ├── c3e1.dat │ │ ├── c3f1.dat │ │ ├── c400.dat │ │ ├── c41.dat │ │ ├── c411.dat │ │ ├── c421.dat │ │ ├── c430.dat │ │ ├── c441.dat │ │ ├── c451.dat │ │ ├── c461.dat │ │ ├── c470.dat │ │ ├── c481.dat │ │ ├── c490.dat │ │ ├── c4a1.dat │ │ ├── c4b0.dat │ │ ├── c4c1.dat │ │ ├── c4d0.dat │ │ ├── c4e1.dat │ │ ├── c4f1.dat │ │ ├── c51.dat │ │ ├── c60.dat │ │ ├── c71.dat │ │ ├── c720.dat │ │ ├── c731.dat │ │ ├── c740.dat │ │ ├── c751.dat │ │ ├── c760.dat │ │ ├── c771.dat │ │ ├── c780.dat │ │ ├── c791.dat │ │ ├── c7a0.dat │ │ ├── c7b1.dat │ │ ├── c7c0.dat │ │ ├── c7d1.dat │ │ ├── c7e1.dat │ │ ├── c7f1.dat │ │ ├── c801.dat │ │ ├── c81.dat │ │ ├── c811.dat │ │ ├── c821.dat │ │ ├── c90.dat │ │ ├── ca1.dat │ │ ├── cb1.dat │ │ ├── cc0.dat │ │ ├── cd1.dat │ │ ├── ce1.dat │ │ └── cf0.dat │ │ └── service.properties └── src │ └── main │ ├── application │ └── META-INF │ │ ├── DEPENDENCIES │ │ └── LICENSE.txt │ └── liberty │ └── config │ ├── server.xml │ ├── server_db2.xml │ └── server_db2_container.xml ├── db2jars └── db2jcc4.jar ├── deploy ├── daytrader7-deploy.yaml ├── db2-role-n-sa.yaml ├── db2-secret.yaml ├── tradedb-service.yaml └── tradedb.yaml ├── docs ├── Downloading-WAS-Liberty.md ├── Starting-the-server.md ├── Using-WDT.md └── Using-cmd-line.md ├── jmeter_files ├── README.txt ├── daytrader7.jmx └── daytrader7_mojarra.jmx ├── jvm.container.options ├── pom.xml ├── scripts ├── daytrader_SILENT_singleServer.py ├── resource_scripts.py └── tuneDayTrader.py └── zos_db2_files ├── RUNSTAT.JCL ├── dbbind.jcl └── dbtable.jcl /.gitignore: -------------------------------------------------------------------------------- 1 | /.settings/ 2 | /target/ 3 | .*.swp 4 | /.project 5 | /.settings/ 6 | .DS_Store 7 | /build/ 8 | /.gradle/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: java 3 | jdk: 4 | - openjdk8 5 | script: 6 | - travis_wait mvn verify -Ponline-its -Dinvoker.streamLogs=true -DwlpVersion=8.5.5_07 -DwlpLicense=L-MCAO-9SYMVC 7 | -------------------------------------------------------------------------------- /Containerfile_db2: -------------------------------------------------------------------------------- 1 | FROM icr.io/appcafe/websphere-liberty:kernel-java17-openj9-ubi 2 | 3 | # Copy application and config files 4 | COPY --chown=1001:0 daytrader-ee7/target/daytrader-ee7.ear /config/apps 5 | COPY --chown=1001:0 daytrader-ee7/src/main/liberty/config/server_db2_container.xml /config/server.xml 6 | COPY --chown=1001:0 jvm.container.options /config/ 7 | 8 | # Copy DB2 client jar files 9 | COPY --chown=1001:0 db2jars /opt/ibm/wlp/usr/shared/resources/db2jars 10 | 11 | # This script will add the requested XML snippets, grow image to be fit-for-purpose and apply interim fixes 12 | RUN configure.sh 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM open-liberty:full 2 | 3 | COPY --chown=1001:0 daytrader-ee7/src/main/liberty/config/server.xml /config/server.xml 4 | COPY --chown=1001:0 daytrader-ee7/target/daytrader-ee7.ear /config/apps 5 | 6 | COPY --chown=1001:0 daytrader-ee7/target/liberty/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar /opt/ol/wlp/usr/shared/resources/DerbyLibs/derby-10.14.2.0.jar 7 | COPY --chown=1001:0 daytrader-ee7/target/liberty/wlp/usr/shared/resources/data /opt/ol/wlp/usr/shared/resources/data 8 | 9 | #RUN configure.sh 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sample.daytrader7 [![Build Status](https://travis-ci.org/WASdev/sample.daytrader7.svg?branch=master)](https://travis-ci.org/WASdev/sample.daytrader7) 2 | 3 | # Java EE7: DayTrader7 Sample 4 | 5 | Java EE7 DayTrader7 Sample 6 | 7 | 8 | This sample contains the DayTrader 7 benchmark, which is an application built around the paradigm of an online stock trading system. The application allows users to login, view their portfolio, lookup stock quotes, and buy or sell stock shares. With the aid of a Web-based load driver such as Apache JMeter, the real-world workload provided by DayTrader can be used to measure and compare the performance of Java Platform, Enterprise Edition (Java EE) application servers offered by a variety of vendors. In addition to the full workload, the application also contains a set of primitives used for functional and performance testing of various Java EE components and common design patterns. 9 | 10 | DayTrader is an end-to-end benchmark and performance sample application. It provides a real world Java EE workload. DayTrader's new design spans Java EE 7, including the new WebSockets specification. Other Java EE features include JSPs, Servlets, EJBs, JPA, JDBC, JSF, CDI, Bean Validation, JSON, JMS, MDBs, and transactions (synchronous and asynchronous/2-phase commit). 11 | 12 | This sample can be installed onto WAS Liberty runtime versions 8.5.5.6 and later. A prebuilt derby database is provided in resources/data 13 | 14 | To run this sample, first [download](https://github.com/WASdev/sample.daytrader7/archive/master.zip) or clone this repo - to clone: 15 | ``` 16 | git clone git@github.com:WASdev/sample.daytrader7.git 17 | ``` 18 | 19 | From inside the sample.daytrader7 directory, build and start the application in Open Liberty with the following command: 20 | ``` 21 | mvn install 22 | cd daytrader-ee7 23 | mvn liberty:run 24 | ``` 25 | 26 | Once the server has been started, go to [http://localhost:9082/daytrader](http://localhost:9082/daytrader) to interact with the sample. 27 | 28 | ### To containerize the application with DB2, you can run command 29 | ``` 30 | docker build -t sample-daytrader7 -f Containerfile_db2 . 31 | ``` 32 | 33 | ## Notice 34 | 35 | © Copyright IBM Corporation 2015. 36 | 37 | ## License 38 | 39 | ```text 40 | Licensed under the Apache License, Version 2.0 (the "License"); 41 | you may not use this file except in compliance with the License. 42 | You may obtain a copy of the License at 43 | 44 | http://www.apache.org/licenses/LICENSE-2.0 45 | 46 | Unless required by applicable law or agreed to in writing, software 47 | distributed under the License is distributed on an "AS IS" BASIS, 48 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 | See the License for the specific language governing permissions and 50 | limitations under the License. 51 | ```` 52 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/.gitignore: -------------------------------------------------------------------------------- 1 | /.apt_generated/ 2 | /target/ 3 | /build/ 4 | /bin/ 5 | .classpath 6 | .project 7 | /.settings/ 8 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | net.wasdev.wlp.sample 5 | jar 6 | WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module 7 | daytrader-ee7-ejb 8 | 1.0-SNAPSHOT 9 | 10 | 11 | UTF-8 12 | UTF-8 13 | 1.8 14 | 1.8 15 | 16 | 17 | 18 | 19 | javax 20 | javaee-api 21 | 7.0 22 | provided 23 | 24 | 25 | javax.annotation 26 | javax.annotation-api 27 | 1.3.2 28 | provided 29 | 30 | 31 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/ejb3/TradeSLSBLocal.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.ejb3; 17 | 18 | import java.math.BigDecimal; 19 | 20 | import javax.ejb.Local; 21 | 22 | import com.ibm.websphere.samples.daytrader.TradeServices; 23 | import com.ibm.websphere.samples.daytrader.entities.QuoteDataBean; 24 | 25 | 26 | @Local 27 | public interface TradeSLSBLocal extends TradeServices { 28 | public double investmentReturn(double investment, double NetValue) throws Exception; 29 | 30 | public QuoteDataBean pingTwoPhase(String symbol) throws Exception; 31 | 32 | public void publishQuotePriceChange(QuoteDataBean quote, BigDecimal oldPrice, BigDecimal changeFactor, double sharesTraded); 33 | } -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/ejb3/TradeSLSBRemote.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.ejb3; 17 | 18 | import javax.ejb.Remote; 19 | 20 | import com.ibm.websphere.samples.daytrader.TradeServices; 21 | import com.ibm.websphere.samples.daytrader.entities.QuoteDataBean; 22 | 23 | import java.math.BigDecimal; 24 | 25 | 26 | @Remote 27 | public interface TradeSLSBRemote extends TradeServices { 28 | public double investmentReturn(double investment, double NetValue) throws Exception; 29 | 30 | public QuoteDataBean pingTwoPhase(String symbol) throws Exception; 31 | 32 | public void publishQuotePriceChange(QuoteDataBean quote, BigDecimal oldPrice, BigDecimal changeFactor, double sharesTraded); 33 | } -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/util/CompleteOrderThread.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.util; 17 | 18 | import javax.ejb.EJBException; 19 | import javax.naming.InitialContext; 20 | import javax.transaction.UserTransaction; 21 | 22 | import com.ibm.websphere.samples.daytrader.TradeServices; 23 | import com.ibm.websphere.samples.daytrader.direct.TradeDirect; 24 | import com.ibm.websphere.samples.daytrader.ejb3.TradeSLSBBean; 25 | 26 | public class CompleteOrderThread implements Runnable { 27 | 28 | final Integer orderID; 29 | boolean twoPhase; 30 | 31 | 32 | public CompleteOrderThread (Integer id, boolean twoPhase) { 33 | orderID = id; 34 | this.twoPhase = twoPhase; 35 | } 36 | 37 | @Override 38 | public void run() { 39 | TradeServices trade; 40 | UserTransaction ut = null; 41 | 42 | try { 43 | // TODO: Sometimes, rarely, the commit does not complete before the find in completeOrder (leads to null order) 44 | // Adding delay here for now, will try to find a better solution in the future. 45 | Thread.sleep(500); 46 | 47 | InitialContext context = new InitialContext(); 48 | ut = (UserTransaction) context.lookup("java:comp/UserTransaction"); 49 | 50 | ut.begin(); 51 | 52 | if (TradeConfig.getRunTimeMode() == TradeConfig.EJB3) { 53 | trade = (TradeSLSBBean) context.lookup("java:module/TradeSLSBBean"); 54 | } else { 55 | trade = new TradeDirect(); 56 | } 57 | 58 | trade.completeOrder(orderID, twoPhase); 59 | 60 | ut.commit(); 61 | } catch (Exception e) { 62 | 63 | try { 64 | ut.rollback(); 65 | } catch (Exception e1) { 66 | throw new EJBException(e1); 67 | } 68 | throw new EJBException(e); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/util/MDBStats.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.util; 17 | 18 | /** 19 | * 20 | * To change this generated comment edit the template variable "typecomment": 21 | * Window>Preferences>Java>Templates. To enable and disable the creation of type 22 | * comments go to Window>Preferences>Java>Code Generation. 23 | */ 24 | public class MDBStats extends java.util.HashMap { 25 | 26 | private static final long serialVersionUID = -3759835921094193760L; 27 | // Singleton class 28 | private static MDBStats mdbStats = null; 29 | 30 | private MDBStats() { 31 | } 32 | 33 | public static synchronized MDBStats getInstance() { 34 | if (mdbStats == null) { 35 | mdbStats = new MDBStats(); 36 | } 37 | return mdbStats; 38 | } 39 | 40 | public TimerStat addTiming(String type, long sendTime, long recvTime) { 41 | TimerStat stats = null; 42 | synchronized (type) { 43 | 44 | stats = get(type); 45 | if (stats == null) { 46 | stats = new TimerStat(); 47 | } 48 | 49 | long time = recvTime - sendTime; 50 | if (time > stats.getMax()) { 51 | stats.setMax(time); 52 | } 53 | if (time < stats.getMin()) { 54 | stats.setMin(time); 55 | } 56 | stats.setCount(stats.getCount() + 1); 57 | stats.setTotalTime(stats.getTotalTime() + time); 58 | 59 | put(type, stats); 60 | } 61 | return stats; 62 | } 63 | 64 | public synchronized void reset() { 65 | clear(); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/util/TimerStat.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.util; 17 | 18 | /** 19 | * 20 | * To change this generated comment edit the template variable "typecomment": 21 | * Window>Preferences>Java>Templates. To enable and disable the creation of type 22 | * comments go to Window>Preferences>Java>Code Generation. 23 | */ 24 | public class TimerStat { 25 | 26 | private double min = 1000000000.0, max = 0.0, totalTime = 0.0; 27 | private int count; 28 | 29 | /** 30 | * Returns the count. 31 | * 32 | * @return int 33 | */ 34 | public int getCount() { 35 | return count; 36 | } 37 | 38 | /** 39 | * Returns the max. 40 | * 41 | * @return double 42 | */ 43 | public double getMax() { 44 | return max; 45 | } 46 | 47 | /** 48 | * Returns the min. 49 | * 50 | * @return double 51 | */ 52 | public double getMin() { 53 | return min; 54 | } 55 | 56 | /** 57 | * Sets the count. 58 | * 59 | * @param count 60 | * The count to set 61 | */ 62 | public void setCount(int count) { 63 | this.count = count; 64 | } 65 | 66 | /** 67 | * Sets the max. 68 | * 69 | * @param max 70 | * The max to set 71 | */ 72 | public void setMax(double max) { 73 | this.max = max; 74 | } 75 | 76 | /** 77 | * Sets the min. 78 | * 79 | * @param min 80 | * The min to set 81 | */ 82 | public void setMin(double min) { 83 | this.min = min; 84 | } 85 | 86 | /** 87 | * Returns the totalTime. 88 | * 89 | * @return double 90 | */ 91 | public double getTotalTime() { 92 | return totalTime; 93 | } 94 | 95 | /** 96 | * Sets the totalTime. 97 | * 98 | * @param totalTime 99 | * The totalTime to set 100 | */ 101 | public void setTotalTime(double totalTime) { 102 | this.totalTime = totalTime; 103 | } 104 | 105 | /** 106 | * Returns the max in Secs 107 | * 108 | * @return double 109 | */ 110 | public double getMaxSecs() { 111 | return max / 1000.0; 112 | } 113 | 114 | /** 115 | * Returns the min in Secs 116 | * 117 | * @return double 118 | */ 119 | public double getMinSecs() { 120 | return min / 1000.0; 121 | } 122 | 123 | /** 124 | * Returns the average time in Secs 125 | * 126 | * @return double 127 | */ 128 | public double getAvgSecs() { 129 | 130 | double avg = getTotalTime() / getCount(); 131 | return avg / 1000.0; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/java/com/ibm/websphere/samples/daytrader/util/WebSocketJMSMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.util; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | import javax.inject.Qualifier; 23 | 24 | @Qualifier 25 | @Retention(RetentionPolicy.RUNTIME) 26 | @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE}) 27 | public @interface WebSocketJMSMessage { 28 | } 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/resources/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | DayTrader :: EJBs 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.7.1 3 | Created-By: 2.6 (IBM Corporation) 4 | 5 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/resources/META-INF/daytrader.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- (C) Copyright IBM Corporation 2015. 3 | -- 4 | -- Licensed under the Apache License, Version 2.0 (the "License"); 5 | -- you may not use this file except in compliance with the License. 6 | -- You may obtain a copy of the License at 7 | -- 8 | -- http://www.apache.org/licenses/LICENSE-2.0 9 | -- 10 | -- Unless required by applicable law or agreed to in writing, software 11 | -- distributed under the License is distributed on an "AS IS" BASIS, 12 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | -- See the License for the specific language governing permissions and 14 | -- limitations under the License. 15 | -- 16 | 17 | --drop table holdingejb; 18 | --drop table accountprofileejb; 19 | --drop table quoteejb; 20 | --drop table keygenejb; 21 | --drop table accountejb; 22 | --drop table orderejb; 23 | 24 | create table holdingejb 25 | (purchaseprice decimal(10, 2), 26 | holdingid integer not null, 27 | quantity double not null, 28 | purchasedate timestamp, 29 | account_accountid integer, 30 | quote_symbol varchar(250), 31 | optLock integer); 32 | 33 | alter table holdingejb 34 | add constraint pk_holdingejb primary key (holdingid); 35 | 36 | create table accountprofileejb 37 | (address varchar(250), 38 | passwd varchar(250), 39 | userid varchar(250) not null, 40 | email varchar(250), 41 | creditcard varchar(250), 42 | fullname varchar(250), 43 | optLock integer); 44 | 45 | alter table accountprofileejb 46 | add constraint pk_accountprofile2 primary key (userid); 47 | 48 | create table quoteejb 49 | (low decimal(10, 2), 50 | open1 decimal(10, 2), 51 | volume double not null, 52 | price decimal(10, 2), 53 | high decimal(10, 2), 54 | companyname varchar(250), 55 | symbol varchar(250) not null, 56 | change1 double not null, 57 | optLock integer); 58 | 59 | alter table quoteejb 60 | add constraint pk_quoteejb primary key (symbol); 61 | 62 | create table keygenejb 63 | (keyval integer not null, 64 | keyname varchar(250) not null); 65 | 66 | alter table keygenejb 67 | add constraint pk_keygenejb primary key (keyname); 68 | 69 | create table accountejb 70 | (creationdate timestamp, 71 | openbalance decimal(10, 2), 72 | logoutcount integer not null, 73 | balance decimal(10, 2), 74 | accountid integer not null, 75 | lastlogin timestamp, 76 | logincount integer not null, 77 | PROFILE_USERID VARCHAR(250), 78 | optLock integer); 79 | 80 | alter table accountejb 81 | add constraint pk_accountejb primary key (accountid); 82 | 83 | create table orderejb 84 | (orderfee decimal(10, 2), 85 | completiondate timestamp, 86 | ordertype varchar(250), 87 | orderstatus varchar(250), 88 | price decimal(10, 2), 89 | quantity double not null, 90 | opendate timestamp, 91 | orderid integer not null, 92 | account_accountid integer, 93 | quote_symbol varchar(250), 94 | holding_holdingid integer, 95 | optLock integer); 96 | 97 | alter table orderejb 98 | add constraint pk_orderejb primary key (orderid); 99 | 100 | create index profile_userid on accountejb(profile_userid); 101 | create index account_accountid on holdingejb(account_accountid); 102 | create index account_accountidt on orderejb(account_accountid); 103 | create index holding_holdingid on orderejb(holding_holdingid); 104 | create index orderstatus on orderejb(orderstatus); 105 | create index ordertype on orderejb(ordertype); 106 | 107 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/resources/META-INF/ibm-ejb-jar-bnd.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /daytrader-ee7-ejb/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 23 | 24 | jdbc/TradeDataSource 25 | 26 | com.ibm.websphere.samples.daytrader.entities.AccountDataBean 27 | com.ibm.websphere.samples.daytrader.entities.AccountProfileDataBean 28 | com.ibm.websphere.samples.daytrader.entities.HoldingDataBean 29 | com.ibm.websphere.samples.daytrader.entities.OrderDataBean 30 | com.ibm.websphere.samples.daytrader.entities.QuoteDataBean 31 | true 32 | NONE 33 | 34 | 35 | -------------------------------------------------------------------------------- /daytrader-ee7-web/.gitignore: -------------------------------------------------------------------------------- 1 | /.apt_generated/ 2 | /target/ 3 | /build/ 4 | /bin/ 5 | .classpath 6 | .project 7 | /.settings/ -------------------------------------------------------------------------------- /daytrader-ee7-web/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | net.wasdev.wlp.sample 5 | 6 | war 7 | WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module 8 | daytrader-ee7-web 9 | 1.0-SNAPSHOT 10 | 11 | 12 | UTF-8 13 | UTF-8 14 | 1.8 15 | 1.8 16 | 17 | 18 | 19 | 20 | javax 21 | javaee-api 22 | 7.0 23 | provided 24 | 25 | 26 | taglibs 27 | standard 28 | 1.1.1 29 | compile 30 | 31 | 32 | javax.annotation 33 | javax.annotation-api 34 | 1.3.2 35 | provided 36 | 37 | 38 | net.wasdev.wlp.sample 39 | daytrader-ee7-ejb 40 | 1.0-SNAPSHOT 41 | jar 42 | provided 43 | 44 | 45 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | DayTrader :: Web Application 7 | 8 | 9 | From: 'an unknown organization' 10 | - Unnamed - taglibs:standard:jar:1.1.1 taglibs:standard:jar:1.1.1 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | 22 | 23 | 24 | jdbc/TradeDataSource 25 | 26 | com.ibm.websphere.samples.daytrader.entities.AccountDataBean 27 | com.ibm.websphere.samples.daytrader.entities.AccountProfileDataBean 28 | com.ibm.websphere.samples.daytrader.entities.HoldingDataBean 29 | com.ibm.websphere.samples.daytrader.entities.OrderDataBean 30 | com.ibm.websphere.samples.daytrader.entities.QuoteDataBean 31 | true 32 | NONE 33 | 34 | 35 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/build.properties: -------------------------------------------------------------------------------- 1 | ## 2 | ## (C) Copyright IBM Corporation 2015. 3 | ## 4 | ## Licensed under the Apache License, Version 2.0 (the "License"); 5 | ## you may not use this file except in compliance with the License. 6 | ## You may obtain a copy of the License at 7 | ## 8 | ## http://www.apache.org/licenses/LICENSE-2.0 9 | ## 10 | ## Unless required by applicable law or agreed to in writing, software 11 | ## distributed under the License is distributed on an "AS IS" BASIS, 12 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ## See the License for the specific language governing permissions and 14 | ## limitations under the License. 15 | ## 16 | 17 | ejb_version=${pom.version} 18 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/jsf/ExternalContextProducer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.jsf; 17 | 18 | import javax.enterprise.context.RequestScoped; 19 | import javax.enterprise.inject.Produces; 20 | import javax.faces.context.ExternalContext; 21 | import javax.faces.context.FacesContext; 22 | 23 | public class ExternalContextProducer { 24 | @Produces 25 | @RequestScoped 26 | public ExternalContext produceFacesExternalContext() { 27 | return FacesContext.getCurrentInstance().getExternalContext(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/jsf/JSFLoginFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.jsf; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.Filter; 21 | import javax.servlet.FilterChain; 22 | import javax.servlet.FilterConfig; 23 | import javax.servlet.ServletException; 24 | import javax.servlet.ServletRequest; 25 | import javax.servlet.ServletResponse; 26 | //import javax.servlet.annotation.WebFilter; 27 | import javax.servlet.annotation.WebFilter; 28 | import javax.servlet.http.HttpServletRequest; 29 | import javax.servlet.http.HttpServletResponse; 30 | import javax.servlet.http.HttpSession; 31 | 32 | @WebFilter(filterName = "JSFLoginFilter", urlPatterns = "*.faces") 33 | public class JSFLoginFilter implements Filter { 34 | 35 | public JSFLoginFilter() { 36 | super(); 37 | } 38 | 39 | /** 40 | * @see Filter#init(FilterConfig) 41 | */ 42 | private FilterConfig filterConfig = null; 43 | 44 | @Override 45 | public void init(FilterConfig filterConfig) throws ServletException { 46 | this.filterConfig = filterConfig; 47 | } 48 | 49 | /** 50 | * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) 51 | */ 52 | @Override 53 | public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { 54 | if (filterConfig == null) { 55 | return; 56 | } 57 | 58 | HttpServletRequest request = (HttpServletRequest) req; 59 | HttpServletResponse response = (HttpServletResponse) resp; 60 | 61 | HttpSession session = request.getSession(); 62 | String userID = (String) session.getAttribute("uidBean"); 63 | 64 | // If user has not logged in and is trying access account information, 65 | // redirect to login page. 66 | if (userID == null) { 67 | String url = request.getServletPath(); 68 | 69 | if (url.contains("home") || url.contains("account") || url.contains("portfolio") || url.contains("quote") || url.contains("order") 70 | || url.contains("marketSummary")) { 71 | System.out.println("JSF service error: User Not Logged in"); 72 | response.sendRedirect("welcome.faces"); 73 | return; 74 | } 75 | } 76 | 77 | chain.doFilter(req, resp/* wrapper */); 78 | } 79 | 80 | /** 81 | * @see Filter#destroy() 82 | */ 83 | @Override 84 | public void destroy() { 85 | this.filterConfig = null; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/jsf/LoginValidator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.jsf; 17 | 18 | import java.util.regex.Matcher; 19 | import java.util.regex.Pattern; 20 | 21 | import javax.faces.application.FacesMessage; 22 | import javax.faces.component.UIComponent; 23 | import javax.faces.context.FacesContext; 24 | import javax.faces.validator.FacesValidator; 25 | import javax.faces.validator.Validator; 26 | import javax.faces.validator.ValidatorException; 27 | 28 | import com.ibm.websphere.samples.daytrader.util.Log; 29 | 30 | @FacesValidator("loginValidator") 31 | public class LoginValidator implements Validator{ 32 | 33 | static String loginRegex = "uid:\\d+"; 34 | static Pattern pattern = Pattern.compile(loginRegex); 35 | static Matcher matcher; 36 | 37 | // Simple JSF validator to make sure username starts with uid: and at least 1 number. 38 | public LoginValidator() { 39 | } 40 | 41 | @Override 42 | public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { 43 | if (Log.doTrace()) { 44 | Log.trace("LoginValidator.validate","Validating submitted login name -- " + value.toString()); 45 | } 46 | matcher = pattern.matcher(value.toString()); 47 | 48 | if (!matcher.matches()) { 49 | FacesMessage msg = new FacesMessage("Username validation failed. Please provide username in this format: uid:#"); 50 | msg.setSeverity(FacesMessage.SEVERITY_ERROR); 51 | 52 | throw new ValidatorException(msg); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/jsf/TradeActionProducer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.jsf; 17 | 18 | import javax.enterprise.context.RequestScoped; 19 | import javax.enterprise.inject.Produces; 20 | 21 | import com.ibm.websphere.samples.daytrader.TradeAction; 22 | 23 | public class TradeActionProducer { 24 | @Produces 25 | @RequestScoped 26 | public TradeAction produceTradeAction() { 27 | return new TradeAction(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2016. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | /** 19 | * Simple bean to get and set messages 20 | */ 21 | 22 | public class PingBean { 23 | 24 | private String msg; 25 | 26 | /** 27 | * returns the message contained in the bean 28 | * 29 | * @return message String 30 | **/ 31 | public String getMsg() { 32 | return msg; 33 | } 34 | 35 | /** 36 | * sets the message contained in the bean param message String 37 | **/ 38 | public void setMsg(String s) { 39 | msg = s; 40 | } 41 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingCDIBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.util.Set; 19 | 20 | import javax.enterprise.context.RequestScoped; 21 | import javax.enterprise.inject.spi.Bean; 22 | import javax.enterprise.inject.spi.BeanManager; 23 | import javax.enterprise.inject.spi.CDI; 24 | import javax.naming.InitialContext; 25 | 26 | @RequestScoped 27 | @PingInterceptorBinding 28 | public class PingCDIBean { 29 | 30 | private static int helloHitCount = 0; 31 | private static int getBeanManagerHitCountJNDI = 0; 32 | private static int getBeanManagerHitCountSPI = 0; 33 | 34 | 35 | public int hello() { 36 | return ++helloHitCount; 37 | } 38 | 39 | public int getBeanMangerViaJNDI() throws Exception { 40 | BeanManager beanManager = (BeanManager) new InitialContext().lookup("java:comp/BeanManager"); 41 | Set> beans = beanManager.getBeans(Object.class); 42 | if (beans.size() > 0) { 43 | return ++getBeanManagerHitCountJNDI; 44 | } 45 | return 0; 46 | 47 | } 48 | 49 | public int getBeanMangerViaCDICurrent() throws Exception { 50 | BeanManager beanManager = CDI.current().getBeanManager(); 51 | Set> beans = beanManager.getBeans(Object.class); 52 | 53 | if (beans.size() > 0) { 54 | return ++getBeanManagerHitCountSPI; 55 | } 56 | return 0; 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingCDIJSFBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2016. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.Serializable; 19 | 20 | import javax.enterprise.context.SessionScoped; 21 | import javax.inject.Named; 22 | 23 | @Named 24 | @SessionScoped 25 | public class PingCDIJSFBean implements Serializable { 26 | 27 | private static final long serialVersionUID = -7475815494313679416L; 28 | private int hitCount = 0; 29 | 30 | public int getHitCount() { 31 | return ++hitCount; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingEJBIFace.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2016. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | /** 19 | * EJB interface 20 | */ 21 | public interface PingEJBIFace { 22 | 23 | public String getMsg(); 24 | } 25 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingEJBLocal.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import javax.ejb.Local; 19 | import javax.ejb.Stateful; 20 | 21 | /** 22 | * 23 | */ 24 | @Stateful 25 | @Local 26 | public class PingEJBLocal implements PingEJBIFace { 27 | 28 | private static int hitCount; 29 | 30 | /* 31 | * (non-Javadoc) 32 | * 33 | * @see com.ibm.websphere.samples.daytrader.web.prims.EJBIFace#getMsg() 34 | */ 35 | @Override 36 | public String getMsg() { 37 | 38 | return "PingEJBLocal: " + hitCount++; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingEJBLocalDecorator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import javax.annotation.Priority; 19 | import javax.decorator.Decorator; 20 | import javax.decorator.Delegate; 21 | import javax.inject.Inject; 22 | import javax.interceptor.Interceptor; 23 | 24 | @Decorator 25 | @Priority(Interceptor.Priority.APPLICATION) 26 | public class PingEJBLocalDecorator implements PingEJBIFace { 27 | 28 | /* 29 | * (non-Javadoc) 30 | * 31 | * @see com.ibm.websphere.samples.daytrader.web.prims.EJBIFace#getMsg() 32 | */ 33 | @Delegate 34 | @Inject 35 | PingEJBIFace ejb; 36 | 37 | @Override 38 | public String getMsg() { 39 | 40 | return "Decorated " + ejb.getMsg(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingInterceptor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.Serializable; 19 | 20 | import javax.annotation.Priority; 21 | import javax.interceptor.AroundInvoke; 22 | import javax.interceptor.Interceptor; 23 | import javax.interceptor.InvocationContext; 24 | 25 | /** 26 | * 27 | */ 28 | @PingInterceptorBinding 29 | @Interceptor 30 | @Priority(Interceptor.Priority.APPLICATION) 31 | public class PingInterceptor implements Serializable { 32 | 33 | /** */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | @AroundInvoke 37 | public Object methodInterceptor(InvocationContext ctx) throws Exception { 38 | 39 | //noop 40 | return ctx.proceed(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingInterceptorBinding.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | import javax.interceptor.InterceptorBinding; 24 | 25 | /** 26 | * 27 | */ 28 | @InterceptorBinding 29 | @Target({ ElementType.TYPE, ElementType.CONSTRUCTOR }) 30 | @Retention(RetentionPolicy.RUNTIME) 31 | public @interface PingInterceptorBinding { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServlet2IncludeRcv.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.ServletException; 21 | import javax.servlet.annotation.WebServlet; 22 | import javax.servlet.http.HttpServlet; 23 | import javax.servlet.http.HttpServletRequest; 24 | import javax.servlet.http.HttpServletResponse; 25 | 26 | /** 27 | * 28 | * PingServlet2Include tests servlet to servlet request dispatching. Servlet 1, 29 | * the controller, creates a new JavaBean object forwards the servlet request 30 | * with the JavaBean added to Servlet 2. Servlet 2 obtains access to the 31 | * JavaBean through the Servlet request object and provides the dynamic HTML 32 | * output based on the JavaBean data. PingServlet2Servlet is the initial servlet 33 | * that sends a request to {@link PingServlet2ServletRcv} 34 | * 35 | */ 36 | @WebServlet(name = "PingServlet2IncludeRcv", urlPatterns = { "/servlet/PingServlet2IncludeRcv" }) 37 | public class PingServlet2IncludeRcv extends HttpServlet { 38 | 39 | private static final long serialVersionUID = 2628801298561220872L; 40 | 41 | /** 42 | * forwards post requests to the doGet method Creation date: (11/6/2000 43 | * 10:52:39 AM) 44 | * 45 | * @param res 46 | * javax.servlet.http.HttpServletRequest 47 | * @param res2 48 | * javax.servlet.http.HttpServletResponse 49 | */ 50 | @Override 51 | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 52 | doGet(req, res); 53 | } 54 | 55 | /** 56 | * this is the main method of the servlet that will service all get 57 | * requests. 58 | * 59 | * @param request 60 | * HttpServletRequest 61 | * @param responce 62 | * HttpServletResponce 63 | **/ 64 | @Override 65 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 66 | // do nothing but get included by PingServlet2Include 67 | } 68 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServlet2Jsp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.ServletException; 21 | import javax.servlet.annotation.WebServlet; 22 | import javax.servlet.http.HttpServlet; 23 | import javax.servlet.http.HttpServletRequest; 24 | import javax.servlet.http.HttpServletResponse; 25 | 26 | import com.ibm.websphere.samples.daytrader.util.Log; 27 | 28 | /** 29 | * 30 | * PingServlet2JSP tests a call from a servlet to a JavaServer Page providing 31 | * server-side dynamic HTML through JSP scripting. 32 | * 33 | */ 34 | @WebServlet(name = "PingServlet2Jsp", urlPatterns = { "/servlet/PingServlet2Jsp" }) 35 | public class PingServlet2Jsp extends HttpServlet { 36 | private static final long serialVersionUID = -5199543766883932389L; 37 | private static int hitCount = 0; 38 | 39 | /** 40 | * forwards post requests to the doGet method Creation date: (11/6/2000 41 | * 10:52:39 AM) 42 | * 43 | * @param res 44 | * javax.servlet.http.HttpServletRequest 45 | * @param res2 46 | * javax.servlet.http.HttpServletResponse 47 | */ 48 | @Override 49 | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 50 | doGet(req, res); 51 | } 52 | 53 | /** 54 | * this is the main method of the servlet that will service all get 55 | * requests. 56 | * 57 | * @param request 58 | * HttpServletRequest 59 | * @param responce 60 | * HttpServletResponce 61 | **/ 62 | @Override 63 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 64 | PingBean ab; 65 | try { 66 | ab = new PingBean(); 67 | hitCount++; 68 | ab.setMsg("Hit Count: " + hitCount); 69 | req.setAttribute("ab", ab); 70 | 71 | getServletConfig().getServletContext().getRequestDispatcher("/PingServlet2Jsp.jsp").forward(req, res); 72 | } catch (Exception ex) { 73 | Log.error(ex, "PingServlet2Jsp.doGet(...): request error"); 74 | res.sendError(500, "PingServlet2Jsp.doGet(...): request error" + ex.toString()); 75 | 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServlet2Servlet.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.ServletException; 21 | import javax.servlet.annotation.WebServlet; 22 | import javax.servlet.http.HttpServlet; 23 | import javax.servlet.http.HttpServletRequest; 24 | import javax.servlet.http.HttpServletResponse; 25 | 26 | import com.ibm.websphere.samples.daytrader.util.Log; 27 | 28 | /** 29 | * 30 | * PingServlet2Servlet tests servlet to servlet request dispatching. Servlet 1, 31 | * the controller, creates a new JavaBean object forwards the servlet request 32 | * with the JavaBean added to Servlet 2. Servlet 2 obtains access to the 33 | * JavaBean through the Servlet request object and provides the dynamic HTML 34 | * output based on the JavaBean data. PingServlet2Servlet is the initial servlet 35 | * that sends a request to {@link PingServlet2ServletRcv} 36 | * 37 | */ 38 | @WebServlet(name = "PingServlet2Servlet", urlPatterns = { "/servlet/PingServlet2Servlet" }) 39 | public class PingServlet2Servlet extends HttpServlet { 40 | private static final long serialVersionUID = -955942781902636048L; 41 | private static int hitCount = 0; 42 | 43 | /** 44 | * forwards post requests to the doGet method Creation date: (11/6/2000 45 | * 10:52:39 AM) 46 | * 47 | * @param res 48 | * javax.servlet.http.HttpServletRequest 49 | * @param res2 50 | * javax.servlet.http.HttpServletResponse 51 | */ 52 | @Override 53 | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 54 | doGet(req, res); 55 | } 56 | 57 | /** 58 | * this is the main method of the servlet that will service all get 59 | * requests. 60 | * 61 | * @param request 62 | * HttpServletRequest 63 | * @param responce 64 | * HttpServletResponce 65 | **/ 66 | @Override 67 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 68 | PingBean ab; 69 | try { 70 | ab = new PingBean(); 71 | hitCount++; 72 | ab.setMsg("Hit Count: " + hitCount); 73 | req.setAttribute("ab", ab); 74 | 75 | getServletConfig().getServletContext().getRequestDispatcher("/servlet/PingServlet2ServletRcv").forward(req, res); 76 | } catch (Exception ex) { 77 | Log.error(ex, "PingServlet2Servlet.doGet(...): general exception"); 78 | res.sendError(500, "PingServlet2Servlet.doGet(...): general exception" + ex.toString()); 79 | 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServletCDI.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | import java.io.PrintWriter; 20 | 21 | import javax.ejb.EJB; 22 | import javax.inject.Inject; 23 | import javax.servlet.ServletConfig; 24 | import javax.servlet.ServletException; 25 | import javax.servlet.annotation.WebServlet; 26 | import javax.servlet.http.HttpServlet; 27 | import javax.servlet.http.HttpServletRequest; 28 | import javax.servlet.http.HttpServletResponse; 29 | 30 | import com.ibm.websphere.samples.daytrader.web.prims.PingCDIBean; 31 | 32 | @WebServlet("/servlet/PingServletCDI") 33 | public class PingServletCDI extends HttpServlet { 34 | 35 | private static final long serialVersionUID = -1803544618879689949L; 36 | private static String initTime; 37 | 38 | @Inject 39 | PingCDIBean cdiBean; 40 | 41 | @EJB 42 | PingEJBIFace ejb; 43 | 44 | @Override 45 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { 46 | 47 | PrintWriter pw = response.getWriter(); 48 | pw.write("Ping Servlet CDI" 49 | + "

Ping Servlet CDI
Init time : " + initTime 50 | + "

"); 51 | 52 | pw.write("hitCount: " + cdiBean.hello() + "
"); 53 | pw.write("hitCount: " + ejb.getMsg() + "
"); 54 | 55 | pw.flush(); 56 | pw.close(); 57 | 58 | } 59 | 60 | /** 61 | * called when the class is loaded to initialize the servlet 62 | * 63 | * @param config 64 | * ServletConfig: 65 | **/ 66 | @Override 67 | public void init(ServletConfig config) throws ServletException { 68 | super.init(config); 69 | initTime = new java.util.Date().toString(); 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServletCDIBeanManagerViaCDICurrent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | import java.io.PrintWriter; 20 | 21 | import javax.inject.Inject; 22 | import javax.servlet.ServletConfig; 23 | import javax.servlet.ServletException; 24 | import javax.servlet.annotation.WebServlet; 25 | import javax.servlet.http.HttpServlet; 26 | import javax.servlet.http.HttpServletRequest; 27 | import javax.servlet.http.HttpServletResponse; 28 | 29 | import com.ibm.websphere.samples.daytrader.web.prims.PingCDIBean; 30 | 31 | @WebServlet("/servlet/PingServletCDIBeanManagerViaCDICurrent") 32 | public class PingServletCDIBeanManagerViaCDICurrent extends HttpServlet { 33 | 34 | private static final long serialVersionUID = -1803544618879689949L; 35 | private static String initTime; 36 | 37 | @Inject 38 | PingCDIBean cdiBean; 39 | 40 | 41 | 42 | @Override 43 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { 44 | 45 | PrintWriter pw = response.getWriter(); 46 | pw.write("Ping Servlet CDI Bean Manager" 47 | + "

Ping Servlet CDI Bean Manager
Init time : " + initTime 48 | + "

"); 49 | 50 | try { 51 | pw.write("hitCount: " + cdiBean.getBeanMangerViaCDICurrent() + ""); 52 | } catch (Exception e) { 53 | e.printStackTrace(); 54 | } 55 | 56 | pw.flush(); 57 | pw.close(); 58 | 59 | } 60 | 61 | /** 62 | * called when the class is loaded to initialize the servlet 63 | * 64 | * @param config 65 | * ServletConfig: 66 | **/ 67 | @Override 68 | public void init(ServletConfig config) throws ServletException { 69 | super.init(config); 70 | initTime = new java.util.Date().toString(); 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServletCDIBeanManagerViaJNDI.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | import java.io.PrintWriter; 20 | 21 | import javax.inject.Inject; 22 | import javax.servlet.ServletConfig; 23 | import javax.servlet.ServletException; 24 | import javax.servlet.annotation.WebServlet; 25 | import javax.servlet.http.HttpServlet; 26 | import javax.servlet.http.HttpServletRequest; 27 | import javax.servlet.http.HttpServletResponse; 28 | 29 | import com.ibm.websphere.samples.daytrader.web.prims.PingCDIBean; 30 | 31 | @WebServlet("/servlet/PingServletCDIBeanManagerViaJNDI") 32 | public class PingServletCDIBeanManagerViaJNDI extends HttpServlet { 33 | 34 | private static final long serialVersionUID = -1803544618879689949L; 35 | private static String initTime; 36 | 37 | @Inject 38 | PingCDIBean cdiBean; 39 | 40 | 41 | 42 | @Override 43 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { 44 | 45 | PrintWriter pw = response.getWriter(); 46 | pw.write("Ping Servlet CDI Bean Manager" 47 | + "

Ping Servlet CDI Bean Manager
Init time : " + initTime 48 | + "

"); 49 | 50 | try { 51 | pw.write("hitCount: " + cdiBean.getBeanMangerViaJNDI() + ""); 52 | } catch (Exception e) { 53 | e.printStackTrace(); 54 | } 55 | 56 | pw.flush(); 57 | pw.close(); 58 | 59 | } 60 | 61 | /** 62 | * called when the class is loaded to initialize the servlet 63 | * 64 | * @param config 65 | * ServletConfig: 66 | **/ 67 | @Override 68 | public void init(ServletConfig config) throws ServletException { 69 | super.init(config); 70 | initTime = new java.util.Date().toString(); 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServletLargeContentLength.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | 20 | import javax.servlet.ServletConfig; 21 | import javax.servlet.ServletException; 22 | import javax.servlet.annotation.WebServlet; 23 | import javax.servlet.http.HttpServlet; 24 | import javax.servlet.http.HttpServletRequest; 25 | import javax.servlet.http.HttpServletResponse; 26 | 27 | /** 28 | * 29 | * PingServletSetContentLength tests fundamental dynamic HTML creation 30 | * functionality through server side servlet processing. 31 | * 32 | */ 33 | 34 | @WebServlet(name = "PingServletLargeContentLength", urlPatterns = { "/servlet/PingServletLargeContentLength" }) 35 | public class PingServletLargeContentLength extends HttpServlet { 36 | 37 | 38 | 39 | /** 40 | * 41 | */ 42 | private static final long serialVersionUID = -7979576220528252408L; 43 | 44 | /** 45 | * forwards post requests to the doGet method Creation date: (02/07/2013 46 | * 10:52:39 AM) 47 | * 48 | * @param res 49 | * javax.servlet.http.HttpServletRequest 50 | * @param res2 51 | * javax.servlet.http.HttpServletResponse 52 | */ 53 | @Override 54 | public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 55 | System.out.println("Length: " + req.getContentLengthLong()); 56 | 57 | 58 | 59 | 60 | } 61 | 62 | /** 63 | * this is the main method of the servlet that will service all get 64 | * requests. 65 | * 66 | * @param request 67 | * HttpServletRequest 68 | * @param responce 69 | * HttpServletResponce 70 | **/ 71 | @Override 72 | public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { 73 | doPost(req,res); } 74 | 75 | /** 76 | * returns a string of information about the servlet 77 | * 78 | * @return info String: contains info about the servlet 79 | **/ 80 | @Override 81 | public String getServletInfo() { 82 | return "Basic dynamic HTML generation through a servlet, with " + "contentLength set by contentLength parameter."; 83 | } 84 | 85 | /** 86 | * called when the class is loaded to initialize the servlet 87 | * 88 | * @param config 89 | * ServletConfig: 90 | **/ 91 | @Override 92 | public void init(ServletConfig config) throws ServletException { 93 | super.init(config); 94 | } 95 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingSession3Object.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.Serializable; 19 | 20 | /** 21 | * 22 | * An object that contains approximately 1024 bits of information. This is used 23 | * by {@link PingSession3} 24 | * 25 | */ 26 | public class PingSession3Object implements Serializable { 27 | // PingSession3Object represents a BLOB of session data of various. 28 | // Each instantiation of this class is approximately 1K in size (not 29 | // including overhead for arrays and Strings) 30 | // Using different datatype exercises the various serialization algorithms 31 | // for each type 32 | 33 | private static final long serialVersionUID = 1452347702903504717L; 34 | byte[] byteVal = new byte[16]; // 8 * 16 = 128 bits 35 | char[] charVal = new char[8]; // 16 * 8 = 128 bits 36 | int a, b, c, d; // 4 * 32 = 128 bits 37 | float e, f, g, h; // 4 * 32 = 128 bits 38 | double i, j; // 2 * 64 = 128 bits 39 | // Primitive type size = ~5*128= 640 40 | 41 | String s1 = new String("123456789012"); 42 | String s2 = new String("abcdefghijkl"); 43 | 44 | // String type size = ~2*12*16 = 384 45 | // Total blob size (w/o overhead) = 1024 46 | 47 | // The Session blob must be filled with data to avoid compression of the 48 | // blob during serialization 49 | PingSession3Object() { 50 | int index; 51 | byte b = 0x8; 52 | for (index = 0; index < 16; index++) { 53 | byteVal[index] = (byte) (b + 2); 54 | } 55 | 56 | char c = 'a'; 57 | for (index = 0; index < 8; index++) { 58 | charVal[index] = (char) (c + 2); 59 | } 60 | 61 | a = 1; 62 | b = 2; 63 | c = 3; 64 | d = 5; 65 | e = (float) 7.0; 66 | f = (float) 11.0; 67 | g = (float) 13.0; 68 | h = (float) 17.0; 69 | i = 19.0; 70 | j = 23.0; 71 | } 72 | /** 73 | * Main method to test the serialization of the Session Data blob object 74 | * Creation date: (4/3/2000 3:07:34 PM) 75 | * 76 | * @param args 77 | * java.lang.String[] 78 | */ 79 | 80 | /** 81 | * Since the following main method were written for testing purpose, we 82 | * comment them out public static void main(String[] args) { try { 83 | * PingSession3Object data = new PingSession3Object(); 84 | * 85 | * FileOutputStream ostream = new 86 | * FileOutputStream("c:\\temp\\datablob.xxx"); ObjectOutputStream p = new 87 | * ObjectOutputStream(ostream); p.writeObject(data); p.flush(); 88 | * ostream.close(); } catch (Exception e) { System.out.println("Exception: " 89 | * + e.toString()); } } 90 | */ 91 | 92 | } -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingWebSocketBinary.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.ibm.websphere.samples.daytrader.web.prims; 18 | 19 | import java.io.IOException; 20 | import java.nio.ByteBuffer; 21 | 22 | import javax.websocket.CloseReason; 23 | import javax.websocket.EndpointConfig; 24 | import javax.websocket.OnClose; 25 | import javax.websocket.OnError; 26 | import javax.websocket.OnMessage; 27 | import javax.websocket.OnOpen; 28 | import javax.websocket.Session; 29 | import javax.websocket.server.ServerEndpoint; 30 | 31 | /** This class a simple websocket that echos the binary it has been sent. */ 32 | 33 | @ServerEndpoint(value = "/pingBinary") 34 | public class PingWebSocketBinary { 35 | 36 | private Session currentSession = null; 37 | 38 | @OnOpen 39 | public void onOpen(final Session session, EndpointConfig ec) { 40 | currentSession = session; 41 | } 42 | 43 | @OnMessage 44 | public void ping(ByteBuffer data) { 45 | currentSession.getAsyncRemote().sendBinary(data); 46 | } 47 | 48 | @OnError 49 | public void onError(Throwable t) { 50 | t.printStackTrace(); 51 | } 52 | 53 | @OnClose 54 | public void onClose(Session session, CloseReason reason) { 55 | 56 | try { 57 | if (session.isOpen()) { 58 | session.close(); 59 | } 60 | } catch (IOException e) { 61 | e.printStackTrace(); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingWebSocketTextAsync.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import javax.websocket.CloseReason; 19 | import javax.websocket.EndpointConfig; 20 | import javax.websocket.OnClose; 21 | import javax.websocket.OnError; 22 | import javax.websocket.OnMessage; 23 | import javax.websocket.OnOpen; 24 | import javax.websocket.Session; 25 | import javax.websocket.server.ServerEndpoint; 26 | 27 | /** This class a simple websocket that sends the number of times it has been pinged. */ 28 | 29 | @ServerEndpoint(value = "/pingTextAsync") 30 | public class PingWebSocketTextAsync { 31 | 32 | private Session currentSession = null; 33 | private Integer hitCount = null; 34 | 35 | @OnOpen 36 | public void onOpen(final Session session, EndpointConfig ec) { 37 | currentSession = session; 38 | hitCount = 0; 39 | } 40 | 41 | @OnMessage 42 | public void ping(String text) { 43 | 44 | hitCount++; 45 | currentSession.getAsyncRemote().sendText(hitCount.toString()); 46 | } 47 | 48 | @OnError 49 | public void onError(Throwable t) { 50 | t.printStackTrace(); 51 | } 52 | 53 | @OnClose 54 | public void onClose(Session session, CloseReason reason) { 55 | 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingWebSocketTextSync.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.prims; 17 | 18 | import java.io.IOException; 19 | //import java.util.Collections; 20 | //import java.util.HashSet; 21 | //import java.util.Set; 22 | 23 | import javax.websocket.CloseReason; 24 | import javax.websocket.EndpointConfig; 25 | import javax.websocket.OnClose; 26 | import javax.websocket.OnError; 27 | import javax.websocket.OnMessage; 28 | import javax.websocket.OnOpen; 29 | import javax.websocket.Session; 30 | import javax.websocket.server.ServerEndpoint; 31 | 32 | /** This class a simple websocket that sends the number of times it has been pinged. */ 33 | 34 | @ServerEndpoint(value = "/pingTextSync") 35 | public class PingWebSocketTextSync { 36 | 37 | private Session currentSession = null; 38 | private Integer hitCount = null; 39 | 40 | @OnOpen 41 | public void onOpen(final Session session, EndpointConfig ec) { 42 | currentSession = session; 43 | hitCount = 0; 44 | } 45 | 46 | @OnMessage 47 | public void ping(String text) { 48 | hitCount++; 49 | 50 | try { 51 | currentSession.getBasicRemote().sendText(hitCount.toString()); 52 | } catch (IOException e) { 53 | e.printStackTrace(); 54 | } 55 | } 56 | 57 | @OnError 58 | public void onError(Throwable t) { 59 | t.printStackTrace(); 60 | } 61 | 62 | @OnClose 63 | public void onClose(Session session, CloseReason reason) { 64 | 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/ActionDecoder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | import javax.websocket.DecodeException; 19 | import javax.websocket.Decoder; 20 | import javax.websocket.EndpointConfig; 21 | 22 | import com.ibm.websphere.samples.daytrader.util.Log; 23 | 24 | // This is coded to be a Text type decoder expecting JSON format. 25 | // It will decode incoming messages into object of type String 26 | public class ActionDecoder implements Decoder.Text { 27 | 28 | public ActionDecoder() { 29 | } 30 | 31 | @Override 32 | public void destroy() { 33 | } 34 | 35 | @Override 36 | public void init(EndpointConfig config) { 37 | } 38 | 39 | @Override 40 | public ActionMessage decode(String jsonText) throws DecodeException { 41 | 42 | if (Log.doTrace()) { 43 | Log.trace("ActionDecoder:decode -- received -->" + jsonText + "<--"); 44 | } 45 | 46 | ActionMessage actionMessage = new ActionMessage(); 47 | actionMessage.doDecoding(jsonText); 48 | return actionMessage; 49 | 50 | } 51 | 52 | @Override 53 | public boolean willDecode(String s) { 54 | return true; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/ActionMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | import java.io.StringReader; 19 | 20 | import javax.json.Json; 21 | import javax.json.stream.JsonParser; 22 | 23 | import com.ibm.websphere.samples.daytrader.util.Log; 24 | 25 | /** 26 | * Licensed to the Apache Software Foundation (ASF) under one or more 27 | * contributor license agreements. See the NOTICE file distributed with 28 | * this work for additional information regarding copyright ownership. 29 | * The ASF licenses this file to You under the Apache License, Version 2.0 30 | * (the "License"); you may not use this file except in compliance with 31 | * the License. You may obtain a copy of the License at 32 | * 33 | * http://www.apache.org/licenses/LICENSE-2.0 34 | * 35 | * Unless required by applicable law or agreed to in writing, software 36 | * distributed under the License is distributed on an "AS IS" BASIS, 37 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 38 | * See the License for the specific language governing permissions and 39 | * limitations under the License. 40 | */ 41 | public class ActionMessage { 42 | 43 | String decodedAction = null; 44 | 45 | public ActionMessage() { 46 | } 47 | 48 | public void doDecoding(String jsonText) { 49 | 50 | String keyName = null; 51 | try 52 | { 53 | // JSON parse 54 | JsonParser parser = Json.createParser(new StringReader(jsonText)); 55 | while (parser.hasNext()) { 56 | JsonParser.Event event = parser.next(); 57 | switch(event) { 58 | case KEY_NAME: 59 | keyName=parser.getString(); 60 | break; 61 | case VALUE_STRING: 62 | if (keyName != null && keyName.equals("action")) { 63 | decodedAction=parser.getString(); 64 | } 65 | break; 66 | default: 67 | break; 68 | } 69 | } 70 | } catch (Exception e) { 71 | Log.error("ActionMessage:doDecoding(" + jsonText + ") --> failed", e); 72 | } 73 | 74 | if (Log.doTrace()) { 75 | if (decodedAction != null ) { 76 | Log.trace("ActionMessage:doDecoding -- decoded action -->" + decodedAction + "<--"); 77 | } else { 78 | Log.trace("ActionMessage:doDecoding -- decoded action -->null<--"); 79 | } 80 | } 81 | 82 | } 83 | 84 | public String getDecodedAction() { 85 | return decodedAction; 86 | } 87 | 88 | } 89 | 90 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/JsonDecoder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | import java.io.StringReader; 19 | 20 | import javax.json.Json; 21 | import javax.json.JsonObject; 22 | import javax.websocket.DecodeException; 23 | import javax.websocket.Decoder; 24 | import javax.websocket.EndpointConfig; 25 | 26 | public class JsonDecoder implements Decoder.Text { 27 | 28 | @Override 29 | public void destroy() { 30 | } 31 | 32 | @Override 33 | public void init(EndpointConfig ec) { 34 | } 35 | 36 | @Override 37 | public JsonMessage decode(String json) throws DecodeException { 38 | JsonObject jsonObject = Json.createReader(new StringReader(json)).readObject(); 39 | 40 | JsonMessage message = new JsonMessage(); 41 | message.setKey(jsonObject.getString("key")); 42 | message.setValue(jsonObject.getString("value")); 43 | 44 | return message; 45 | } 46 | 47 | @Override 48 | public boolean willDecode(String json) { 49 | try { 50 | Json.createReader(new StringReader(json)).readObject(); 51 | return true; 52 | } catch (Exception e) { 53 | return false; 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/JsonEncoder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | import javax.json.Json; 19 | import javax.json.JsonObject; 20 | import javax.websocket.EncodeException; 21 | import javax.websocket.Encoder; 22 | import javax.websocket.EndpointConfig; 23 | 24 | public class JsonEncoder implements Encoder.Text{ 25 | 26 | @Override 27 | public void destroy() { 28 | } 29 | 30 | @Override 31 | public void init(EndpointConfig ec) { 32 | } 33 | 34 | @Override 35 | public String encode(JsonMessage message) throws EncodeException { 36 | 37 | JsonObject jsonObject = Json.createObjectBuilder() 38 | .add("key", message.getKey()) 39 | .add("value", message.getValue()).build(); 40 | 41 | return jsonObject.toString(); 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/JsonMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | public class JsonMessage { 19 | 20 | private String key; 21 | private String value; 22 | 23 | public String getKey() { 24 | return key; 25 | } 26 | 27 | public void setKey(String key) { 28 | this.key = key; 29 | } 30 | 31 | public String getValue() { 32 | return value; 33 | } 34 | 35 | public void setValue(String value) { 36 | this.value = value; 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/java/com/ibm/websphere/samples/daytrader/web/websocket/RecentStockChangeList.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.ibm.websphere.samples.daytrader.web.websocket; 17 | 18 | import java.math.BigDecimal; 19 | import java.math.RoundingMode; 20 | import java.util.Collections; 21 | import java.util.Iterator; 22 | import java.util.LinkedList; 23 | import java.util.List; 24 | 25 | import javax.jms.Message; 26 | import javax.json.Json; 27 | import javax.json.JsonObject; 28 | import javax.json.JsonObjectBuilder; 29 | 30 | 31 | /** This class is a holds the last 5 stock changes, used by the MarketSummary WebSocket 32 | * */ 33 | 34 | public class RecentStockChangeList { 35 | 36 | private static List stockChanges = Collections.synchronizedList(new LinkedList()); 37 | 38 | public static void addStockChange(Message message) { 39 | 40 | stockChanges.add(0, message); 41 | 42 | // Add stock, remove if needed 43 | if(stockChanges.size() > 5) { 44 | stockChanges.remove(5); 45 | } 46 | } 47 | 48 | public static JsonObject stockChangesInJSON() { 49 | 50 | JsonObjectBuilder jObjectBuilder = Json.createObjectBuilder(); 51 | 52 | try { 53 | int i = 1; 54 | 55 | List temp = new LinkedList(stockChanges); 56 | 57 | for (Iterator iterator = temp.iterator(); iterator.hasNext();) { 58 | Message message = iterator.next(); 59 | 60 | jObjectBuilder.add("change" + i + "_stock", message.getStringProperty("symbol")); 61 | jObjectBuilder.add("change" + i + "_price","$" + message.getStringProperty("price")); 62 | 63 | BigDecimal change = new BigDecimal(message.getStringProperty("price")).subtract(new BigDecimal(message.getStringProperty("oldPrice"))); 64 | change.setScale(2, RoundingMode.HALF_UP); 65 | 66 | jObjectBuilder.add("change" + i + "_change", change.toString()); 67 | 68 | i++; 69 | } 70 | } 71 | catch (Exception e) { 72 | e.printStackTrace(); 73 | } 74 | 75 | return jObjectBuilder.build(); 76 | } 77 | 78 | public static boolean isEmpty() { 79 | return stockChanges.isEmpty(); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.7.1 3 | Class-Path: daytrader-ee7-ejb.jar 4 | Created-By: 2.6 (IBM Corporation) 5 | 6 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingCDIJSF.xhtml: -------------------------------------------------------------------------------- 1 | 16 | 18 | 23 | 24 | 25 | DayTrader PingJSF 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Hit Count: #{pingCDIJSFBean.hitCount}
37 |
38 | 39 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingHtml.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | PingHTML.html 19 | 20 | 21 |
22 |

23 | PING HTML: 24 |

25 |

26 | Hello World 27 |

28 | 29 | 30 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingJsp.jsp: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | PingJsp 23 | 24 | 25 | <%!int hitCount = 0; 26 | String initTime = new java.util.Date().toString();%> 27 |
28 |
29 | PING JSP:
30 |
31 | Init time: <%=initTime%> 32 | <% 33 | hitCount++; 34 | %> 35 |

36 | Hit Count: <%=hitCount%> 37 |

38 | 39 | 40 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingServlet2Jsp.jsp: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | PingJsp 23 | 24 | 25 | <%!String initTime = (new java.util.Date()).toString();%> 26 | 29 |
30 |
Ping Servlet2JSP:
31 |
32 | Init time: <%=initTime%> 33 |
34 |
35 | Message from Servlet: 36 | <%= ab.getMsg() %> 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingWebSocketBinary.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | WebSocket Primitive - PingWebSocketBinary 20 | 21 | 22 | 23 | 83 | 84 |

85 |
86 | Ping WebSocket Binary
87 | Init time :
0


88 | Hit Count:
0

89 | 90 |
91 | 92 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingWebSocketTextAsync.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | WebSocket Primitive - PingWebSocketTextAsync 20 | 21 | 22 | 23 | 81 | 82 |

83 |
84 | Ping WebSocket Text Async
85 | Init time :
0


86 | Hit Count:
0

87 | 88 |
89 | 90 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/PingWebSocketTextSync.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | WebSocket Primitive - PingWebSocketTextSync 20 | 21 | 22 | 23 | 81 | 82 |

83 |
84 | Ping WebSocket Text Sync
85 | Init time :
0


86 | Hit Count:
0

87 | 88 |
89 | 90 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WAS_V7_64-bit_performance.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/WAS_V7_64-bit_performance.pdf -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/classes/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | DayTrader :: Web Application 7 | 8 | 9 | From: 'an unknown organization' 10 | - Unnamed - taglibs:standard:jar:1.1.1 taglibs:standard:jar:1.1.1 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/classes/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | 2 | DayTrader :: Web Application 3 | Copyright 2005-2010 Apache Software Foundation 4 | 5 | This product includes software developed at 6 | The Apache Software Foundation (http://www.apache.org/). 7 | 8 | 9 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 22 | 23 | 24 | 25 | jdbc/TradeDataSource 26 | 27 | com.ibm.websphere.samples.daytrader.entities.AccountDataBean 28 | com.ibm.websphere.samples.daytrader.entities.AccountProfileDataBean 29 | com.ibm.websphere.samples.daytrader.entities.HoldingDataBean 30 | com.ibm.websphere.samples.daytrader.entities.OrderDataBean 31 | com.ibm.websphere.samples.daytrader.entities.QuoteDataBean 32 | true 33 | NONE 34 | 35 | 36 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/classes/build.properties: -------------------------------------------------------------------------------- 1 | ## Licensed to the Apache Software Foundation (ASF) under one or more 2 | ## contributor license agreements. See the NOTICE file distributed with 3 | ## this work for additional information regarding copyright ownership. 4 | ## The ASF licenses this file to You under the Apache License, Version 2.0 5 | ## (the "License"); you may not use this file except in compliance with 6 | ## the License. You may obtain a copy of the License at 7 | ## 8 | ## http://www.apache.org/licenses/LICENSE-2.0 9 | ## 10 | ## Unless required by applicable law or agreed to in writing, software 11 | ## distributed under the License is distributed on an "AS IS" BASIS, 12 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ## See the License for the specific language governing permissions and 14 | ## limitations under the License. 15 | 16 | ejb_version=${pom.version} 17 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/ibm-web-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/WEB-INF/ibm-web-ext.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/displayQuote.jsp: -------------------------------------------------------------------------------- 1 | 16 | <%@ page 17 | import="java.math.BigDecimal,com.ibm.websphere.samples.daytrader.TradeServices,com.ibm.websphere.samples.daytrader.TradeAction,com.ibm.websphere.samples.daytrader.entities.QuoteDataBean,com.ibm.websphere.samples.daytrader.util.Log,com.ibm.websphere.samples.daytrader.util.FinancialUtils" 18 | session="true" isThreadSafe="true" isErrorPage="false"%> 19 | <% 20 | String symbol = request.getParameter("symbol"); 21 | TradeServices tAction = null; 22 | tAction = new TradeAction(); 23 | try { 24 | QuoteDataBean quoteData = tAction.getQuote(symbol); 25 | %> 26 | 27 | <%=FinancialUtils.printQuoteLink(quoteData.getSymbol())%> 28 | <%=quoteData.getCompanyName()%> 29 | <%=quoteData.getVolume()%> 30 | <%=quoteData.getLow() + " - " + quoteData.getHigh()%> 31 | <%=quoteData.getOpen()%> 32 | $ <%=quoteData.getPrice()%> 33 | <%=FinancialUtils.printGainHTML(new BigDecimal(quoteData.getChange()))%> 34 | <%=FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen()))%> 35 | 36 |
37 | 38 | 39 | 40 |
41 | 42 | 43 | 44 | <% 45 | } catch (Exception e) { 46 | Log.error("displayQuote.jsp exception. Check that symbol: " + symbol + " exists in the database.", e); 47 | } 48 | %> 49 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/docs/benchmarking.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | Benchmarking Details 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 32 | 33 | 34 |
30 |

Benchmarking

31 |
35 |
36 |

DayTrader provides two servlets to create a workload for benchmarking: TradeApp servlet and TradeScenario servlet. 37 | In either case, the load generation tool used to drive the Trade workload must provide cookie support to handle 38 | HTTP sessions.

39 |

TradeApp servlet provides the standard web interface and 40 | can be accessed with the Go Trade! link. Driving benchmark load using this 41 | interface requires a sophisticated web load 42 | generator that is capable of filling HTML 43 | forms and posting dynamic data.

44 |

TradeScenario servlet emulates a population of web users by generating 45 | a specific Trade operation for a randomly 46 | chosen user on each access to the URL. Test 47 | this servlet by clicking Trade Scenario and hit "Reload" on your browser to step through a Trade Scenario. 48 | To benchmark using this URL aim your favorite web load generator at the 49 | Trade Scenario URL and fire away.

50 |

There is a drawback to using the Trade Scenario 51 | servlet to drive the workload versus using a series of more complicated 52 | load scripts. As previously mentioned, the scenario 53 | servlet is responsible for managing clients and emulating user 54 | operations by dispatching simple client requests to complex Trade 55 | actions. This causes the application server to spend a large percentage 56 | of time performing work that would typically be handled by a client or 57 | a more complex load driver. Consequently, performance numbers are 58 | artificially deflated when using Trade Scenario servlet as compared to 59 | driving the workload directly.

60 | 61 | 62 |

Web Primitive Benchmarking

63 |

A set of automated Web Primitives is also provided. The web primitives leverage the DayTrader infrastructure to test specific features of the web application development environment. This provides basic workloads for servlets, JSPs, EJBs, MDBs and more. The Web Primitives are installed automatically with the daytrader configuration archive.
64 |

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/docs/documentation.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Technical Documentation 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 |
31 |

Technical Documentation

32 |
37 |
38 |
39 |

Documents below provide documentation on Trade application design, runtime 40 | characteristics and FAQs.

41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 59 | 60 | 61 | 62 | 63 |
Trade Technical OverviewProvides an overview of the Trade application design, configuration, and usage
Trade UML DiagramsUML diagrams showing application architecture
FAQFrequently Asked Questions
Runtime and Database
58 | Usage Characteristics
Details runtime characteristics and database operations
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/docs/tradeversion.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | DayTrader Version 18 | 19 | IBM WebSphere Application Server Samples - DayTrader 7 (Version 7.0.11) 20 |
Full EE 7 Spec Compliant 21 |
Date: 20150917 22 |
Contact: jdmcclur@us.ibm.com 23 | 24 | 25 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/footer.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | daytrader2_matts_mods 19 | 20 | 21 | 23 | 24 | 25 | 26 | 34 | 35 |
27 | 28 | 29 | 31 | 32 |
33 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/DayTraderHead_blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/DayTraderHead_blue.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/DayTraderHead_red.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/DayTraderHead_red.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/Thumbs.db -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/about.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/account.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/account.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/arrowdown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/arrowdown.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/arrowup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/arrowup.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/bottomRedBar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/bottomRedBar.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/configuration.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/configuration.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/dayTraderLogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/dayTraderLogo.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/daytrader_simple_arch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/daytrader_simple_arch.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/faq.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/faq.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/graph.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/graph.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/home.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/home.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/homeBanner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/homeBanner.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/line.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/logout.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/logout.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/lower_banner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/lower_banner.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/menuHome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/menuHome.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/nav_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/nav_bg.png -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/portfolio.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/portfolio.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/primitives.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/primitives.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/quotes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/quotes.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/reports.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/reports.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/spacer.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/ticker-anim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/ticker-anim.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/topRedBar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/topRedBar.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/topline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/topline.jpg -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/tradeOverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/tradeOverview.png -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/images/tradingAndPortfolios.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7-web/src/main/webapp/images/tradingAndPortfolios.gif -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | DayTrader 22 | 23 | 25 | 27 | 29 | 31 | 32 | <BODY> 33 | <P>Need browser which supports frames to see this page</P> 34 | </BODY> 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/leftMenu.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | Leftmenu 21 | 22 | 23 | 24 | 25 |
26 |

27 |
29 |
Overview
30 |

31 | 33 |

34 | Benchmarking 36 |

37 |

38 | Configuration 40 |

41 |

42 | Go Trade! 44 |

45 |

46 | Web Primitives 48 |

49 |
50 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/properties/daytrader.properties: -------------------------------------------------------------------------------- 1 | # (C) Copyright IBM Corporation 2015. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | runtimeMode=0 15 | useRemoteEJBInterface=false 16 | maxUsers=15000 17 | maxQuotes=10000 18 | publishQuotePriceChange=true 19 | percentSentToWebsocket=10 20 | displayOrderAlerts=true 21 | cachingType=1 22 | cacheSize=100000 23 | orderProcessingMode=0 24 | webInterface=0 25 | marketSummaryInterval=20 26 | primIterations=1 27 | longRun=true 28 | trace=false 29 | actionTrace=false -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/quoteDataPrimitive.jsp: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | Quote Data Primitive (PingServet2Session2Entity2JSP) 23 | 24 | 25 | <%@ page 26 | import="com.ibm.websphere.samples.daytrader.entities.QuoteDataBean,com.ibm.websphere.samples.daytrader.util.FinancialUtils" 27 | session="false" isThreadSafe="true" isErrorPage="false"%> 28 | <%!int hitCount = 0; 29 | String initTime = new java.util.Date().toString();%> 30 | <% 31 | QuoteDataBean quoteData = (QuoteDataBean) request.getAttribute("quoteData"); 32 | %> 33 |
34 |
35 | Quote Data Primitive 36 | (PingServlet2Session2EntityJSP):
37 |
38 | Init time: <%=initTime%> 39 | <% 40 | hitCount++; 41 | %> 42 |

43 | Hit Count: <%=hitCount%> 44 |

45 |
46 | Quote Information 47 |
48 |
<%=quoteData.toHTML()%> 49 | 50 | 51 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/sample.jsp: -------------------------------------------------------------------------------- 1 | 16 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 17 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 18 | <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> 19 | <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%> 20 | 21 | 22 | 23 | Hello world JSP on 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /daytrader-ee7-web/src/main/webapp/style.css: -------------------------------------------------------------------------------- 1 | /*====================================================================== 2 | * (C) Copyright IBM Corporation 2015. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | ======================================================================*/ 16 | tr th td body { 17 | font-size:12pt; 18 | } 19 | 20 | A:HOVER { 21 | text-decoration: underline; color: red; 22 | } 23 | 24 | A:ACTIVE { 25 | color: red; 26 | font-weight: bold 27 | } 28 | 29 | .table{ 30 | border-collapse:collapse; 31 | border:1px solid #000000; 32 | } 33 | 34 | .tableHeader{ 35 | text-align:center; 36 | background:none repeat scroll 0 0 #B5B5B5; 37 | border:1px solid #000000; 38 | padding:10px; 39 | font-size:12px; 40 | } 41 | 42 | .tableHeaderMarket{ 43 | text-align:center; 44 | background:none repeat scroll 0 0 #000000; 45 | border:1px solid #000000; 46 | padding:10px; 47 | font-size:14px; 48 | } 49 | 50 | .tableOddRow{ 51 | text-align:center; 52 | font-size:12px; 53 | font-weight: none; 54 | border:1px solid #000000; 55 | background:none repeat scroll 0 0 #FFFFFF; 56 | } 57 | 58 | .tableEvenRow{ 59 | text-align:center; 60 | font-size:12px; 61 | font-weight: none; 62 | border:1px solid #000000; 63 | background:none repeat scroll 0 0 #D3D3D3; 64 | } 65 | .tableColumn{ 66 | border:1px solid #000000; 67 | } 68 | 69 | .tableHeader 70 | { 71 | background:none repeat scroll 0 0 #FFFFFF; 72 | border-collapse: collapse; 73 | border-spacing: 0px; 74 | } 75 | .tableHeader td 76 | { 77 | padding: 0px 0px; 78 | } 79 | .tableHeader tr 80 | { 81 | padding: 0px 0px; 82 | } -------------------------------------------------------------------------------- /daytrader-ee7/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /build/ 3 | /bin/ 4 | .classpath 5 | .project 6 | /.settings/ -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/README_DO_NOT_TOUCH_FILES.txt: -------------------------------------------------------------------------------- 1 | 2 | # ************************************************************************* 3 | # *** DO NOT TOUCH FILES IN THIS DIRECTORY! *** 4 | # *** FILES IN THIS DIRECTORY AND SUBDIRECTORIES CONSTITUTE A DERBY *** 5 | # *** DATABASE, WHICH INCLUDES THE DATA (USER AND SYSTEM) AND THE *** 6 | # *** FILES NECESSARY FOR DATABASE RECOVERY. *** 7 | # *** EDITING, ADDING, OR DELETING ANY OF THESE FILES MAY CAUSE DATA *** 8 | # *** CORRUPTION AND LEAVE THE DATABASE IN A NON-RECOVERABLE STATE. *** 9 | # ************************************************************************* -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/log/README_DO_NOT_TOUCH_FILES.txt: -------------------------------------------------------------------------------- 1 | 2 | # ************************************************************************* 3 | # *** DO NOT TOUCH FILES IN THIS DIRECTORY! *** 4 | # *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE RECOVERY *** 5 | # *** SYSTEM. EDITING, ADDING, OR DELETING FILES IN THIS DIRECTORY *** 6 | # *** WILL CAUSE THE DERBY RECOVERY SYSTEM TO FAIL, LEADING TO *** 7 | # *** NON-RECOVERABLE CORRUPT DATABASES. *** 8 | # ************************************************************************* -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/log/log.ctrl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/log/log.ctrl -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/log/log286.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/log/log286.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/log/logmirror.ctrl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/log/logmirror.ctrl -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/README_DO_NOT_TOUCH_FILES.txt: -------------------------------------------------------------------------------- 1 | 2 | # ************************************************************************* 3 | # *** DO NOT TOUCH FILES IN THIS DIRECTORY! *** 4 | # *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE TO STORE *** 5 | # *** USER AND SYSTEM DATA. EDITING, ADDING, OR DELETING FILES IN THIS *** 6 | # *** DIRECTORY WILL CORRUPT THE ASSOCIATED DERBY DATABASE AND MAKE *** 7 | # *** IT NON-RECOVERABLE. *** 8 | # ************************************************************************* -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c10.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c10.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c101.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c101.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c111.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c111.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c121.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c121.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c130.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c130.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c141.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c141.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c150.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c150.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c161.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c161.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c171.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c171.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c180.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c180.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c191.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c191.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1a1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1a1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1b1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1b1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1c0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1c0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1d1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1d1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1e0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1e0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c1f1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c1f1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c20.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c20.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c200.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c200.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c211.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c211.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c221.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c221.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c230.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c230.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c241.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c241.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c251.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c251.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c260.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c260.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c271.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c271.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c281.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c281.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c290.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c290.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2a1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2a1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2b1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2b1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2c1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2c1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2d0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2d0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2e1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2e1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c2f0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c2f0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c300.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c300.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c31.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c31.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c311.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c311.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c321.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c321.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c331.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c331.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c340.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c340.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c351.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c351.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c361.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c361.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c371.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c371.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c380.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c380.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c391.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c391.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3a1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3a1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3b1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3b1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3c0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3c0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3d1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3d1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3e1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3e1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c3f1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c3f1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c400.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c400.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c41.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c41.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c411.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c411.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c421.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c421.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c430.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c430.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c441.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c441.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c451.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c451.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c461.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c461.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c470.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c470.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c481.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c481.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c490.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c490.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4a1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4a1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4b0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4b0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4c1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4c1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4d0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4d0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4e1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4e1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c4f1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c4f1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c51.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c51.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c60.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c60.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c71.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c71.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c720.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c720.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c731.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c731.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c740.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c740.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c751.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c751.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c760.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c760.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c771.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c771.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c780.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c780.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c791.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c791.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7a0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7a0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7b1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7b1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7c0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7c0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7d1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7d1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7e1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7e1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c7f1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c7f1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c801.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c801.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c81.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c81.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c811.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c811.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c821.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c821.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/c90.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/c90.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/ca1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/ca1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/cb1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/cb1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/cc0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/cc0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/cd1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/cd1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/ce1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/ce1.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/seg0/cf0.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/daytrader-ee7/resources/data/tradedb/seg0/cf0.dat -------------------------------------------------------------------------------- /daytrader-ee7/resources/data/tradedb/service.properties: -------------------------------------------------------------------------------- 1 | #/Users/jdmcclur/git/sample.daytrader8/target/liberty/wlp/usr/shared/resources/data/tradedb 2 | # ******************************************************************** 3 | # *** Please do NOT edit this file. *** 4 | # *** CHANGING THE CONTENT OF THIS FILE MAY CAUSE DATA CORRUPTION. *** 5 | # ******************************************************************** 6 | #Fri Jan 11 09:46:30 CST 2019 7 | SysschemasIndex2Identifier=225 8 | SyscolumnsIdentifier=144 9 | SysconglomeratesIndex1Identifier=49 10 | SysconglomeratesIdentifier=32 11 | SyscolumnsIndex2Identifier=177 12 | SysschemasIndex1Identifier=209 13 | SysconglomeratesIndex3Identifier=81 14 | SystablesIndex2Identifier=129 15 | SyscolumnsIndex1Identifier=161 16 | derby.serviceProtocol=org.apache.derby.database.Database 17 | SysschemasIdentifier=192 18 | derby.storage.propertiesId=16 19 | SysconglomeratesIndex2Identifier=65 20 | derby.serviceLocale=en_US 21 | SystablesIdentifier=96 22 | SystablesIndex1Identifier=113 23 | #--- last line, don't put anything after this line --- 24 | -------------------------------------------------------------------------------- /daytrader-ee7/src/main/application/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | DayTrader :: Enterprise Application 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /daytrader-ee7/src/main/liberty/config/server.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ejb-3.2 4 | servlet-3.1 5 | jsf-2.2 6 | jpa-2.1 7 | mdb-3.2 8 | wasJmsServer-1.0 9 | wasJmsClient-2.0 10 | cdi-1.2 11 | websocket-1.1 12 | concurrent-1.0 13 | jsonp-1.0 14 | beanValidation-1.1 15 | localConnector-1.0 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /daytrader-ee7/src/main/liberty/config/server_db2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ejb-3.2 4 | servlet-3.1 5 | jsf-2.2 6 | jpa-2.1 7 | mdb-3.2 8 | wasJmsServer-1.0 9 | wasJmsClient-2.0 10 | cdi-1.2 11 | websocket-1.1 12 | concurrent-1.0 13 | jsonp-1.0 14 | beanValidation-1.1 15 | localConnector-1.0 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /daytrader-ee7/src/main/liberty/config/server_db2_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ejb-3.2 4 | servlet-3.1 5 | jsf-2.2 6 | jpa-2.1 7 | mdb-3.2 8 | wasJmsServer-1.0 9 | wasJmsClient-2.0 10 | cdi-1.2 11 | websocket-1.1 12 | concurrent-1.0 13 | jsonp-1.0 14 | beanValidation-1.1 15 | localConnector-1.0 16 | mpHealth-1.0 17 | transportSecurity-1.0 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /db2jars/db2jcc4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/sample.daytrader7/a17f2b02b3402a6f8eb2f21cf57c75c8a7783cd5/db2jars/db2jcc4.jar -------------------------------------------------------------------------------- /deploy/daytrader7-deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps.openliberty.io/v1 2 | kind: OpenLibertyApplication 3 | metadata: 4 | name: daytrader7 5 | annotations: 6 | argocd.argoproj.io/sync-wave: "3" 7 | spec: 8 | applicationImage: 'docker.io/dguinan/sample-daytrader7:latest' 9 | route: 10 | path: /daytrader 11 | expose: true 12 | service: 13 | portName: liveness-port 14 | port: 9443 15 | type: ClusterIP 16 | probes: 17 | startup: {} 18 | liveness: {} 19 | readiness: {} 20 | env: 21 | - name: tradeDbHost 22 | value: trade-db2 23 | - name: tradeDbPort 24 | value: "50000" 25 | - name: tradeDbName 26 | value: TRADEDB 27 | - name: dbUser 28 | value: db2inst1 29 | - name: dbPass 30 | valueFrom: 31 | secretKeyRef: 32 | name: db-credential 33 | key: dbpw 34 | pullPolicy: Always 35 | resources: 36 | requests: 37 | cpu: 500m 38 | memory: 1Gi 39 | limits: 40 | cpu: 500m 41 | memory: 2Gi 42 | -------------------------------------------------------------------------------- /deploy/db2-role-n-sa.yaml: -------------------------------------------------------------------------------- 1 | kind: ServiceAccount 2 | apiVersion: v1 3 | metadata: 4 | name: mysvcacct 5 | annotations: 6 | argocd.argoproj.io/sync-wave: "0" 7 | --- 8 | kind: RoleBinding 9 | apiVersion: rbac.authorization.k8s.io/v1 10 | metadata: 11 | name: 'system:openshift:scc:privileged' 12 | subjects: 13 | - kind: ServiceAccount 14 | name: default 15 | - kind: ServiceAccount 16 | name: mysvcacct 17 | roleRef: 18 | apiGroup: rbac.authorization.k8s.io 19 | kind: ClusterRole 20 | name: 'system:openshift:scc:privileged' 21 | -------------------------------------------------------------------------------- /deploy/db2-secret.yaml: -------------------------------------------------------------------------------- 1 | kind: Secret 2 | apiVersion: v1 3 | metadata: 4 | name: db-credential 5 | annotations: 6 | argocd.argoproj.io/sync-wave: "1" 7 | data: 8 | dbpw: cGFzc3cwcmQ= 9 | type: Opaque 10 | -------------------------------------------------------------------------------- /deploy/tradedb-service.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: trade-db2 5 | annotations: 6 | argocd.argoproj.io/sync-wave: "2" 7 | labels: 8 | app: trade-db2 9 | spec: 10 | ports: 11 | - name: 50000-tcp 12 | protocol: TCP 13 | port: 50000 14 | targetPort: 50000 15 | selector: 16 | app: trade-db2 17 | deployment: trade-db2 18 | type: ClusterIP 19 | sessionAffinity: None 20 | -------------------------------------------------------------------------------- /deploy/tradedb.yaml: -------------------------------------------------------------------------------- 1 | kind: Deployment 2 | apiVersion: apps/v1 3 | metadata: 4 | name: trade-db2 5 | annotations: 6 | argocd.argoproj.io/sync-wave: "2" 7 | labels: 8 | app: trade-db2 9 | spec: 10 | replicas: 1 11 | selector: 12 | matchLabels: 13 | app: trade-db2 14 | deployment: trade-db2 15 | template: 16 | metadata: 17 | labels: 18 | app: trade-db2 19 | deployment: trade-db2 20 | spec: 21 | containers: 22 | - resources: {} 23 | terminationMessagePath: /dev/termination-log 24 | name: trade-db2 25 | env: 26 | - name: DB2INST1_PASSWORD 27 | valueFrom: 28 | secretKeyRef: 29 | name: db-credential 30 | key: dbpw 31 | - name: LICENSE 32 | value: accept 33 | securityContext: 34 | capabilities: 35 | privileged: true 36 | readOnlyRootFilesystem: false 37 | allowPrivilegeEscalation: true 38 | ports: 39 | - containerPort: 50000 40 | protocol: TCP 41 | imagePullPolicy: Always 42 | terminationMessagePolicy: File 43 | image: docker.io/tamdocker/trade7db:latest 44 | restartPolicy: Always 45 | terminationGracePeriodSeconds: 30 46 | dnsPolicy: ClusterFirst 47 | schedulerName: default-scheduler 48 | serviceAccountName: mysvcacct 49 | serviceAccount: mysvcacct 50 | -------------------------------------------------------------------------------- /docs/Downloading-WAS-Liberty.md: -------------------------------------------------------------------------------- 1 | There are lots of ways to get your hands on WAS Liberty. Note that you will need a version of Liberty that has support for JAX-RS 2.0, CDI 1.2, EJB Lite 3.2, and Concurrency Utilities for this sample (Java EE 7 Web Profile will do). 2 | 3 | To download just the WAS Liberty runtime, go to the [wasdev.net Downloads page][wasdev], and choose between the [latest version of the runtime][wasdev-latest] or the [latest beta][wasdev-beta]. You can also download Liberty via [Eclipse and WDT](/docs/Downloading-WAS-Liberty.md) 4 | 5 | There are a few options to choose from (especially for the beta drivers). Choose the one that is most appropriate. 6 | * There are convenience archives for downloading pre-defined content groupings 7 | * You can add additional features from the repository using the [installUtility][installUtility] or the [maven][maven-plugin]/[Gradle][gradle-plugin] plugins. 8 | 9 | [wasdev]: https://developer.ibm.com/wasdev/downloads/ 10 | [wasdev-latest]: https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/ 11 | [wasdev-beta]: https://developer.ibm.com/wasdev/downloads/liberty-profile-beta/ 12 | [installUtility]: http://www-01.ibm.com/support/knowledgecenter/#!/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_command_installutility.html 13 | [maven-plugin]: https://github.com/WASdev/ci.maven 14 | [gradle-plugin]: https://github.com/WASdev/ci.gradle 15 | 16 | ## Tips 17 | 18 | * If you use bash, consider trying the [command line tools](https://github.com/WASdev/util.bash.completion), which provide tab-completion for the server and other commands. 19 | -------------------------------------------------------------------------------- /docs/Starting-the-server.md: -------------------------------------------------------------------------------- 1 | You can use the [Gradle](#running-with-gradle) or [maven](#running-with-maven) to control and manipulate the server for use in automated builds to support continuous integration. 2 | 3 | ## Running with Gradle 4 | 5 | The [Gradle plugin](https://github.com/WASdev/ci.gradle) can manage the server using the following operations: 6 | 7 | * TODO: more here. I know, you're impatient. Stop gnashing your teeth at me. 8 | 9 | ## Running with maven 10 | 11 | The [maven plugin](https://github.com/WASdev/ci.maven) can manage the server using the following operations: 12 | 13 | * TODO: more here. I know, you're impatient. Stop gnashing your teeth at me. 14 | 15 | ## Additional Notes 16 | 17 | :star: *Note:* The maven target and Gradle clean task will clean server output (logs and workarea, etc) from the async-jaxrs-wlpcfg directory, however, if you wanted to maintain strict separation between what is checked into async-jaxrs-wlpcfg and what is generated by a running server, you could also specify the WLP_OUTPUT_DIR environment variable, e.g. into the maven target directory. 18 | 19 | ```bash 20 | $ export WLP_OUTPUT_DIR=${WLP_USER_DIR}/target 21 | ``` 22 | -------------------------------------------------------------------------------- /docs/Using-cmd-line.md: -------------------------------------------------------------------------------- 1 | ## Building and running the sample using the command line 2 | 3 | ### Clone Git Repo 4 | :pushpin: [Switch to Eclipse example](/docs/Using-WDT.md/#clone-git-repo) 5 | 6 | ```bash 7 | 8 | $ git clone https://github.com/WASdev/sample.daytrader7.git 9 | 10 | ``` 11 | 12 | ### Building the sample 13 | :pushpin: [Switch to Eclipse example](/docs/Using-WDT.md/#building-the-sample-in-eclipse) 14 | 15 | This sample can be built using either [Gradle](#gradle-commands) or [Maven](#apache-maven-commands). 16 | 17 | ###### [Gradle](http://gradle.org/) commands 18 | 19 | ```bash 20 | $ gradle build 21 | ``` 22 | 23 | If you want to also run the functional tests then you need to [Download WAS Liberty](/docs/Downloading-WAS-Liberty.md) and set the libertyRoot property in the gradle.properties file to point to your Liberty install. 24 | 25 | ###### [Apache Maven](http://maven.apache.org/) commands 26 | 27 | ```bash 28 | $ mvn install 29 | ``` 30 | 31 | If you want to also run the functional tests then you need to [Download WAS Liberty](/docs/Downloading-WAS-Liberty.md) and pass in the location of your install as the system property libertyRoot: 32 | 33 | ```bash 34 | $ mvn -DlibertyRoot= install 35 | ``` 36 | 37 | The built ear file is copied into the apps directory of the server configuration located in the daytrader-ee7-wlpcfg directory: 38 | 39 | ```text 40 | daytrader-ee7-wlpcfg 41 | +- servers 42 | +- daytrader-ee7-wlpcfg <-- specific server configuration 43 | +- server.xml <-- server configuration 44 | +- apps <- directory for applications 45 | +- daytrader-ee7.ear <- sample application 46 | +- logs <- created by running the server locally 47 | +- workarea <- created by running the server locally 48 | ``` 49 | 50 | ### Running the application locally 51 | :pushpin: [Switch to Eclipse example](/docs/Using-WDT.md/#running-the-application-locally) 52 | 53 | Pre-requisite: [Download WAS Liberty](/docs/Downloading-WAS-Liberty.md) 54 | 55 | Use the following to start the server and run the application: 56 | 57 | ```bash 58 | $ export WLP_USER_DIR=/path/to/sample.daytrader7/daytrader-ee7-wlpcfg 59 | $ /path/to/wlp/bin/server start daytrader7Sample 60 | 61 | 1. Confirm web browser opens on "http://localhost:9082/daytrader/" or "http://localhost:9082/daytrader/index.faces" 62 | 2. In the web browser, Click on the configuration tab. 63 | 3. Click on '(Re)-create DayTrader Database Tables and Indexes' to create the database. 64 | 4. Click on '(Re)-populate DayTrader Database' to populate the database. 65 | 5. Restart the server-> . Now the application will be ready for use. 66 | $ /path/to/wlp/bin/server stop daytrader7Sample 67 | $ /path/to/wlp/bin/server start daytrader7Sample 68 | ``` 69 | 70 | * `start` runs the server in the background. Look in the logs directory for console.log to see what's going on, e.g. 71 | * `stop` stop the server in the background. Look in the logs directory for console.log to see what's going on, e.g. 72 | * `run` runs the server in the foreground. 73 | 74 | ```bash 75 | $ tail -f ${WLP_USER_DIR}/servers/daytrader7Sample/logs/console.log 76 | ``` 77 | 78 | -------------------------------------------------------------------------------- /jmeter_files/README.txt: -------------------------------------------------------------------------------- 1 | # (C) Copyright IBM Corporation 2015. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | daytrader7.jmx is an Apache JMeter script that may be used for running the DayTrader7 benchmark. 17 | daytrader7_mojarra.jmx is the same as daytrader7.jmx, but for use with Mojarra JSF implementations. 18 | 19 | Jmeter version 3.3 or later is highly recommended. 20 | To use the script, you will need to put the the WebSocket Sampler (and dependencies) from WebSocket Samplers by Peter Doornbosch into lib/ext. 21 | Use the Jmeter plugin manager or download via https://bitbucket.org/pjtr/jmeter-websocket-samplers. 22 | 23 | 24 | The script has the following options: 25 | -JHOST The name of the machine running the DayTrader Application. The default is localhost. 26 | -JPORT The HTTP port of the server running the DayTrader Application. The default is 9082. 27 | -JPROTOCOL The transport either http or https 28 | NOTE: The websocket plugin does not offer a variable substitution. See the WS note below. 29 | -JTHREADS The number of jmeter threads to start. The default is 50. 30 | -JRAMP The ramp up time for starting the threads. Set this to the same value as -JTHREADS for a smoother startup. The default is 0. 31 | -JDURATION The time (in seconds) to run jmeter. 32 | -JMAXTHINKTIME The time in milliseconds to wait between each call. The default is 0 ms 33 | -JSTOCKS The total amount of stocks/quotes in the database, minus one. The default is 9999, which assumes there are 10,000 stocks in the database. 34 | -JBOTUID The lowest user id. The default is 0. 35 | -JTOPUID The highest user id. The default is 14999, which assumes there are 15,000 users in the database. 36 | 37 | WS NOTE: To enable encrypted WebSocket, either open daytrader7.jmx using the GUI and enable WSS on the WS2 and WS1 calls, or edit the daytrader.jmx file and change the TLS prop to true. 38 | 39 | Example: ./jmeter -n -t daytrader7.jmx -JHOST=myserver -JPORT=9082 -JPROTOCOL=http -JMAXTHINKTIME=100 -JDURATION=300 40 | 41 | To see output every five seconds from JMeter, edit the following section in /bin/jmeter.properties 42 | 43 | #--------------------------------------------------------------------------- 44 | # Summariser - Generate Summary Results - configuration (mainly applies to non-GUI mode) 45 | #--------------------------------------------------------------------------- 46 | # 47 | # Define the following property to automatically start a summariser with that name 48 | # (applies to non-GUI mode only) 49 | summariser.name=summary 50 | # 51 | # interval between summaries (in seconds) default 30 seconds 52 | summariser.interval=5 53 | # 54 | # Write messages to log file 55 | summariser.log=true 56 | # 57 | # Write messages to System.out 58 | summariser.out=true 59 | -------------------------------------------------------------------------------- /jvm.container.options: -------------------------------------------------------------------------------- 1 | -verbose:gc 2 | -Xdump:heap 3 | -Xaggressive 4 | -Xverbosegclog:/logs/verbosegc.log,200,10000 5 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 5 | 4.0.0 6 | 7 | net.wasdev.wlp.sample 8 | daytrader7 9 | pom 10 | 1.0-SNAPSHOT 11 | WAS Liberty Sample - Java EE7 Benchmark Sample 12 | 13 | 14 | 15 | The Apache Software License, Version 2.0 16 | https://raw.github.com/WASdev/sample.daytrader7/master/LICENSE 17 | repo 18 | 19 | 20 | 21 | 22 | daytrader-ee7-ejb 23 | daytrader-ee7-web 24 | daytrader-ee7 25 | 26 | 27 | -------------------------------------------------------------------------------- /zos_db2_files/RUNSTAT.JCL: -------------------------------------------------------------------------------- 1 | //TDRUNSTA JOB MSGCLASS=H,MSGLEVEL=(1,1),REGION=0M,NOTIFY=&SYSUID. 2 | //* ----------------------- // 3 | //* DB2V11.JUN2915.SDSNEXIT 4 | //* RUNSTATS 5 | //* 6 | //STEP1 EXEC PGM=DSNUTILB,PARM='DB94,STAA1',DYNAMNBR=25 7 | //STEPLIB DD DISP=SHR,DSN=DB2V11.JUN2915.SDSNEXIT 8 | //SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(600,50)) 9 | //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(600,50)) 10 | //SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(600,50)) 11 | //SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(600,50)) 12 | //SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,(600,50)) 13 | //SYSREC DD UNIT=SYSDA,SPACE=(CYL,(599,49)) 14 | //SYSPRINT DD SYSOUT=* 15 | //UTPRINT DD SYSOUT=* 16 | //SYSUDUMP DD SYSOUT=* 17 | //SYSIN DD * 18 | RUNSTATS TABLESPACE TRADE.TRADETS1 INDEX ALL TABLE ALL REPORT YES 19 | RUNSTATS TABLESPACE TRADE.TRADETS2 INDEX ALL TABLE ALL REPORT YES 20 | RUNSTATS TABLESPACE TRADE.TRADETS3 INDEX ALL TABLE ALL REPORT YES 21 | RUNSTATS TABLESPACE TRADE.TRADETS4 INDEX ALL TABLE ALL REPORT YES 22 | RUNSTATS TABLESPACE TRADE.TRADETS5 INDEX ALL TABLE ALL REPORT YES 23 | RUNSTATS TABLESPACE TRADE.TRADETS6 INDEX ALL TABLE ALL REPORT YES 24 | -------------------------------------------------------------------------------- /zos_db2_files/dbbind.jcl: -------------------------------------------------------------------------------- 1 | //DBINDS20 JOB MSGCLASS=H,NOTIFY=&SYSUID.,REGION=0M 2 | //*********************************************************************/00010000 3 | //* JOB NAME = DSNTIJSG */00020000 4 | //* */00030000 5 | //* DESCRIPTIVE NAME = INSTALLATION JOB STREAM */00040000 6 | //* */00050000 7 | //*********************************************************************/00290000 8 | //JOBLIB DD DISP=SHR, 00300000 9 | // DSN=DB211.D121916.SDSNLOAD 00310000 10 | //* 00430000 11 | //DSNTIRU EXEC PGM=IKJEFT01,DYNAMNBR=20 00440000 12 | //SYSTSPRT DD SYSOUT=* 00450000 13 | //SYSPRINT DD SYSOUT=* 00460000 14 | //SYSUDUMP DD SYSOUT=* 00470000 15 | //SYSTSIN DD * 00480000 16 | DSN SYSTEM(DB90) 00490000 17 | REBIND PACKAGE(NULLID.SYSLH100) ISOLATION(CS) CURRENTDATA (NO) 00728260 18 | REBIND PACKAGE(NULLID.SYSLH200) CURRENTDATA(NO) ISOLATION(CS) 00728260 19 | REBIND PACKAGE(NULLID.SYSLH300) CURRENTDATA(NO) ISOLATION(CS) 00728260 20 | REBIND PACKAGE(NULLID.SYSLH400) CURRENTDATA(NO) ISOLATION(CS) 00728260 21 | REBIND PACKAGE(NULLID.SYSLN100) CURRENTDATA(NO) ISOLATION(CS) 00728260 22 | REBIND PACKAGE(NULLID.SYSLN200) CURRENTDATA(NO) ISOLATION(CS) 00728260 23 | REBIND PACKAGE(NULLID.SYSLN300) CURRENTDATA(NO) ISOLATION(CS) 00728260 24 | REBIND PACKAGE(NULLID.SYSLN400) CURRENTDATA(NO) ISOLATION(CS) 00728260 25 | REBIND PACKAGE(NULLID.SYSLH101) CURRENTDATA(NO) ISOLATION(CS) 00728260 26 | REBIND PACKAGE(NULLID.SYSLH201) CURRENTDATA(NO) ISOLATION(CS) 00728260 27 | REBIND PACKAGE(NULLID.SYSLH301) CURRENTDATA(NO) ISOLATION(CS) 00728260 28 | REBIND PACKAGE(NULLID.SYSLH401) CURRENTDATA(NO) ISOLATION(CS) 00728260 29 | REBIND PACKAGE(NULLID.SYSLN101) CURRENTDATA(NO) ISOLATION(CS) 00728260 30 | REBIND PACKAGE(NULLID.SYSLN201) CURRENTDATA(NO) ISOLATION(CS) 00728260 31 | REBIND PACKAGE(NULLID.SYSLN301) CURRENTDATA(NO) ISOLATION(CS) 00728260 32 | REBIND PACKAGE(NULLID.SYSLN401) CURRENTDATA(NO) ISOLATION(CS) 00728260 33 | REBIND PACKAGE(NULLID.SYSLH102) CURRENTDATA(NO) ISOLATION(CS) 00728260 34 | REBIND PACKAGE(NULLID.SYSLH202) CURRENTDATA(NO) ISOLATION(CS) 00728260 35 | REBIND PACKAGE(NULLID.SYSLH302) CURRENTDATA(NO) ISOLATION(CS) 00728260 36 | REBIND PACKAGE(NULLID.SYSLH402) CURRENTDATA(NO) ISOLATION(CS) 00728260 37 | REBIND PACKAGE(NULLID.SYSLN102) CURRENTDATA(NO) ISOLATION(CS) 00728260 38 | REBIND PACKAGE(NULLID.SYSLN202) CURRENTDATA(NO) ISOLATION(CS) 00728260 39 | REBIND PACKAGE(NULLID.SYSLN302) CURRENTDATA(NO) ISOLATION(CS) 00728260 40 | REBIND PACKAGE(NULLID.SYSLN402) CURRENTDATA(NO) ISOLATION(CS) 00728260 41 | REBIND PACKAGE(NULLID.SYSSTAT) CURRENTDATA(NO) ISOLATION(CS) 00728260 42 | END 00728840 43 | --------------------------------------------------------------------------------