"
89 | + buffer
90 | + "");
91 | }
92 | catch (Exception e)
93 | {
94 | Log.error(e, "PingServlet.doGet(...): general exception caught");
95 | res.sendError(500, e.toString());
96 |
97 | }
98 | }
99 | /**
100 | * returns a string of information about the servlet
101 | * @return info String: contains info about the servlet
102 | **/
103 | public String getServletInfo()
104 | {
105 | return "Basic dynamic HTML generation through a servlet, with " +
106 | "contentLength set by contentLength parameter.";
107 | }
108 | /**
109 | * called when the class is loaded to initialize the servlet
110 | * @param config ServletConfig:
111 | **/
112 | public void init(ServletConfig config) throws ServletException
113 | {
114 | super.init(config);
115 | }
116 | }
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingServletWriter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.ibm.websphere.samples.daytrader.web.prims;
18 |
19 | import java.io.*;
20 | import javax.servlet.*;
21 | import javax.servlet.http.*;
22 | import javax.servlet.annotation.WebServlet;
23 |
24 | import com.ibm.websphere.samples.daytrader.util.*;
25 |
26 |
27 | /**
28 | *
29 | * PingServlet extends PingServlet by using a PrintWriter for formatted
30 | * output vs. the output stream used by {@link PingServlet}.
31 | *
32 | */
33 | @WebServlet(name = "PingServletWriter", urlPatterns = {"/servlet/PingServletWriter"})
34 | public class PingServletWriter extends HttpServlet {
35 |
36 | private static final long serialVersionUID = -267847365014523225L;
37 | private static String initTime;
38 | private static int hitCount;
39 |
40 | /**
41 | * forwards post requests to the doGet method
42 | * Creation date: (11/6/2000 10:52:39 AM)
43 | * @param res javax.servlet.http.HttpServletRequest
44 | * @param res2 javax.servlet.http.HttpServletResponse
45 | */
46 | public void doPost(HttpServletRequest req, HttpServletResponse res)
47 | throws ServletException, IOException {
48 | doGet(req, res);
49 | }
50 | /**
51 | * this is the main method of the servlet that will service all get requests.
52 | * @param request HttpServletRequest
53 | * @param responce HttpServletResponce
54 | **/
55 | public void doGet(HttpServletRequest req, HttpServletResponse res)
56 | throws ServletException, IOException {
57 | try
58 | {
59 | res.setContentType("text/html");
60 |
61 | // The following 2 lines are the difference between PingServlet and PingServletWriter
62 | // the latter uses a PrintWriter for output versus a binary output stream.
63 | //ServletOutputStream out = res.getOutputStream();
64 | java.io.PrintWriter out = res.getWriter();
65 | hitCount++;
66 | out.println(
67 | "Ping Servlet Writer"
68 | + "
Ping Servlet Writer:
Init time : "
69 | + initTime
70 | + "
Hit Count: "
71 | + hitCount
72 | + "");
73 | }
74 | catch (Exception e)
75 | {
76 | Log.error(e, "PingServletWriter.doGet(...): general exception caught");
77 | res.sendError(500, e.toString());
78 | }
79 | }
80 | /**
81 | * returns a string of information about the servlet
82 | * @return info String: contains info about the servlet
83 | **/
84 |
85 | public String getServletInfo()
86 | {
87 | return "Basic dynamic HTML generation through a servlet using a PrintWriter";
88 | }
89 | /**
90 | * called when the class is loaded to initialize the servlet
91 | * @param config ServletConfig:
92 | **/
93 | public void init(ServletConfig config) throws ServletException {
94 | super.init(config);
95 | hitCount = 0;
96 | initTime = new java.util.Date().toString();
97 |
98 | }
99 | }
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/java/com/ibm/websphere/samples/daytrader/web/prims/PingSession3Object.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.ibm.websphere.samples.daytrader.web.prims;
18 |
19 | import java.io.*;
20 |
21 | /**
22 | *
23 | * An object that contains approximately 1024 bits of information. This is used by
24 | * {@link PingSession3}
25 | *
26 | */
27 | public class PingSession3Object implements Serializable {
28 | // PingSession3Object represents a BLOB of session data of various.
29 | // Each instantiation of this class is approximately 1K in size (not including overhead for arrays and Strings)
30 | // Using different datatype exercises the various serialization algorithms for each type
31 |
32 | private static final long serialVersionUID = 1452347702903504717L;
33 | byte[] byteVal = new byte[16]; // 8 * 16 = 128 bits
34 | char[] charVal = new char[8]; // 16 * 8 = 128 bits
35 | int a, b, c, d; // 4 * 32 = 128 bits
36 | float e, f, g, h; // 4 * 32 = 128 bits
37 | double i, j; // 2 * 64 = 128 bits
38 | // Primitive type size = ~5*128= 640
39 |
40 | String s1 = new String("123456789012");
41 | String s2 = new String("abcdefghijkl");
42 | // String type size = ~2*12*16 = 384
43 | // Total blob size (w/o overhead) = 1024
44 |
45 |
46 | // The Session blob must be filled with data to avoid compression of the blob during serialization
47 | PingSession3Object()
48 | {
49 | int index;
50 | byte b = 0x8;
51 | for (index=0; index<16; index++)
52 | {
53 | byteVal[index] = (byte) (b+2);
54 | }
55 |
56 | char c = 'a';
57 | for (index=0; index<8; index++)
58 | {
59 | charVal[index] = (char) (c+2);
60 | }
61 |
62 | a=1; b=2; c=3; d=5;
63 | e = (float)7.0; f=(float)11.0; g=(float)13.0; h=(float)17.0;
64 | i=(double)19.0; j=(double)23.0;
65 | }
66 | /**
67 | * Main method to test the serialization of the Session Data blob object
68 | * Creation date: (4/3/2000 3:07:34 PM)
69 | * @param args java.lang.String[]
70 | */
71 |
72 | /** Since the following main method were written for testing purpose, we comment them out
73 | *public static void main(String[] args) {
74 | * try {
75 | * PingSession3Object data = new PingSession3Object();
76 | *
77 | * FileOutputStream ostream = new FileOutputStream("c:\\temp\\datablob.xxx");
78 | * ObjectOutputStream p = new ObjectOutputStream(ostream);
79 | * p.writeObject(data);
80 | * p.flush();
81 | * ostream.close();
82 | * }
83 | * catch (Exception e)
84 | * {
85 | * System.out.println("Exception: " + e.toString());
86 | * }
87 | *}
88 | */
89 |
90 | }
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Ant-Version: Apache Ant 1.7.1
3 | Created-By: 2.4 (IBM Corporation)
4 |
5 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/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 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/PingFaceletSmall.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 | PingFaceletSmall - Stock Lookup Service
11 |
12 |
13 |
14 |
15 |
16 |
17 | PingFaceletSmall - Stock Lookup Service
18 |
19 | Displays the stock information from a random stock in the database.
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 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/PingHtml.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | PingHTML.html
20 |
21 |
22 |
23 | PING HTML:
24 | Hello World
25 |
26 |
27 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/PingJsp.jsp:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 | PingJsp
24 |
25 |
26 | <%! int hitCount = 0;
27 | String initTime = new java.util.Date().toString();
28 | %>
29 |
30 |
31 | PING JSP:
32 | Init time: <%= initTime %>
33 | <% hitCount++; %>
34 | Hit Count: <%= hitCount %>
35 |
36 |
37 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/PingServlet2Jsp.jsp:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | PingJsp
24 |
25 |
26 | <%! String initTime = (new java.util.Date()).toString();
27 | %>
28 |
29 |
30 |
31 | Ping Servlet2JSP:
32 | Init time: <%= initTime %>
33 |
34 | Message from Servlet: <%= ab.getMsg() %>
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WAS_V7_64-bit_performance.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/WAS_V7_64-bit_performance.pdf
--------------------------------------------------------------------------------
/daytrader3-ee6-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 |
--------------------------------------------------------------------------------
/daytrader3-ee6-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 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WEB-INF/geronimo-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
23 |
24 | false
25 |
26 |
27 | jdbc/TradeDataSource
28 |
29 | TradeDataSource
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WEB-INF/ibm-web-bnd.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WEB-INF/ibm-web-ext.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/WEB-INF/jboss-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | jdbc/TradeDataSource
26 | java:/jdbc/TradeDataSource
27 |
28 |
29 |
30 | jms/QueueConnectionFactory
31 | java:/jms/QueueConnectionFactory
32 |
33 |
34 |
35 | jms/TopicConnectionFactory
36 | java:/jms/TopicConnectionFactory
37 |
38 |
39 |
40 | TradeSLSBBean
41 | java:app/dt-ejb/TradeSLSBBean!com.ibm.websphere.samples.daytrader.ejb3.TradeSLSBLocal
42 |
43 |
44 |
45 | DirectSLSBean
46 | java:app/dt-ejb/DirectSLSBBean!com.ibm.websphere.samples.daytrader.ejb3.DirectSLSBLocal
47 |
48 |
49 |
50 |
51 | jms/TradeBrokerQueue
52 | java:/jms/TradeBrokerQueue
53 |
54 |
55 |
56 | jms/TradeStreamerTopic
57 | java:/jms/TradeStreamerTopic
58 |
59 |
60 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/contentHome.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 | Geronimo performance benchmark sample overview
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | |
32 |
33 |
34 |
35 | Overview
36 | The GeronimoTM
37 | performance benchmark sample provides a suite of Apache developed
38 | workloads for characterizing performance of the Geronimo J2EE
39 | Application Server. The workloads consist of an end to end web
40 | application and a full set of primitives. The applications are a
41 | collection of Java classes, Java Servlets, Java Server Pages, Web
42 | Services, and Enterprise Java Beans built to open J2EE APIs. Together
43 | these provide versatile and portable test cases designed to measure
44 | aspects of scalability and performance.
45 |
46 | DayTrader J2EE Components
47 | Model-View-Controller Architecture
48 | DayTrader
49 | DayTrader is the Geronimo end-to-end benchmark and performance sample
50 | application. The new DayTrader benchmark has been re-designed and
51 | developed to cover Geronimo's significantly expanding programming
52 | model. This provides a real world workload driving Geronimo's
53 | implementation of J2EE 1.4 and Web Services including key Geronimo
54 | performance components and features.
55 |
56 | DayTrader's new design spans J2EE 1.4 including the new EJB 2.1
57 | component architecture, Message Driven beans, transactions (1-phase,
58 | 2-phase commit) and Web Services (SOAP, WSDL).
59 |
60 | Primitives
61 | The Primitives provide a set of workloads to
63 | individually test various components of the Geronimo Application
64 | Server. The primitives leverage the DayTrader application
65 | infrastructure to test specific Geronimo J2EE components such as the
66 | servlet engine, JSP support, EJB Entitiy, Session and Message Driven
67 | beans, HTTP Session support and more.
68 | Additional overview
69 | information is included in the FAQ
70 | |
71 |
72 |
73 |
74 |
75 | |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/dbscripts/db2/Table.ddl:
--------------------------------------------------------------------------------
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 | # Each SQL statement in this file should terminate with a semicolon (;)
17 | # Lines starting with the pound character (#) are considered as comments
18 | DROP TABLE HOLDINGEJB;
19 | DROP TABLE ACCOUNTPROFILEEJB;
20 | DROP TABLE QUOTEEJB;
21 | DROP TABLE KEYGENEJB;
22 | DROP TABLE ACCOUNTEJB;
23 | DROP TABLE ORDEREJB;
24 |
25 | CREATE TABLE HOLDINGEJB
26 | (PURCHASEPRICE DECIMAL(14, 2),
27 | HOLDINGID INTEGER NOT NULL,
28 | QUANTITY DOUBLE NOT NULL,
29 | PURCHASEDATE TIMESTAMP,
30 | ACCOUNT_ACCOUNTID INTEGER,
31 | QUOTE_SYMBOL VARCHAR(250));
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 |
44 | ALTER TABLE ACCOUNTPROFILEEJB
45 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
46 |
47 | CREATE TABLE QUOTEEJB
48 | (LOW DECIMAL(14, 2),
49 | OPEN1 DECIMAL(14, 2),
50 | VOLUME DOUBLE NOT NULL,
51 | PRICE DECIMAL(14, 2),
52 | HIGH DECIMAL(14, 2),
53 | COMPANYNAME VARCHAR(250),
54 | SYMBOL VARCHAR(250) NOT NULL,
55 | CHANGE1 DOUBLE NOT NULL);
56 |
57 | ALTER TABLE QUOTEEJB
58 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
59 |
60 | CREATE TABLE KEYGENEJB
61 | (KEYVAL INTEGER NOT NULL,
62 | KEYNAME VARCHAR(250) NOT NULL);
63 |
64 | ALTER TABLE KEYGENEJB
65 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
66 |
67 | CREATE TABLE ACCOUNTEJB
68 | (CREATIONDATE TIMESTAMP,
69 | OPENBALANCE DECIMAL(14, 2),
70 | LOGOUTCOUNT INTEGER NOT NULL,
71 | BALANCE DECIMAL(14, 2),
72 | ACCOUNTID INTEGER NOT NULL,
73 | LASTLOGIN TIMESTAMP,
74 | LOGINCOUNT INTEGER NOT NULL,
75 | PROFILE_USERID VARCHAR(250));
76 |
77 | ALTER TABLE ACCOUNTEJB
78 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
79 |
80 | CREATE TABLE ORDEREJB
81 | (ORDERFEE DECIMAL(14, 2),
82 | COMPLETIONDATE TIMESTAMP,
83 | ORDERTYPE VARCHAR(250),
84 | ORDERSTATUS VARCHAR(250),
85 | PRICE DECIMAL(14, 2),
86 | QUANTITY DOUBLE NOT NULL,
87 | OPENDATE TIMESTAMP,
88 | ORDERID INTEGER NOT NULL,
89 | ACCOUNT_ACCOUNTID INTEGER,
90 | QUOTE_SYMBOL VARCHAR(250),
91 | HOLDING_HOLDINGID INTEGER);
92 |
93 | ALTER TABLE ORDEREJB
94 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
95 |
96 | ALTER TABLE HOLDINGEJB VOLATILE;
97 | ALTER TABLE ACCOUNTPROFILEEJB VOLATILE;
98 | ALTER TABLE QUOTEEJB VOLATILE;
99 | ALTER TABLE KEYGENEJB VOLATILE;
100 | ALTER TABLE ACCOUNTEJB VOLATILE;
101 | ALTER TABLE ORDEREJB VOLATILE;
102 |
103 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
104 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
105 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
106 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
107 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
108 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/dbscripts/derby/Table.ddl:
--------------------------------------------------------------------------------
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 | # Each SQL statement in this file should terminate with a semicolon (;)
17 | # Lines starting with the pound character (#) are considered as comments
18 | DROP TABLE HOLDINGEJB;
19 | DROP TABLE ACCOUNTPROFILEEJB;
20 | DROP TABLE QUOTEEJB;
21 | DROP TABLE KEYGENEJB;
22 | DROP TABLE ACCOUNTEJB;
23 | DROP TABLE ORDEREJB;
24 |
25 | DROP TABLE OPENJPASEQ;
26 |
27 | create table OPENJPASEQ
28 | (ID SMALLINT NOT NULL PRIMARY KEY,
29 | SEQUENCE_VALUE BIGINT);
30 |
31 | CREATE TABLE HOLDINGEJB
32 | (PURCHASEPRICE DECIMAL(14, 2),
33 | HOLDINGID INTEGER NOT NULL,
34 | QUANTITY DOUBLE NOT NULL,
35 | PURCHASEDATE TIMESTAMP,
36 | ACCOUNT_ACCOUNTID INTEGER,
37 | QUOTE_SYMBOL VARCHAR(250));
38 |
39 | ALTER TABLE HOLDINGEJB
40 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
41 |
42 | CREATE TABLE ACCOUNTPROFILEEJB
43 | (ADDRESS VARCHAR(250),
44 | PASSWD VARCHAR(250),
45 | USERID VARCHAR(250) NOT NULL,
46 | EMAIL VARCHAR(250),
47 | CREDITCARD VARCHAR(250),
48 | FULLNAME VARCHAR(250));
49 |
50 | ALTER TABLE ACCOUNTPROFILEEJB
51 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
52 |
53 | CREATE TABLE QUOTEEJB
54 | (LOW DECIMAL(14, 2),
55 | OPEN1 DECIMAL(14, 2),
56 | VOLUME DOUBLE NOT NULL,
57 | PRICE DECIMAL(14, 2),
58 | HIGH DECIMAL(14, 2),
59 | COMPANYNAME VARCHAR(250),
60 | SYMBOL VARCHAR(250) NOT NULL,
61 | CHANGE1 DOUBLE NOT NULL);
62 |
63 | ALTER TABLE QUOTEEJB
64 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
65 |
66 | CREATE TABLE KEYGENEJB
67 | (KEYVAL INTEGER NOT NULL,
68 | KEYNAME VARCHAR(250) NOT NULL);
69 |
70 | ALTER TABLE KEYGENEJB
71 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
72 |
73 | CREATE TABLE ACCOUNTEJB
74 | (CREATIONDATE TIMESTAMP,
75 | OPENBALANCE DECIMAL(14, 2),
76 | LOGOUTCOUNT INTEGER NOT NULL,
77 | BALANCE DECIMAL(14, 2),
78 | ACCOUNTID INTEGER NOT NULL,
79 | LASTLOGIN TIMESTAMP,
80 | LOGINCOUNT INTEGER NOT NULL,
81 | PROFILE_USERID VARCHAR(250));
82 |
83 | ALTER TABLE ACCOUNTEJB
84 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
85 |
86 | CREATE TABLE ORDEREJB
87 | (ORDERFEE DECIMAL(14, 2),
88 | COMPLETIONDATE TIMESTAMP,
89 | ORDERTYPE VARCHAR(250),
90 | ORDERSTATUS VARCHAR(250),
91 | PRICE DECIMAL(14, 2),
92 | QUANTITY DOUBLE NOT NULL,
93 | OPENDATE TIMESTAMP,
94 | ORDERID INTEGER NOT NULL,
95 | ACCOUNT_ACCOUNTID INTEGER,
96 | QUOTE_SYMBOL VARCHAR(250),
97 | HOLDING_HOLDINGID INTEGER);
98 |
99 | ALTER TABLE ORDEREJB
100 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
101 |
102 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
103 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
104 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
105 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
106 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
107 |
108 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/dbscripts/oracle/Table.ddl:
--------------------------------------------------------------------------------
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 | # Each SQL statement in this file should terminate with a semicolon (;)
17 | # Lines starting with the pound character (#) are considered as comments
18 | DROP TABLE HOLDINGEJB cascade constraints;
19 | DROP TABLE ACCOUNTPROFILEEJB cascade constraints;
20 | DROP TABLE QUOTEEJB cascade constraints;
21 | DROP TABLE KEYGENEJB cascade constraints;
22 | DROP TABLE ACCOUNTEJB cascade constraints;
23 | DROP TABLE ORDEREJB cascade constraints;
24 |
25 | CREATE TABLE HOLDINGEJB
26 | (PURCHASEPRICE DECIMAL(14, 2) NULL,
27 | HOLDINGID INTEGER NOT NULL,
28 | QUANTITY NUMBER NOT NULL,
29 | PURCHASEDATE DATE NULL,
30 | ACCOUNT_ACCOUNTID INTEGER NULL,
31 | QUOTE_SYMBOL VARCHAR2(250) NULL);
32 |
33 | ALTER TABLE HOLDINGEJB
34 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
35 |
36 | CREATE TABLE ACCOUNTPROFILEEJB
37 | (ADDRESS VARCHAR2(250) NULL,
38 | PASSWD VARCHAR2(250) NULL,
39 | USERID VARCHAR2(250) NOT NULL,
40 | EMAIL VARCHAR2(250) NULL,
41 | CREDITCARD VARCHAR2(250) NULL,
42 | FULLNAME VARCHAR2(250) NULL);
43 |
44 | ALTER TABLE ACCOUNTPROFILEEJB
45 | ADD CONSTRAINT PK_ACCOUNTPROFILEEJB PRIMARY KEY (USERID);
46 |
47 | CREATE TABLE QUOTEEJB
48 | (LOW DECIMAL(14, 2) NULL,
49 | OPEN1 DECIMAL(14, 2) NULL,
50 | VOLUME NUMBER NOT NULL,
51 | PRICE DECIMAL(14, 2) NULL,
52 | HIGH DECIMAL(14, 2) NULL,
53 | COMPANYNAME VARCHAR2(250) NULL,
54 | SYMBOL VARCHAR2(250) NOT NULL,
55 | CHANGE1 NUMBER NOT NULL);
56 |
57 | ALTER TABLE QUOTEEJB
58 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
59 |
60 | CREATE TABLE KEYGENEJB
61 | (KEYVAL INTEGER NOT NULL,
62 | KEYNAME VARCHAR2(250) NOT NULL);
63 |
64 | ALTER TABLE KEYGENEJB
65 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
66 |
67 | CREATE TABLE ACCOUNTEJB
68 | (CREATIONDATE DATE NULL,
69 | OPENBALANCE DECIMAL(14, 2) NULL,
70 | LOGOUTCOUNT INTEGER NOT NULL,
71 | BALANCE DECIMAL(14, 2) NULL,
72 | ACCOUNTID INTEGER NOT NULL,
73 | LASTLOGIN DATE NULL,
74 | LOGINCOUNT INTEGER NOT NULL,
75 | PROFILE_USERID VARCHAR2(250) NULL);
76 |
77 | ALTER TABLE ACCOUNTEJB
78 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
79 |
80 | CREATE TABLE ORDEREJB
81 | (ORDERFEE DECIMAL(14, 2) NULL,
82 | COMPLETIONDATE DATE NULL,
83 | ORDERTYPE VARCHAR2(250) NULL,
84 | ORDERSTATUS VARCHAR2(250) NULL,
85 | PRICE DECIMAL(14, 2) NULL,
86 | QUANTITY NUMBER NOT NULL,
87 | OPENDATE DATE NULL,
88 | ORDERID INTEGER NOT NULL,
89 | ACCOUNT_ACCOUNTID INTEGER NULL,
90 | QUOTE_SYMBOL VARCHAR2(250) NULL,
91 | HOLDING_HOLDINGID INTEGER NULL);
92 |
93 | ALTER TABLE ORDEREJB
94 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
95 |
96 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
97 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
98 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
99 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
100 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
101 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/displayQuote.jsp:
--------------------------------------------------------------------------------
1 |
17 | <%@ page
18 | import="java.math.BigDecimal,com.ibm.websphere.samples.daytrader.*,com.ibm.websphere.samples.daytrader.util.*"
19 | session="true" isThreadSafe="true" isErrorPage="false"%>
20 | <%
21 | String symbol = request.getParameter("symbol");
22 | TradeServices tAction=null;
23 | tAction = new TradeAction();
24 | try {
25 | QuoteDataBean quoteData = tAction.getQuote(symbol);
26 |
27 | %>
28 |
29 | <%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %> |
30 | <%= quoteData.getCompanyName()%> |
31 | <%= quoteData.getVolume()%> |
32 | <%= quoteData.getLow() + " - " + quoteData.getHigh()%> |
33 | <%= quoteData.getOpen()%> |
34 | $ <%= quoteData.getPrice()%> |
35 | <%= FinancialUtils.printGainHTML(new BigDecimal(quoteData.getChange())) %>
36 | <%= FinancialUtils.printGainPercentHTML( FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen())) %> |
37 |
38 |
41 | |
42 |
43 |
44 | <%
45 | }
46 | catch (Exception e)
47 | {
48 | Log.error("displayQuote.jsp exception", e);
49 | }
50 | %>
51 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/docs/benchmarking.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 | Benchmarking Details
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Benchmarking
32 | |
33 |
34 |
35 |
36 |
37 | DayTrader provides two servlets to create a workload for benchmarking: TradeApp servlet and TradeScenario servlet.
38 | In either case, the load generation tool used to drive the Trade workload must provide cookie support to handle
39 | HTTP sessions.
40 | TradeApp servlet provides the standard web interface and
41 | can be accessed with the Go Trade! link. Driving benchmark load using this
42 | interface requires a sophisticated web load
43 | generator that is capable of filling HTML
44 | forms and posting dynamic data.
45 | TradeScenario servlet emulates a population of web users by generating
46 | a specific Trade operation for a randomly
47 | chosen user on each access to the URL. Test
48 | this servlet by clicking Trade Scenario and hit "Reload" on your browser to step through a Trade Scenario.
49 | To benchmark using this URL aim your favorite web load generator at the
50 | Trade Scenario URL and fire away.
51 | There is a drawback to using the Trade Scenario
52 | servlet to drive the workload versus using a series of more complicated
53 | load scripts. As previously mentioned, the scenario
54 | servlet is responsible for managing clients and emulating user
55 | operations by dispatching simple client requests to complex Trade
56 | actions. This causes the application server to spend a large percentage
57 | of time performing work that would typically be handled by a client or
58 | a more complex load driver. Consequently, performance numbers are
59 | artificially deflated when using Trade Scenario servlet as compared to
60 | driving the workload directly.
61 |
62 |
63 | Web Primitive Benchmarking
64 | 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.
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/docs/documentation.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Technical Documentation
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Technical Documentation
33 | |
34 |  |
35 |
36 |
37 |
38 |
39 |
40 | Documents below provide documentation on Trade application design, runtime
41 | characteristics and FAQs.
42 |
43 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/docs/tradeversion.html:
--------------------------------------------------------------------------------
1 |
17 |
18 | DayTrader Version
19 |
20 | IBM WebSphere Application Server Samples - DayTrader 3.0.9 (No Caching)
21 |
Full EE6 Spec Compliant for WebSphere 8.5.5.0
22 |
Date: 20140107
23 |
Contact: jdmcclur@us.ibm.com
24 |
25 |
26 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/footer.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | daytrader2_matts_mods
20 |
21 |
22 |
23 |
24 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/DayTraderHead_blue.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/DayTraderHead_blue.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/DayTraderHead_red.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/DayTraderHead_red.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/about.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/about.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/account.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/account.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/arrowdown.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/arrowdown.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/arrowup.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/arrowup.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/bottomRedBar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/bottomRedBar.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/configuration.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/configuration.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/copyRight.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/copyRight.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/dayTraderLogo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/dayTraderLogo.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/daytrader_simple_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/daytrader_simple_arch.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/faq.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/faq.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/graph.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/graph.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/home.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/home.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/homeBanner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/homeBanner.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/line.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/logout.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/logout.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/lower_banner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/lower_banner.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/menuHome.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/menuHome.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/portfolio.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/portfolio.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/primitives.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/primitives.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/quotes.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/quotes.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/reports.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/reports.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/spacer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/spacer.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/ticker-anim.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/ticker-anim.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/topRedBar.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/topRedBar.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/topline.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/topline.jpg
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/images/tradingAndPortfolios.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-web/src/main/webapp/images/tradingAndPortfolios.gif
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | DayTrader
22 |
23 |
33 |
34 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/leftMenu.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | Leftmenu
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Overview
30 |
32 | Benchmarking
33 | Configuration
34 | Go Trade!
35 | Web Primitives
36 |
37 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/quoteDataPrimitive.jsp:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 | Quote Data Primitive (PingServet2Session2Entity2JSP)
24 |
25 |
26 | <%@ page import="com.ibm.websphere.samples.daytrader.*,com.ibm.websphere.samples.daytrader.util.*" session="false" isThreadSafe="true" isErrorPage="false"%>
27 | <%! int hitCount = 0;
28 | String initTime = new java.util.Date().toString();
29 | %>
30 | <%
31 | QuoteDataBean quoteData = (QuoteDataBean) request.getAttribute("quoteData");
32 | %>
33 |
34 |
35 | Quote Data Primitive (PingServlet2Session2EntityJSP):
36 | Init time: <%= initTime %>
37 | <% hitCount++; %>
38 | Hit Count: <%= hitCount %>
39 |
Quote Information
<%= quoteData.toHTML() %>
40 |
41 |
42 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/sample.jsp:
--------------------------------------------------------------------------------
1 |
17 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
18 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
19 | <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
20 | <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
21 |
22 |
23 |
24 | Hello world JSP on
25 |
26 |
27 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/style.css:
--------------------------------------------------------------------------------
1 | /*======================================================================
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | ======================================================================*/
17 | A:HOVER {
18 | text-decoration: underline; color: red;
19 | }
20 |
21 | A:ACTIVE {
22 | color: red;
23 | font-weight: bold
24 | }
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/theme/stylesheet.css:
--------------------------------------------------------------------------------
1 | /********************************
2 | * Faces Components Stylesheet *
3 | ********************************/
4 |
5 | .form {
6 | }
7 |
8 | .commandLink {
9 | }
10 |
11 | .outputLink {
12 | }
13 |
14 | .link {
15 | }
16 |
17 | .graphicImage {
18 | }
19 |
20 | .outputLabel {
21 | }
22 |
23 | .inputText {
24 | }
25 |
26 | .inputText_Error {
27 | border-style: solid;
28 | border-color: #DE5C5C;
29 | }
30 |
31 | .inputTextarea {
32 | }
33 |
34 | .inputSecret {
35 | }
36 |
37 | .inputHidden {
38 | }
39 |
40 | .outputText {
41 | }
42 |
43 | .outputFormat {
44 | }
45 |
46 | .commandButton {
47 | }
48 |
49 | .button {
50 | }
51 |
52 | .message {
53 | }
54 |
55 | .messages {
56 | }
57 |
58 | .selectBooleanCheckbox {
59 | }
60 |
61 | .selectBooleanCheckbox_Error {
62 | }
63 |
64 | .selectOneRadio {
65 | }
66 |
67 | .selectOneRadio_Error {
68 | }
69 |
70 | .selectOneRadio_Disabled {
71 | color: GrayText;
72 | }
73 |
74 | .selectManyCheckbox {
75 | }
76 |
77 | .selectManyCheckbox_Error {
78 | }
79 |
80 | .selectManyCheckbox_Disabled {
81 | color: GrayText;
82 | }
83 |
84 | .selectOneListbox {
85 | }
86 |
87 | .selectOneListbox_Error {
88 | }
89 |
90 | .selectManyListbox {
91 | }
92 |
93 | .selectManyListbox_Error {
94 | }
95 |
96 | .selectOneMenu {
97 | }
98 |
99 | .selectOneMenu_Error {
100 | }
101 |
102 | .selectManyMenu {
103 | }
104 |
105 | .selectManyMenu_Error {
106 | }
107 |
108 | .panelGroup {
109 | }
110 |
111 | .panelGrid {
112 | }
113 |
114 | .dataTable {
115 | empty-cells:show;
116 | }
117 |
118 | .headerClass {
119 | background-color: ThreeDFace;
120 | color: WindowText;
121 | border-width: 1px;
122 | border-style: solid;
123 | border-color: ThreeDShadow;
124 | margin:2px;
125 | padding:0px;
126 | padding-left:4pt;
127 | padding-right:4pt;
128 | padding-bottom:2px;
129 | font-weight: 400;
130 | overflow: -moz-scrollbars-none;
131 | }
132 |
133 | .footerClass {
134 | background-color: ThreeDFace;
135 | color: WindowText;
136 | border-width: 0px;
137 | border-style: none;
138 | padding:0px;
139 | padding-left:4pt;
140 | padding-right:4pt;
141 | font-weight: 400;
142 | overflow: -moz-scrollbars-none;
143 | }
144 |
145 | .rowClass1 {
146 | background-color: window;
147 | }
148 |
149 | .rowClass2 {
150 | background-color: ThreeDFace;
151 | }
152 |
153 | .columnClass1 {
154 | background-color: window;
155 | margin:2px;
156 | padding:0px;
157 | padding-left:4pt;
158 | padding-right:4pt;
159 | padding-bottom:2px;
160 | overflow: -moz-scrollbars-none;
161 | }
162 |
163 | .columnClass2 {
164 | background-color: ThreeDFace;
165 | margin:2px;
166 | padding:0px;
167 | padding-left:4pt;
168 | padding-right:4pt;
169 | padding-bottom:2px;
170 | }
171 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/welcome.jsp:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 | DayTrader Login
21 |
22 |
23 |
24 | <%@ page session="false"%>
25 |
26 |
27 |
28 | DayTrader Login |
30 | DayTrader |
32 |
33 |
34 |
35 |
36 |
37 |
38 | |
39 | <% String results;
40 | results = (String) request.getAttribute("results");
41 | if ( results != null )out.print(results);
42 | %> |
43 | |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | |
52 | Log in
53 |
54 | |
55 |
56 |
57 | Username
58 | Password
59 |
60 | |
61 |
62 |
63 |
64 |
69 | |
70 |
71 |
72 |
73 |
74 |
75 |
76 | |
77 |
78 |
79 | |
80 |
81 |
82 | |
83 | First time user? Please
84 | Register |
85 |
86 |
87 | |
88 |
89 |
90 |
91 | Register With DayTrader
92 |
93 | |
94 |
95 |
96 |
97 |
98 | |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | |
108 |
109 |
110 | |
111 |
112 |
113 | DayTrader Login |
115 | DayTrader |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/daytrader3-ee6-web/src/main/webapp/welcomeImg.jsp:
--------------------------------------------------------------------------------
1 |
2 | <%--
3 | Licensed to the Apache Software Foundation (ASF) under one or more
4 | contributor license agreements. See the NOTICE file distributed with
5 | this work for additional information regarding copyright ownership.
6 | The ASF licenses this file to You under the Apache License, Version 2.0
7 | (the "License"); you may not use this file except in compliance with
8 | the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing, software
13 | distributed under the License is distributed on an "AS IS" BASIS,
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | See the License for the specific language governing permissions and
16 | limitations under the License.
17 | --%>
18 |
19 |
20 | DayTrader Login
21 |
22 |
23 |
24 | <%@ page session="false"%>
25 |
26 |
27 |
28 | DayTrader Login |
30 | DayTrader |
32 |
33 |
34 |
35 |
36 |
37 |
38 | |
39 | <% String results;
40 | results = (String) request.getAttribute("results");
41 | if ( results != null )out.print(results);
42 | %> |
43 | |
44 |  |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | |
54 | Log in
55 |
56 | |
57 |
58 |
59 | Username
60 | Password
61 |
62 | |
63 |
64 |
65 |
66 |
71 | |
72 |
73 |
74 |
75 |
76 |
77 |
78 | |
79 |
80 |
81 | |
82 |
83 |
84 | |
85 | First time user? Please
86 | Register |
87 |
88 |
89 | |
90 |
91 |
92 |
93 | Register With DayTrader
94 |
95 | |
96 |
97 |
98 |
99 |
100 | |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |  |
110 |
111 |
112 | DayTrader Login |
114 | DayTrader |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/.gitignore:
--------------------------------------------------------------------------------
1 | /.settings/
2 | /target/
3 | .*.swp
4 | /.project
5 | /.settings/
6 | .DS_Store
7 | /build/
8 | /.gradle/
9 | /servers/daytrader7Sample/apps
10 | /servers/daytrader7Sample/logs
11 | /servers/daytrader7Sample/workarea
12 | /servers/daytrader7Sample/messaging
13 | /servers/daytrader7Sample/tranlog
14 | /servers/daytrader7Sample/derby.log
15 | /shared/*
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/build.gradle:
--------------------------------------------------------------------------------
1 | task clean {
2 | doLast{
3 | ant.delete(includeemptydirs: 'true') {
4 | fileset(dir: 'servers', includes: '**/logs/**, **/apps/*, **/workarea/**')
5 | fileset(dir: 'shared/resources', includes: '**/data/**, **/Daytrader3_SampleDerbyLibs/*')
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/pom.xml:
--------------------------------------------------------------------------------
1 |
5 | 4.0.0
6 |
7 |
8 | net.wasdev.wlp.sample
9 | daytrader3
10 | 1.0-SNAPSHOT
11 |
12 |
13 | daytrader3-ee6-wlpcfg
14 | pom
15 | WAS Liberty Sample - Java EE6 Benchmark Server
16 | https://wasdev.github.io
17 |
18 |
19 |
20 |
21 | maven-clean-plugin
22 | 2.6.1
23 |
24 | true
25 |
26 |
27 | target
28 |
29 |
30 | servers/daytrader3_Sample
31 | false
32 |
33 | **/logs/**
34 | **/apps/*
35 | **/workarea/**
36 |
37 |
38 |
39 | shared
40 | false
41 |
42 | **/resources/data/**
43 | **/resources/Daytrader3_SampleDerbyLibs/*
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/apps/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 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/apps/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Archiver-Version: Plexus Archiver
3 | Built-By: jdmcclur
4 | Created-By: Apache Maven 3.3.9
5 | Build-Jdk: 1.8.0_121
6 |
7 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/apps/META-INF/application.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | DayTrader Stock Trading Performance Benchmark Sample
4 | DayTrader EE6
5 |
6 |
7 | web.war
8 | /daytrader
9 |
10 |
11 |
12 | dt-ejb.jar
13 |
14 |
15 |
16 | Rest.war
17 | rest
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/apps/META-INF/maven/net.wasdev.wlp.sample/daytrader3-ee6/pom.properties:
--------------------------------------------------------------------------------
1 | #Generated by Maven
2 | #Fri May 12 12:37:18 CDT 2017
3 | version=1.0-SNAPSHOT
4 | groupId=net.wasdev.wlp.sample
5 | artifactId=daytrader3-ee6
6 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/derby.log:
--------------------------------------------------------------------------------
1 | ----------------------------------------------------------------
2 | Fri May 12 13:00:17 CDT 2017:
3 | Booting Derby version The Apache Software Foundation - Apache Derby - 10.10.1.1 - (1458268): instance a816c00e-015b-fdd1-8226-00001146d5f0
4 | on database directory /Users/jdmcclur/git/sample.daytrader3/daytrader3-ee6-wlpcfg/shared/resources/data/tradedb with class loader com.ibm.ws.classloading.internal.AppClassLoader@4271ad75
5 | Loaded from file:/Users/jdmcclur/git/sample.daytrader3/daytrader3-ee6-wlpcfg/shared/resources/Daytrader3_SampleDerbyLibs/derby-10.10.1.1.jar
6 | java.vendor=Oracle Corporation
7 | java.runtime.version=1.8.0_121-b13
8 | user.dir=/Users/jdmcclur/git/sample.daytrader3/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample
9 | os.name=Mac OS X
10 | os.arch=x86_64
11 | os.version=10.12.4
12 | derby.system.home=null
13 | Database Class Loader started - derby.database.classpath=''
14 | ----------------------------------------------------------------
15 | Fri May 12 13:00:19 CDT 2017:
16 | Shutting down instance a816c00e-015b-fdd1-8226-00001146d5f0 on database directory /Users/jdmcclur/git/sample.daytrader3/daytrader3-ee6-wlpcfg/shared/resources/data/tradedb with class loader com.ibm.ws.classloading.internal.AppClassLoader@4271ad75
17 | ----------------------------------------------------------------
18 | Fri May 12 13:00:19 CDT 2017: Shutting down Derby engine
19 | ----------------------------------------------------------------
20 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/Log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/Log
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/PermanentStore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/PermanentStore
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/TemporaryStore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/messaging/messageStore/TemporaryStore
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/server.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ejbLite-3.1
4 | jsf-2.0
5 | jaxrs-1.1
6 | jpa-2.0
7 | jmsMdb-3.1
8 | wasJmsServer-1.0
9 | wasJmsClient-1.1
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
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 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/DO NOT DELETE LOG FILES:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/DO NOT DELETE LOG FILES
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/log1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/log1
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/log2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/partnerlog/log2
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/DO NOT DELETE LOG FILES:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/DO NOT DELETE LOG FILES
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/log1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/log1
--------------------------------------------------------------------------------
/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/log2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WASdev/sample.daytrader3/a2d61af8c75c771fe4c9ad3f101bbdef08046c1a/daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/tranlog/tranlog/log2
--------------------------------------------------------------------------------
/daytrader3-ee6/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | /build/
3 | /bin/
4 | .classpath
5 | .project
6 | /.settings/
7 | .factorypath
8 | /.gradle
--------------------------------------------------------------------------------
/daytrader3-ee6/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'ear'
2 | apply plugin: 'java'
3 | apply plugin: 'eclipse-wtp'
4 | apply plugin: 'maven-publish'
5 |
6 | // Use the Liberty Gradle plugin to run our functional tests
7 | apply plugin: 'liberty'
8 |
9 | buildscript {
10 | repositories {
11 | mavenCentral()
12 | }
13 | dependencies {
14 | classpath 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.4'
15 | }
16 | }
17 | archivesBaseName = 'daytrader3-ee6'
18 |
19 | ear {
20 | manifest {
21 | attributes 'Implementation-Title': 'DayTrader 3'
22 | }
23 | archiveName="$baseName.$extension"
24 | }
25 |
26 | task copyDerbyLib(type: Copy) {
27 | into "../daytrader3-ee6-wlpcfg/shared/resources/Daytrader3_SampleDerbyLibs"
28 | from configurations.runtime
29 | }
30 |
31 | /* publishing {
32 | publications {
33 | mavenWar(MavenPublication) {
34 | version '1.0-SNAPSHOT'
35 | groupId 'net.wasdev.wlp.sample'
36 | artifactId 'daytrader3-ee6'
37 |
38 | from components.web
39 | }
40 | }
41 | } */
42 |
43 | // Add a functional test task that runs during the 'check' phase that uses the Liberty Gradle plugin
44 | // to launch Liberty and run the test classes in the fvt source set
45 | task fvt(type: Test, dependsOn: installApps) {
46 | group 'Verification'
47 | description 'Runs the functional verification tests.'
48 | reports.html.destination = file("$buildDir/reports/fvt")
49 | reports.junitXml.destination = file("$buildDir/test-results/fvt")
50 | include '**/fvt/**'
51 | exclude '**/unit/**'
52 | systemProperties = ['liberty.test.port': getHttpPort()]
53 | dependsOn libertyStart
54 | finalizedBy libertyStop
55 | // If libertyRoot is not set, automatically download & install Liberty runtime
56 | }
57 |
58 | test {
59 | reports.html.destination = file("$buildDir/reports/unit")
60 | reports.junitXml.destination = file("$buildDir/test-results/unit")
61 | include '**/unit/**'
62 | exclude '**/fvt/**'
63 | }
64 |
65 | repositories { mavenCentral(); }
66 | dependencies {
67 | deploy project (path: ':daytrader3-ee6-ejb', configuration: 'archives')
68 | deploy project (path: ':daytrader3-ee6-web', configuration: 'archives')
69 | deploy project (path: ':daytrader3-ee6-rest', configuration: 'archives')
70 | compile group: 'org.apache.derby', name: 'derby', version: '10.10.1.1'
71 | }
72 | String getHttpPort() {
73 | def DEFAULT_HTTP_PORT = 9083
74 | def serverXmlFile = file(new File('../daytrader3-ee6-wlpcfg/servers/daytrader3_Sample/server.xml'))
75 | def portPattern = ~/.*httpPort="(\d+)".*/
76 | serverXmlFile.eachLine { line ->
77 | def portMatcher = line =~ portPattern
78 | if (portMatcher) {
79 | return portMatcher.group(1)
80 | }
81 | }
82 | return DEFAULT_HTTP_PORT
83 | }
84 |
85 | installApps.dependsOn 'ear'
86 | libertyStart.mustRunAfter 'installApps'
87 |
88 | liberty {
89 | installDir = owner.hasProperty('libertyRoot') ? "${libertyRoot}" : null
90 | server{
91 | name = 'daytrader3_Sample'
92 | userDir = rootProject.getProjectDir().getAbsolutePath()+'/daytrader3-ee6-wlpcfg'
93 | looseApplication = false
94 | apps = [file(ear.archivePath)]
95 | features {
96 | name = ['daytrader3_Sample']
97 | acceptLicense = true
98 | }
99 | }
100 | }
101 |
102 | if (!hasProperty('libertyRoot')) {
103 | fvt.dependsOn('installFeature')
104 | }
105 |
106 | assemble.dependsOn 'installApps','copyDerbyLib'
107 |
108 | // Run FVT by default
109 | check.dependsOn 'fvt'
110 | // do not create server since the usr directory is prebuilt.\
111 | libertyCreate.enabled = false
112 |
--------------------------------------------------------------------------------
/daytrader3-ee6/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 |
--------------------------------------------------------------------------------
/daytrader3-ee6/src/main/application/META-INF/application.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | DayTrader Stock Trading Performance Benchmark Sample
4 | DayTrader EE6
5 |
6 |
7 | web.war
8 | /daytrader
9 |
10 |
11 |
12 | dt-ejb.jar
13 |
14 |
15 |
16 | Rest.war
17 | rest
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/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 daytrader3-ee6-wlpcfg directory, however, if you wanted to maintain strict separation between what is checked into daytrader3-ee6-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.daytrader3.git
9 | $ cd sample.daytrader3
10 |
11 | ```
12 |
13 | ### Building the sample
14 | :pushpin: [Switch to Eclipse example](/docs/Using-WDT.md/#building-the-sample-in-eclipse)
15 |
16 | This sample can be built using either [Gradle](#gradle-commands) or [Maven](#apache-maven-commands).
17 |
18 | ###### [Gradle](http://gradle.org/) commands
19 |
20 | ```bash
21 | $ gradle build
22 | ```
23 | ###### [Apache Maven](http://maven.apache.org/) commands
24 |
25 | ```bash
26 | $ mvn install
27 | ```
28 |
29 |
30 | The built ear file is copied into the apps directory of the server configuration located in the daytrader3-ee6-wlpcfg directory:
31 |
32 | ```text
33 | daytrader3-ee6-wlpcfg
34 | +- servers
35 | +- daytrader3-ee6-wlpcfg <-- specific server configuration
36 | +- server.xml <-- server configuration
37 | +- apps <- directory for applications
38 | +- daytrader3-ee6.ear <- sample application
39 | +- logs <- created by running the server locally
40 | +- workarea <- created by running the server locally
41 | ```
42 |
43 | ### Running the application locally
44 | :pushpin: [Switch to Eclipse example](/docs/Using-WDT.md/#running-the-application-locally)
45 |
46 | Pre-requisite: [Download WAS Liberty](/docs/Downloading-WAS-Liberty.md)
47 |
48 | Use the following to start the server and run the application:
49 |
50 | ```bash
51 | $ export WLP_USER_DIR=/path/to/sample.daytrader3/daytrader3-ee6-wlpcfg
52 | $ /path/to/wlp/bin/installUtility install daytrader3_Sample
53 | $ /path/to/wlp/bin/server start daytrader3_Sample
54 |
55 | 1. Confirm web browser opens on "http://localhost:9083/daytrader"
56 | 2. In the web browser, Click on the configuration tab.
57 | 3. Click on '(Re)-create DayTrader Database Tables and Indexes' to create the database.
58 | 4. Click on '(Re)-populate DayTrader Database' to populate the database.
59 | 5. Restart the server-> . Now the application will be ready for use.
60 | $ /path/to/wlp/bin/server stop daytrader3_Sample
61 | $ /path/to/wlp/bin/server start daytrader3_Sample
62 | ```
63 |
64 | * `start` runs the server in the background. Look in the logs directory for console.log to see what's going on, e.g.
65 | * `stop` stop the server in the background. Look in the logs directory for console.log to see what's going on, e.g.
66 | * `run` runs the server in the foreground.
67 |
68 | ```bash
69 | $ tail -f ${WLP_USER_DIR}/servers/daytrader3_Sample/logs/console.log
70 | ```
71 |
72 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Install paths
2 | # -------------
3 | # Update this to point to a liberty server install
4 | # This is needed to find the dependencies to build the code and to run the tests
5 | #libertyRoot=
6 |
--------------------------------------------------------------------------------
/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 | daytrader3.jmx is an Apache JMeter script that may be used for running the DayTrader3 benchmark.
17 |
18 | Jmeter version 3.3 or later is highly recommended.
19 |
20 | The script has the following options:
21 | -JHOST The name of the machine running the DayTrader Application. The default is localhost.
22 | -JPORT The HTTP port of the server running the DayTrader Application. The default is 9083.
23 | -JTHREADS The number of jmeter threads to start. The default is 50.
24 | -JDURATION The time (in seconds) to run jmeter.
25 | -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.
26 | -JBOTUID The lowest user id. The default is 0.
27 | -JTOPUID The highest user id. The default is 14999, which assumes there are 15,000 users in the database.
28 |
29 | Example: ./jmeter -n -t daytrader3.jmx -JHOST=myserver -JPORT=9083 -JDURATION=300
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
5 | 4.0.0
6 |
7 |
8 | net.wasdev.maven.parent
9 | java7-parent
10 | 1.3
11 |
12 |
13 | net.wasdev.wlp.sample
14 | daytrader3
15 | pom
16 | 1.0-SNAPSHOT
17 | WAS Liberty Sample - Java EE6 Benchmark Sample
18 |
19 |
20 |
21 | The Apache Software License, Version 2.0
22 | https://raw.github.com/WASdev/sample.async.jaxrs/master/LICENSE
23 | repo
24 |
25 |
26 |
27 |
32 |
33 |
34 |
35 | daytrader3-ee6-ejb
36 | daytrader3-ee6-rest
37 | daytrader3-ee6-web
38 | daytrader3-ee6
39 | daytrader3-ee6-wlpcfg
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'daytrader3'
2 |
3 | include ':daytrader3-ee6'
4 | include ':daytrader3-ee6-wlpcfg'
5 | include ':daytrader3-ee6-ejb'
6 | include ':daytrader3-ee6-web'
7 | include ':daytrader3-ee6-rest'
8 |
9 |
10 | project(':daytrader3-ee6').projectDir = "$rootDir/daytrader3-ee6" as File
11 | project(':daytrader3-ee6-wlpcfg').projectDir = "$rootDir/daytrader3-ee6-wlpcfg" as File
12 | project(':daytrader3-ee6-ejb').projectDir = "$rootDir/daytrader3-ee6-ejb" as File
13 | project(':daytrader3-ee6-web').projectDir = "$rootDir/daytrader3-ee6-web" as File
14 | project(':daytrader3-ee6-rest').projectDir = "$rootDir/daytrader3-ee6-rest" as File
15 |
--------------------------------------------------------------------------------