├── .gitignore
├── LICENSE
├── MIGRATING.md
├── NOTICE
├── README.md
├── bin
└── dbscripts
│ ├── db2
│ └── Table.ddl
│ ├── derby
│ ├── Table.ddl
│ ├── createDerbyDB.bat
│ └── createDerbyDB.sh
│ ├── oracle
│ └── Table.ddl
│ └── sqlserver
│ └── Table.sql
├── configuration
└── application-users.properties
├── javaee6
├── assemblies
│ ├── daytrader-ear
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ └── application.xml
│ └── pom.xml
├── modules
│ ├── entities
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ ├── java
│ │ │ └── org
│ │ │ │ └── apache
│ │ │ │ └── geronimo
│ │ │ │ └── daytrader
│ │ │ │ └── javaee6
│ │ │ │ └── entities
│ │ │ │ ├── AccountDataBean.java
│ │ │ │ ├── AccountProfileDataBean.java
│ │ │ │ ├── HoldingDataBean.java
│ │ │ │ ├── OrderDataBean.java
│ │ │ │ └── QuoteDataBean.java
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ └── persistence.xml
│ ├── pom.xml
│ ├── utils
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── geronimo
│ │ │ └── daytrader
│ │ │ └── javaee6
│ │ │ └── utils
│ │ │ ├── KeyBlock.java
│ │ │ ├── Log.java
│ │ │ ├── MDBStats.java
│ │ │ ├── TimerStat.java
│ │ │ └── TradeConfig.java
│ └── web
│ │ ├── pom.xml
│ │ └── src
│ │ └── main
│ │ ├── java
│ │ ├── org
│ │ │ └── apache
│ │ │ │ └── geronimo
│ │ │ │ └── daytrader
│ │ │ │ └── javaee6
│ │ │ │ ├── core
│ │ │ │ ├── api
│ │ │ │ │ ├── TradeDBServices.java
│ │ │ │ │ └── TradeServices.java
│ │ │ │ ├── beans
│ │ │ │ │ ├── MarketSummaryDataBean.java
│ │ │ │ │ ├── MarketSummaryDataBeanWS.java
│ │ │ │ │ └── RunStatsDataBean.java
│ │ │ │ └── direct
│ │ │ │ │ ├── FinancialUtils.java
│ │ │ │ │ ├── KeySequenceDirect.java
│ │ │ │ │ ├── TradeJDBCDirect.java
│ │ │ │ │ ├── TradeJEEDirect.java
│ │ │ │ │ └── TradeJPADirect.java
│ │ │ │ └── web
│ │ │ │ ├── AppListener.java
│ │ │ │ ├── Beans
│ │ │ │ ├── AccountDataJSF.java
│ │ │ │ ├── HoldingData.java
│ │ │ │ ├── MarketSummaryJSF.java
│ │ │ │ ├── OrderData.java
│ │ │ │ ├── OrderDataJSF.java
│ │ │ │ ├── PortfolioJSF.java
│ │ │ │ ├── QuoteData.java
│ │ │ │ ├── QuoteDataJSF.java
│ │ │ │ ├── TradeAppJSF.java
│ │ │ │ └── TradeConfigJSF.java
│ │ │ │ ├── OrdersAlertFilter.java
│ │ │ │ ├── Service.java
│ │ │ │ ├── ServiceImpl.java
│ │ │ │ ├── TradeAction.java
│ │ │ │ ├── TradeAppServlet.java
│ │ │ │ ├── TradeBuildDB.java
│ │ │ │ ├── TradeConfigServlet.java
│ │ │ │ ├── TradeDirectContextListener.java
│ │ │ │ ├── TradeJDBCContextListener.java
│ │ │ │ ├── TradeJPAContextListener.java
│ │ │ │ ├── TradeScenarioServlet.java
│ │ │ │ ├── TradeServletAction.java
│ │ │ │ ├── WebLogicJNDI.java
│ │ │ │ ├── ejb3
│ │ │ │ ├── DirectSLSBBean.java
│ │ │ │ ├── DirectSLSBLocal.java
│ │ │ │ ├── DirectSLSBRemote.java
│ │ │ │ ├── TradeSLSBBean.java
│ │ │ │ ├── TradeSLSBLocal.java
│ │ │ │ └── TradeSLSBRemote.java
│ │ │ │ └── prims
│ │ │ │ ├── ExplicitGC.java
│ │ │ │ ├── PingBean.java
│ │ │ │ ├── PingJDBCRead.java
│ │ │ │ ├── PingJDBCWrite.java
│ │ │ │ ├── PingServlet.java
│ │ │ │ ├── PingServlet2Include.java
│ │ │ │ ├── PingServlet2IncludeRcv.java
│ │ │ │ ├── PingServlet2JNDI.java
│ │ │ │ ├── PingServlet2Jsp.java
│ │ │ │ ├── PingServlet2Servlet.java
│ │ │ │ ├── PingServlet2ServletRcv.java
│ │ │ │ ├── PingServletWriter.java
│ │ │ │ ├── PingSession1.java
│ │ │ │ ├── PingSession2.java
│ │ │ │ ├── PingSession3.java
│ │ │ │ ├── PingSession3Object.java
│ │ │ │ └── ejb3
│ │ │ │ ├── PingServlet2MDBQueue.java
│ │ │ │ ├── PingServlet2MDBTopic.java
│ │ │ │ ├── PingServlet2Session.java
│ │ │ │ ├── PingServlet2Session2CMROne2Many.java
│ │ │ │ ├── PingServlet2Session2CMROne2One.java
│ │ │ │ ├── PingServlet2Session2Entity.java
│ │ │ │ ├── PingServlet2Session2EntityCollection.java
│ │ │ │ ├── PingServlet2Session2JDBC.java
│ │ │ │ ├── PingServlet2Session2JDBCCollection.java
│ │ │ │ └── PingServlet2TwoPhase.java
│ │ └── weblogic
│ │ │ └── application
│ │ │ ├── ApplicationLifecycleEvent.java
│ │ │ └── ApplicationLifecycleListener.java
│ │ ├── resources
│ │ └── dbscripts
│ │ │ ├── db2
│ │ │ └── Table.ddl
│ │ │ ├── derby
│ │ │ └── Table.ddl
│ │ │ ├── informix
│ │ │ └── Table.ddl
│ │ │ ├── mysql
│ │ │ └── Table.ddl
│ │ │ ├── oracle
│ │ │ └── Table.ddl
│ │ │ ├── other
│ │ │ └── Table.ddl
│ │ │ ├── postgre
│ │ │ └── Table.ddl
│ │ │ └── sqlserver
│ │ │ └── Table.ddl
│ │ └── webapp
│ │ ├── META-INF
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── context.xml
│ │ ├── PingHtml.html
│ │ ├── PingJsp.jsp
│ │ ├── PingJspEL.jsp
│ │ ├── PingServlet2Jsp.jsp
│ │ ├── WEB-INF
│ │ ├── faces-config.xml
│ │ ├── jbosscmp-jdbc.xml
│ │ ├── web.xml
│ │ ├── weblogic-application.xml
│ │ └── weblogic-ejb-jar.xml
│ │ ├── account.jsp
│ │ ├── account.xhtml
│ │ ├── accountImg.jsp
│ │ ├── config.jsp
│ │ ├── config.xhtml
│ │ ├── configure.html
│ │ ├── configure.xhtml
│ │ ├── contentHome.html
│ │ ├── contentHome.xhtml
│ │ ├── dbscripts
│ │ ├── db2
│ │ │ └── Table.ddl
│ │ ├── derby
│ │ │ └── Table.ddl
│ │ ├── informix
│ │ │ └── Table.ddl
│ │ ├── mysql
│ │ │ └── Table.ddl
│ │ ├── oracle
│ │ │ └── Table.ddl
│ │ ├── other
│ │ │ └── Table.ddl
│ │ ├── postgre
│ │ │ └── Table.ddl
│ │ └── sqlserver
│ │ │ └── Table.ddl
│ │ ├── displayQuote.jsp
│ │ ├── docs
│ │ ├── benchmarking.html
│ │ ├── documentation.html
│ │ ├── glossary.html
│ │ ├── rtCharacterisitics.html
│ │ ├── tradeFAQ.html
│ │ └── tradeversion.html
│ │ ├── error.jsp
│ │ ├── footer.html
│ │ ├── footer.xhtml
│ │ ├── header.html
│ │ ├── header.xhtml
│ │ ├── hostname.jspf
│ │ ├── images
│ │ ├── DayTraderHead_blue.gif
│ │ ├── DayTraderHead_red.gif
│ │ ├── SOAPconfig.gif
│ │ ├── about.gif
│ │ ├── account.gif
│ │ ├── arrowdown.gif
│ │ ├── arrowup.gif
│ │ ├── bottomRedBar.gif
│ │ ├── configuration.gif
│ │ ├── copyRight.gif
│ │ ├── dayTraderLogo.gif
│ │ ├── faq.gif
│ │ ├── graph.gif
│ │ ├── home.gif
│ │ ├── homeBanner.gif
│ │ ├── line.gif
│ │ ├── logout.gif
│ │ ├── lower_banner.gif
│ │ ├── menuHome.gif
│ │ ├── 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.jsp
│ │ ├── order.jsp
│ │ ├── order.xhtml
│ │ ├── orderImg.jsp
│ │ ├── portfolio.jsp
│ │ ├── portfolio.xhtml
│ │ ├── portfolioImg.jsp
│ │ ├── quote.jsp
│ │ ├── quote.xhtml
│ │ ├── quoteImg.jsp
│ │ ├── register.jsp
│ │ ├── register.xhtml
│ │ ├── registerImg.jsp
│ │ ├── runStats.jsp
│ │ ├── sample.jsp
│ │ ├── style.css
│ │ ├── tradehome.jsp
│ │ ├── tradehome.xhtml
│ │ ├── tradehomeImg.jsp
│ │ ├── web_prmtv.html
│ │ ├── web_prmtv.xhtml
│ │ ├── welcome.jsp
│ │ ├── welcome.xhtml
│ │ └── welcomeImg.jsp
├── plans
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── daytrader-db2-xa-plan.xml
│ │ ├── daytrader-derby-xa-plan.xml
│ │ ├── daytrader-informix-xa-plan.xml
│ │ ├── daytrader-mysql-xa-plan.xml
│ │ ├── daytrader-oracle-xa-plan.xml
│ │ ├── daytrader-postgre-xa-plan.xml
│ │ ├── daytrader-sqlserver-plan.xml
│ │ └── daytrader-sqlserver-xa-plan.xml
└── pom.xml
├── openshift-template.yaml
├── plugins
├── daytrader-db2-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── plan
│ │ └── plan.xml
├── daytrader-derby-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── history
│ │ └── dependencies.xml
│ │ └── plan
│ │ └── plan.xml
├── daytrader-informix-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── plan
│ │ └── plan.xml
├── daytrader-jetty
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── history
│ │ └── dependencies.xml
│ │ └── plan
│ │ └── plan.xml
├── daytrader-jms
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── history
│ │ └── dependencies.xml
│ │ └── plan
│ │ └── plan.xml
├── daytrader-mysql-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── history
│ │ └── dependencies.xml
│ │ └── plan
│ │ └── plan.xml
├── daytrader-oracle-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── plan
│ │ └── plan.xml
├── daytrader-postgre-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── plan
│ │ └── plan.xml
├── daytrader-sqlserver-datasource
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── plan
│ │ └── plan.xml
├── daytrader-tomcat
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── history
│ │ └── dependencies.xml
│ │ └── plan
│ │ └── plan.xml
└── pom.xml
├── pom.xml
└── rest-microservice
├── .gitignore
├── deploy.sh
├── order.json
├── pom.xml
├── reset.sh
├── src
└── main
│ ├── java
│ └── org
│ │ └── jboss
│ │ └── demo
│ │ └── ejbrest
│ │ └── rest
│ │ ├── DayTraderEndpoint.java
│ │ └── Order.java
│ └── webapp
│ └── WEB-INF
│ ├── beans.xml
│ ├── lib
│ ├── daytrader-ejb-client.jar
│ └── entities.jar
│ └── web.xml
└── trade.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
2 | target/
3 | out/
4 | .DS_Store
5 | *.classpath
6 | *.project
7 | *.settings
8 | .security/
9 | *.jar
10 | *.war
11 | *.iml
12 | .idea
13 | .tern-project
14 | workspace
15 | data
16 | logs/
17 | tmp/
18 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Geronimo
2 | Copyright 2003-2010 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Portions of this software were developed at IBM and donated to the
8 | ASF under the Apache 2.0 license. The former work was referred to
9 | as Trade 6.
10 |
--------------------------------------------------------------------------------
/bin/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 |
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(14, 2),
26 | HOLDINGID INTEGER NOT NULL,
27 | QUANTITY DOUBLE NOT NULL,
28 | PURCHASEDATE TIMESTAMP,
29 | ACCOUNT_ACCOUNTID INTEGER,
30 | QUOTE_SYMBOL VARCHAR(250));
31 |
32 | ALTER TABLE HOLDINGEJB
33 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
34 |
35 | CREATE TABLE ACCOUNTPROFILEEJB
36 | (ADDRESS VARCHAR(250),
37 | PASSWD VARCHAR(250),
38 | USERID VARCHAR(250) NOT NULL,
39 | EMAIL VARCHAR(250),
40 | CREDITCARD VARCHAR(250),
41 | FULLNAME VARCHAR(250));
42 |
43 | ALTER TABLE ACCOUNTPROFILEEJB
44 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
45 |
46 | CREATE TABLE QUOTEEJB
47 | (LOW DECIMAL(14, 2),
48 | OPEN1 DECIMAL(14, 2),
49 | VOLUME DOUBLE NOT NULL,
50 | PRICE DECIMAL(14, 2),
51 | HIGH DECIMAL(14, 2),
52 | COMPANYNAME VARCHAR(250),
53 | SYMBOL VARCHAR(250) NOT NULL,
54 | CHANGE1 DOUBLE NOT NULL);
55 |
56 | ALTER TABLE QUOTEEJB
57 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
58 |
59 | CREATE TABLE KEYGENEJB
60 | (KEYVAL INTEGER NOT NULL,
61 | KEYNAME VARCHAR(250) NOT NULL);
62 |
63 | ALTER TABLE KEYGENEJB
64 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
65 |
66 | CREATE TABLE ACCOUNTEJB
67 | (CREATIONDATE TIMESTAMP,
68 | OPENBALANCE DECIMAL(14, 2),
69 | LOGOUTCOUNT INTEGER NOT NULL,
70 | BALANCE DECIMAL(14, 2),
71 | ACCOUNTID INTEGER NOT NULL,
72 | LASTLOGIN TIMESTAMP,
73 | LOGINCOUNT INTEGER NOT NULL,
74 | PROFILE_USERID VARCHAR(250));
75 |
76 | ALTER TABLE ACCOUNTEJB
77 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
78 |
79 | CREATE TABLE ORDEREJB
80 | (ORDERFEE DECIMAL(14, 2),
81 | COMPLETIONDATE TIMESTAMP,
82 | ORDERTYPE VARCHAR(250),
83 | ORDERSTATUS VARCHAR(250),
84 | PRICE DECIMAL(14, 2),
85 | QUANTITY DOUBLE NOT NULL,
86 | OPENDATE TIMESTAMP,
87 | ORDERID INTEGER NOT NULL,
88 | ACCOUNT_ACCOUNTID INTEGER,
89 | QUOTE_SYMBOL VARCHAR(250),
90 | HOLDING_HOLDINGID INTEGER);
91 |
92 | ALTER TABLE ORDEREJB
93 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
94 |
95 | ALTER TABLE HOLDINGEJB VOLATILE;
96 | ALTER TABLE ACCOUNTPROFILEEJB VOLATILE;
97 | ALTER TABLE QUOTEEJB VOLATILE;
98 | ALTER TABLE KEYGENEJB VOLATILE;
99 | ALTER TABLE ACCOUNTEJB VOLATILE;
100 | ALTER TABLE ORDEREJB VOLATILE;
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 |
--------------------------------------------------------------------------------
/bin/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 | CONNECT 'jdbc:derby://localhost:1527/DaytraderDatabase;create=true';
17 |
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 | 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 |
102 | COMMIT;
103 |
--------------------------------------------------------------------------------
/bin/dbscripts/derby/createDerbyDB.bat:
--------------------------------------------------------------------------------
1 | @REM Licensed to the Apache Software Foundation (ASF) under one or more
2 | @REM contributor license agreements. See the NOTICE file distributed with
3 | @REM this work for additional information regarding copyright ownership.
4 | @REM The ASF licenses this file to You under the Apache License, Version 2.0
5 | @REM (the "License"); you may not use this file except in compliance with
6 | @REM the License. You may obtain a copy of the License at
7 | @REM
8 | @REM http://www.apache.org/licenses/LICENSE-2.0
9 | @REM
10 | @REM Unless required by applicable law or agreed to in writing, software
11 | @REM distributed under the License is distributed on an "AS IS" BASIS,
12 | @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @REM See the License for the specific language governing permissions and
14 | @REM limitations under the License.
15 |
16 | @echo off
17 |
18 | if not "%JAVA_HOME%" == "" goto JAVA_OK
19 | @echo Please define the JAVA_HOME environment variable.
20 | @goto END
21 | :JAVA_OK
22 |
23 | if not "%GERONIMO_HOME%" == "" goto GERONIMO_OK
24 | @echo Please define the GERONIMO_HOME environment variable.
25 | @goto END
26 | :GERONIMO_OK
27 |
28 | set DERBY_PATH=%GERONIMO_HOME%\repository\org\apache\derby
29 | set DERBY_VER=10.4.2.0
30 | set CLASSPATH=%DERBY_PATH%\derby\%DERBY_VER%\derby-%DERBY_VER%.jar
31 | set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbynet\%DERBY_VER%\derbynet-%DERBY_VER%.jar
32 | set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbytools\%DERBY_VER%\derbytools-%DERBY_VER%.jar
33 | set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbyclient\%DERBY_VER%\derbyclient-%DERBY_VER%.jar
34 |
35 | @echo "Invoking IJ command line tool to create the database and tables...please wait"
36 |
37 | "%JAVA_HOME%\bin\java" -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij < Table.ddl
38 |
39 | @REM The following command launches the interactive ij command line utility
40 | @REM java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij
41 |
42 | @echo Table creation complete
43 |
44 | :END
45 |
--------------------------------------------------------------------------------
/bin/dbscripts/derby/createDerbyDB.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
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 | if [ "${JAVA_HOME}" = "" ]
19 | then
20 | echo "Please define the JAVA_HOME environment variable."
21 | exit
22 | fi
23 |
24 | if [ "${GERONIMO_HOME}" = "" ]
25 | then
26 | echo "Please define the GERONIMO_HOME environment variable."
27 | exit
28 | fi
29 |
30 | export DERBY_PATH=${GERONIMO_HOME}/repository/org/apache/derby
31 | export DERBY_VER=10.4.2.0
32 | export CLASSPATH=${DERBY_PATH}/derby/${DERBY_VER}/derby-${DERBY_VER}.jar
33 | export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbynet/${DERBY_VER}/derbynet-${DERBY_VER}.jar
34 | export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbytools/${DERBY_VER}/derbytools-${DERBY_VER}.jar
35 | export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbyclient/${DERBY_VER}/derbyclient-${DERBY_VER}.jar
36 |
37 | echo "Invoking IJ command line tool to create the database and tables...please wait"
38 |
39 | ${JAVA_HOME}/bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij < Table.ddl
40 |
41 | # The following command launches the interactive ij command line utility
42 | #${JAVA_HOME}/bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij
43 |
44 | echo "Table creation complete"
45 |
--------------------------------------------------------------------------------
/bin/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 | DROP TABLE HOLDINGEJB cascade constraints;
17 | DROP TABLE ACCOUNTPROFILEEJB cascade constraints;
18 | DROP TABLE QUOTEEJB cascade constraints;
19 | DROP TABLE KEYGENEJB cascade constraints;
20 | DROP TABLE ACCOUNTEJB cascade constraints;
21 | DROP TABLE ORDEREJB cascade constraints;
22 |
23 | CREATE TABLE HOLDINGEJB
24 | (PURCHASEPRICE DECIMAL(14, 2) NULL,
25 | HOLDINGID INTEGER NOT NULL,
26 | QUANTITY NUMBER NOT NULL,
27 | PURCHASEDATE DATE NULL,
28 | ACCOUNT_ACCOUNTID INTEGER NULL,
29 | QUOTE_SYMBOL VARCHAR2(250) NULL);
30 |
31 | ALTER TABLE HOLDINGEJB
32 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
33 |
34 | CREATE TABLE ACCOUNTPROFILEEJB
35 | (ADDRESS VARCHAR2(250) NULL,
36 | PASSWD VARCHAR2(250) NULL,
37 | USERID VARCHAR2(250) NOT NULL,
38 | EMAIL VARCHAR2(250) NULL,
39 | CREDITCARD VARCHAR2(250) NULL,
40 | FULLNAME VARCHAR2(250) NULL);
41 |
42 | ALTER TABLE ACCOUNTPROFILEEJB
43 | ADD CONSTRAINT PK_ACCOUNTPROFILEEJB PRIMARY KEY (USERID);
44 |
45 | CREATE TABLE QUOTEEJB
46 | (LOW DECIMAL(14, 2) NULL,
47 | OPEN1 DECIMAL(14, 2) NULL,
48 | VOLUME NUMBER NOT NULL,
49 | PRICE DECIMAL(14, 2) NULL,
50 | HIGH DECIMAL(14, 2) NULL,
51 | COMPANYNAME VARCHAR2(250) NULL,
52 | SYMBOL VARCHAR2(250) NOT NULL,
53 | CHANGE1 NUMBER NOT NULL);
54 |
55 | ALTER TABLE QUOTEEJB
56 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
57 |
58 | CREATE TABLE KEYGENEJB
59 | (KEYVAL INTEGER NOT NULL,
60 | KEYNAME VARCHAR2(250) NOT NULL);
61 |
62 | ALTER TABLE KEYGENEJB
63 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
64 |
65 | CREATE TABLE ACCOUNTEJB
66 | (CREATIONDATE DATE NULL,
67 | OPENBALANCE DECIMAL(14, 2) NULL,
68 | LOGOUTCOUNT INTEGER NOT NULL,
69 | BALANCE DECIMAL(14, 2) NULL,
70 | ACCOUNTID INTEGER NOT NULL,
71 | LASTLOGIN DATE NULL,
72 | LOGINCOUNT INTEGER NOT NULL,
73 | PROFILE_USERID VARCHAR2(250) NULL);
74 |
75 | ALTER TABLE ACCOUNTEJB
76 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
77 |
78 | CREATE TABLE ORDEREJB
79 | (ORDERFEE DECIMAL(14, 2) NULL,
80 | COMPLETIONDATE DATE NULL,
81 | ORDERTYPE VARCHAR2(250) NULL,
82 | ORDERSTATUS VARCHAR2(250) NULL,
83 | PRICE DECIMAL(14, 2) NULL,
84 | QUANTITY NUMBER NOT NULL,
85 | OPENDATE DATE NULL,
86 | ORDERID INTEGER NOT NULL,
87 | ACCOUNT_ACCOUNTID INTEGER NULL,
88 | QUOTE_SYMBOL VARCHAR2(250) NULL,
89 | HOLDING_HOLDINGID INTEGER NULL);
90 |
91 | ALTER TABLE ORDEREJB
92 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
93 |
94 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
95 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
96 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
97 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
98 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
99 |
100 |
--------------------------------------------------------------------------------
/bin/dbscripts/sqlserver/Table.sql:
--------------------------------------------------------------------------------
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 | use tradedb
17 | go
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 int NOT NULL,
28 | QUANTITY float NOT NULL,
29 | PURCHASEDATE DATETIME,
30 | ACCOUNT_ACCOUNTID int,
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 float NOT NULL,
51 | PRICE DECIMAL(14, 2),
52 | HIGH DECIMAL(14, 2),
53 | COMPANYNAME VARCHAR(250),
54 | SYMBOL VARCHAR(250) NOT NULL,
55 | CHANGE1 float NOT NULL)
56 |
57 | ALTER TABLE QUOTEEJB
58 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL)
59 |
60 | CREATE TABLE KEYGENEJB
61 | (KEYVAL int 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 DATETIME,
69 | OPENBALANCE DECIMAL(14, 2),
70 | LOGOUTCOUNT int NOT NULL,
71 | BALANCE DECIMAL(14, 2),
72 | ACCOUNTID int NOT NULL,
73 | LASTLOGIN DATETIME,
74 | LOGINCOUNT int 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 DATETIME,
83 | ORDERTYPE VARCHAR(250),
84 | ORDERSTATUS VARCHAR(250),
85 | PRICE DECIMAL(14, 2),
86 | QUANTITY float NOT NULL,
87 | OPENDATE DATETIME,
88 | ORDERID int NOT NULL,
89 | ACCOUNT_ACCOUNTID int,
90 | QUOTE_SYMBOL VARCHAR(250),
91 | HOLDING_HOLDINGID int)
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 | go
102 |
--------------------------------------------------------------------------------
/configuration/application-users.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Properties declaration of users for the realm 'ApplicationRealm' which is the default realm
3 | # for application services on a new installation.
4 | #
5 | # This includes the following protocols: remote ejb, remote jndi, web, remote jms
6 | #
7 | # Users can be added to this properties file at any time, updates after the server has started
8 | # will be automatically detected.
9 | #
10 | # The format of this realm is as follows: -
11 | # username=HEX( MD5( username ':' realm ':' password))
12 | #
13 | # A utility script is provided which can be executed from the bin folder to add the users: -
14 | # - Linux
15 | # bin/add-user.sh
16 | #
17 | # - Windows
18 | # bin\add-user.bat
19 | # The following illustrates how an admin user could be defined, this
20 | # is for illustration only and does not correspond to a usable password.
21 | #
22 | #admin=2a0923285184943425d1f53ddd58ec7a
23 | ejbuser=356e32540488f4b41c6a8a43633d45d0
24 | #
25 | #$REALM_NAME=ApplicationRealm$ This line is used by the add-user utility to identify the realm name already used in this file.
26 | #
27 |
--------------------------------------------------------------------------------
/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Geronimo
2 | Copyright 2003-2010 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Portions of this software were developed at IBM and donated to the
8 | ASF under the Apache 2.0 license. The former work was referred to
9 | as Trade 6.
10 |
--------------------------------------------------------------------------------
/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/application.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 | web.war
22 |
23 |
24 |
25 | lib
26 |
27 |
--------------------------------------------------------------------------------
/javaee6/assemblies/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 | 4.0.0
20 |
21 | javaee6
22 | org.apache.geronimo.daytrader
23 | 3.0-SNAPSHOT
24 |
25 |
26 | org.apache.geronimo.daytrader.javaee6
27 | assemblies
28 | pom
29 | DayTrader :: Java EE 6 :: Assemblies
30 | Daytrader Java EE 6 Assemblies
31 |
32 |
33 | daytrader-ear
34 |
35 |
36 |
--------------------------------------------------------------------------------
/javaee6/modules/entities/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Geronimo
2 | Copyright 2003-2010 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Portions of this software were developed at IBM and donated to the
8 | ASF under the Apache 2.0 license. The former work was referred to
9 | as Trade 6.
10 |
--------------------------------------------------------------------------------
/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
23 |
24 |
25 | org.hibernate.ejb.HibernatePersistence
26 |
27 | java:/jdbc/TradeDataSource
28 |
29 | org.apache.geronimo.daytrader.javaee6.entities.AccountDataBean
30 | org.apache.geronimo.daytrader.javaee6.entities.AccountProfileDataBean
31 | org.apache.geronimo.daytrader.javaee6.entities.HoldingDataBean
32 | org.apache.geronimo.daytrader.javaee6.entities.OrderDataBean
33 | org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean
34 | true
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/javaee6/modules/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 | 4.0.0
20 |
21 | javaee6
22 | org.apache.geronimo.daytrader
23 | 3.0-SNAPSHOT
24 |
25 | org.apache.geronimo.daytrader.javaee6
26 | modules
27 | DayTrader :: Java EE 6 :: Modules
28 | Daytrader Java EE 6 Modules
29 | pom
30 |
31 |
32 | UTF-8
33 |
34 |
35 | entities
36 | utils
37 | web
38 |
39 |
40 |
--------------------------------------------------------------------------------
/javaee6/modules/utils/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
20 | 4.0.0
21 |
22 |
23 | modules
24 | org.apache.geronimo.daytrader.javaee6
25 | 3.0-SNAPSHOT
26 |
27 |
28 | org.apache.geronimo.daytrader.javaee6
29 | utils
30 |
31 | DayTrader :: Java EE 6 :: Modules - Utils
32 | Daytrader Java EE 6 Utils Module
33 |
34 |
35 |
36 | org.apache.geronimo.specs
37 | geronimo-jta_1.1_spec
38 | provided
39 |
40 |
41 | org.apache.geronimo.specs
42 | geronimo-jms_1.1_spec
43 | provided
44 |
45 |
46 | org.apache.geronimo.specs
47 | geronimo-jpa_2.0_spec
48 | provided
49 |
50 |
51 | org.apache.geronimo.specs
52 | geronimo-annotation_1.1_spec
53 | provided
54 |
55 |
56 | org.apache.geronimo.specs
57 | geronimo-ejb_3.1_spec
58 | provided
59 |
60 |
61 | commons-logging
62 | commons-logging
63 | provided
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/MDBStats.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 org.apache.geronimo.daytrader.javaee6.utils;
18 |
19 |
20 | /**
21 | *
22 | * To change this generated comment edit the template variable "typecomment":
23 | * Window>Preferences>Java>Templates.
24 | * To enable and disable the creation of type comments go to
25 | * Window>Preferences>Java>Code Generation.
26 | */
27 | public class MDBStats extends java.util.HashMap {
28 |
29 |
30 | //Singleton class
31 | private static MDBStats mdbStats = null;
32 | private MDBStats()
33 | {
34 | }
35 |
36 | public static synchronized MDBStats getInstance()
37 | {
38 | if (mdbStats == null)
39 | mdbStats = new MDBStats();
40 | return mdbStats;
41 | }
42 |
43 | public TimerStat addTiming(String type, long sendTime, long recvTime)
44 | {
45 | TimerStat stats = null;
46 | synchronized (type)
47 | {
48 |
49 | stats = (TimerStat) get(type);
50 | if (stats == null) stats = new TimerStat();
51 |
52 | long time = recvTime - sendTime;
53 | if ( time > stats.getMax() ) stats.setMax(time);
54 | if ( time < stats.getMin() ) stats.setMin(time);
55 | stats.setCount(stats.getCount()+1);
56 | stats.setTotalTime(stats.getTotalTime() + time);
57 |
58 | put(type, stats);
59 | }
60 | return stats;
61 | }
62 |
63 |
64 |
65 | public synchronized void reset()
66 | {
67 | clear();
68 | }
69 |
70 |
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/javaee6/modules/utils/src/main/java/org/apache/geronimo/daytrader/javaee6/utils/TimerStat.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 org.apache.geronimo.daytrader.javaee6.utils;
18 |
19 | /**
20 | *
21 | * To change this generated comment edit the template variable "typecomment":
22 | * Window>Preferences>Java>Templates.
23 | * To enable and disable the creation of type comments go to
24 | * Window>Preferences>Java>Code Generation.
25 | */
26 | public class TimerStat {
27 |
28 | private double min=1000000000.0, max=0.0, totalTime=0.0;
29 | private int count;
30 | /**
31 | * Returns the count.
32 | * @return int
33 | */
34 | public int getCount() {
35 | return count;
36 | }
37 |
38 | /**
39 | * Returns the max.
40 | * @return double
41 | */
42 | public double getMax() {
43 | return max;
44 | }
45 |
46 | /**
47 | * Returns the min.
48 | * @return double
49 | */
50 | public double getMin() {
51 | return min;
52 | }
53 |
54 | /**
55 | * Sets the count.
56 | * @param count The count to set
57 | */
58 | public void setCount(int count) {
59 | this.count = count;
60 | }
61 |
62 | /**
63 | * Sets the max.
64 | * @param max The max to set
65 | */
66 | public void setMax(double max) {
67 | this.max = max;
68 | }
69 |
70 | /**
71 | * Sets the min.
72 | * @param min The min to set
73 | */
74 | public void setMin(double min) {
75 | this.min = min;
76 | }
77 |
78 | /**
79 | * Returns the totalTime.
80 | * @return double
81 | */
82 | public double getTotalTime() {
83 | return totalTime;
84 | }
85 |
86 | /**
87 | * Sets the totalTime.
88 | * @param totalTime The totalTime to set
89 | */
90 | public void setTotalTime(double totalTime) {
91 | this.totalTime = totalTime;
92 | }
93 |
94 | /**
95 | * Returns the max in Secs
96 | * @return double
97 | */
98 | public double getMaxSecs() {
99 | return max/1000.0;
100 | }
101 |
102 | /**
103 | * Returns the min in Secs
104 | * @return double
105 | */
106 | public double getMinSecs() {
107 | return min/1000.0;
108 | }
109 |
110 | /**
111 | * Returns the average time in Secs
112 | * @return double
113 | */
114 | public double getAvgSecs() {
115 |
116 | double avg = (double)getTotalTime() / (double)getCount();
117 | return avg / 1000.0;
118 | }
119 |
120 |
121 | }
122 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeDBServices.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 org.apache.geronimo.daytrader.javaee6.core.api;
18 |
19 |
20 | /**
21 | * TradeDBServices interface specifies the DB specific methods provided by SOME TradeServices instances.
22 | *
23 | * @see TradeJDBCDirect
24 | * @see TradeJEEDirect
25 | *
26 | */
27 | public interface TradeDBServices {
28 |
29 | /**
30 | * TradeBuildDB needs this abstracted method
31 | */
32 | public String checkDBProductName() throws Exception;
33 |
34 | /**
35 | * TradeBuildDB needs this abstracted method
36 | */
37 | public boolean recreateDBTables(Object[] sqlBuffer, java.io.PrintWriter out) throws Exception;
38 | }
39 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/AppListener.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | import weblogic.application.ApplicationLifecycleEvent;
20 | import weblogic.application.ApplicationLifecycleListener;
21 |
22 | public class AppListener extends ApplicationLifecycleListener
23 | {
24 | public void postStart(ApplicationLifecycleEvent evt) {
25 | _initializeTradeSystem();
26 | }
27 |
28 | public void preStop(ApplicationLifecycleEvent evt) {
29 | _completeInflightTrades();
30 | }
31 |
32 | private void _completeInflightTrades() {
33 | new TradeAction().completeOrder(Integer.MAX_VALUE, true);
34 | }
35 | private void _initializeTradeSystem() {
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/Beans/HoldingData.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 org.apache.geronimo.daytrader.javaee6.web.Beans;
18 |
19 | import java.math.BigDecimal;
20 | import java.util.Date;
21 |
22 | import javax.faces.bean.ManagedBean;
23 | import javax.faces.bean.SessionScoped;
24 | import javax.faces.context.FacesContext;
25 | import javax.servlet.http.HttpSession;
26 |
27 | import org.apache.geronimo.daytrader.javaee6.entities.OrderDataBean;
28 | import org.apache.geronimo.daytrader.javaee6.utils.TradeConfig;
29 | import org.apache.geronimo.daytrader.javaee6.web.TradeAction;
30 |
31 | @ManagedBean
32 | @SessionScoped
33 | public class HoldingData {
34 | private Integer holdingID;
35 | private double quantity;
36 | private BigDecimal purchasePrice;
37 | private Date purchaseDate;
38 | private String quoteID;
39 | private BigDecimal price;
40 | private BigDecimal basis;
41 | private BigDecimal marketValue;
42 | private BigDecimal gain;
43 |
44 | public void setHoldingID(Integer holdingID) {
45 | this.holdingID = holdingID;
46 | }
47 |
48 | public Integer getHoldingID() {
49 | return holdingID;
50 | }
51 |
52 | public void setQuantity(double quantity) {
53 | this.quantity = quantity;
54 | }
55 |
56 | public double getQuantity() {
57 | return quantity;
58 | }
59 |
60 | public void setPurchasePrice(BigDecimal purchasePrice) {
61 | this.purchasePrice = purchasePrice;
62 | }
63 |
64 | public BigDecimal getPurchasePrice() {
65 | return purchasePrice;
66 | }
67 |
68 | public void setPurchaseDate(Date purchaseDate) {
69 | this.purchaseDate = purchaseDate;
70 | }
71 |
72 | public Date getPurchaseDate() {
73 | return purchaseDate;
74 | }
75 |
76 | public void setQuoteID(String quoteID) {
77 | this.quoteID = quoteID;
78 | }
79 |
80 | public String getQuoteID() {
81 | return quoteID;
82 | }
83 |
84 | public void setPrice(BigDecimal price) {
85 | this.price = price;
86 | }
87 |
88 | public BigDecimal getPrice() {
89 | return price;
90 | }
91 |
92 | public void setBasis(BigDecimal basis) {
93 | this.basis = basis;
94 | }
95 |
96 | public BigDecimal getBasis() {
97 | return basis;
98 | }
99 |
100 | public void setMarketValue(BigDecimal marketValue) {
101 | this.marketValue = marketValue;
102 | }
103 |
104 | public BigDecimal getMarketValue() {
105 | return marketValue;
106 | }
107 |
108 | public void setGain(BigDecimal gain) {
109 | this.gain = gain;
110 | }
111 |
112 | public BigDecimal getGain() {
113 | return gain;
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/Beans/OrderData.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 org.apache.geronimo.daytrader.javaee6.web.Beans;
18 |
19 | import java.math.BigDecimal;
20 | import java.util.Date;
21 |
22 | public class OrderData{
23 | private Integer orderID;
24 | private String orderStatus;
25 | private Date openDate;
26 | private Date completionDate;
27 | private BigDecimal orderFee;
28 | private String orderType;
29 | private double quantity;
30 | private String symbol;
31 | private BigDecimal total;
32 | private BigDecimal price;
33 |
34 | public OrderData(Integer orderID, String orderStatus, Date openDate, Date completeDate, BigDecimal orderFee, String orderType, double quantity, String symbol){
35 | this.orderID = orderID;
36 | this.completionDate = completeDate;
37 | this.openDate = openDate;
38 | this.orderFee = orderFee;
39 | this.orderType = orderType;
40 | this.orderStatus = orderStatus;
41 | this.quantity = quantity;
42 | this.symbol = symbol;
43 |
44 | }
45 | public void setOrderID(Integer orderID) {
46 | this.orderID = orderID;
47 | }
48 | public Integer getOrderID() {
49 | return orderID;
50 | }
51 | public void setOrderStatus(String orderStatus) {
52 | this.orderStatus = orderStatus;
53 | }
54 | public String getOrderStatus() {
55 | return orderStatus;
56 | }
57 | public void setOpenDate(Date openDate) {
58 | this.openDate = openDate;
59 | }
60 |
61 | public Date getOpenDate() {
62 | return openDate;
63 | }
64 | public void setCompletionDate(Date completionDate) {
65 | this.completionDate = completionDate;
66 | }
67 | public Date getCompletionDate() {
68 | return completionDate;
69 | }
70 | public void setOrderFee(BigDecimal orderFee) {
71 | this.orderFee = orderFee;
72 | }
73 | public BigDecimal getOrderFee() {
74 | return orderFee;
75 | }
76 | public void setOrderType(String orderType) {
77 | this.orderType = orderType;
78 | }
79 | public String getOrderType() {
80 | return orderType;
81 | }
82 | public void setQuantity(double quantity) {
83 | this.quantity = quantity;
84 | }
85 | public double getQuantity() {
86 | return quantity;
87 | }
88 | public void setSymbol(String symbol) {
89 | this.symbol = symbol;
90 | }
91 | public String getSymbol() {
92 | return symbol;
93 | }
94 | public void setTotal(BigDecimal total) {
95 | this.total = total;
96 | }
97 | public BigDecimal getTotal() {
98 | return total;
99 | }
100 | public void setPrice(BigDecimal price) {
101 | this.price = price;
102 | }
103 | public BigDecimal getPrice() {
104 | return price;
105 | }
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/Service.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | public interface Service {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ServiceImpl.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | public class ServiceImpl implements Service {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeDirectContextListener.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | import javax.servlet.*;
20 | import javax.servlet.annotation.WebListener;
21 |
22 | import org.apache.geronimo.daytrader.javaee6.core.direct.TradeJEEDirect;
23 | import org.apache.geronimo.daytrader.javaee6.utils.Log;
24 |
25 | @WebListener
26 | public class TradeDirectContextListener implements ServletContextListener
27 | {
28 |
29 | //receieve trade web app startup/shutown events to start(initialized)/stop TradeJEEDirect
30 | public void contextInitialized(ServletContextEvent event)
31 | {
32 | Log.trace("TradeDirectContextListener:contextInitialized - initializing TradeJEEDirect");
33 | TradeJEEDirect.init();
34 | }
35 | public void contextDestroyed(ServletContextEvent event)
36 | {
37 | Log.trace("TradeDirectContextListener:contextDestroyed - calling TradeJEEDirect:destroy()");
38 | TradeJEEDirect.destroy();
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeJDBCContextListener.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | import javax.servlet.*;
20 |
21 | import javax.servlet.annotation.WebListener;
22 |
23 | import org.apache.geronimo.daytrader.javaee6.core.direct.TradeJDBCDirect;
24 | import org.apache.geronimo.daytrader.javaee6.utils.Log;
25 |
26 | @WebListener
27 | public class TradeJDBCContextListener
28 | implements ServletContextListener
29 | {
30 |
31 | //receieve trade web app startup/shutown events to start(initialized)/stop TradeJDBCDirect
32 | public void contextInitialized(ServletContextEvent event)
33 | {
34 | Log.trace("TradeJDBCContextListener:contextInitialized - initializing TradeJDBCDirect");
35 | TradeJDBCDirect.init();
36 | }
37 | public void contextDestroyed(ServletContextEvent event)
38 | {
39 | Log.trace("TradeJDBCContextListener:contextDestroyed - calling TradeJDBCDirect:destroy()");
40 | TradeJDBCDirect.destroy();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeJPAContextListener.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | import javax.servlet.*;
20 |
21 | import javax.servlet.annotation.WebListener;
22 |
23 | import org.apache.geronimo.daytrader.javaee6.core.direct.TradeJPADirect;
24 | import org.apache.geronimo.daytrader.javaee6.utils.Log;
25 |
26 | @WebListener
27 | public class TradeJPAContextListener implements ServletContextListener
28 | {
29 |
30 | //receieve trade web app startup/shutown events to start(initialized)/stop TradeJPADirect
31 | public void contextInitialized(ServletContextEvent event)
32 | {
33 | Log.trace("TradeJPAContextListener:contextInitialized - initializing TradeJPADirect");
34 | TradeJPADirect.init();
35 | }
36 | public void contextDestroyed(ServletContextEvent event)
37 | {
38 | Log.trace("TradeJPAContextListener:contextDestroyed - calling TradeJPADirect:destroy()");
39 | TradeJPADirect.destroy();
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/WebLogicJNDI.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 org.apache.geronimo.daytrader.javaee6.web;
18 |
19 | import javax.naming.Context;
20 | import javax.naming.InitialContext;
21 | import javax.naming.NamingException;
22 | import javax.servlet.ServletException;
23 | import javax.servlet.ServletOutputStream;
24 | import javax.servlet.http.HttpServletRequest;
25 | import javax.servlet.http.HttpServletResponse;
26 | import java.io.IOException;
27 | import java.util.Hashtable;
28 |
29 | public class WebLogicJNDI {
30 |
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws Exception, ServletException, IOException {
32 | response.setContentType("text/plain");
33 | ServletOutputStream out = response.getOutputStream();
34 | out.println("JNDI=" + lookupService());
35 | }
36 |
37 | private Service lookupService() throws Exception {
38 | try {
39 | Hashtable env = new Hashtable();
40 | env.put( Context.PROVIDER_URL, "t3://localhost:7001" );
41 | env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
42 | env.put( Context.SECURITY_PRINCIPAL, "weblogic" );
43 | env.put( Context.SECURITY_CREDENTIALS, "weblogic" );
44 | Context context = new InitialContext( env );
45 | Service service = (Service)context.lookup("sample.Service#" + ServiceImpl.class.getName());
46 | return service;
47 | } catch (NamingException e) {
48 | return null;
49 | }
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/DirectSLSBLocal.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 |
18 | package org.apache.geronimo.daytrader.javaee6.web.ejb3;
19 |
20 | import javax.ejb.Local;
21 | import org.apache.geronimo.daytrader.javaee6.core.api.TradeServices;
22 |
23 | @Local
24 | public interface DirectSLSBLocal extends TradeServices {
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/DirectSLSBRemote.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 |
18 | package org.apache.geronimo.daytrader.javaee6.web.ejb3;
19 |
20 | import javax.ejb.Remote;
21 | import org.apache.geronimo.daytrader.javaee6.core.api.TradeServices;
22 |
23 | @Remote
24 | public interface DirectSLSBRemote extends TradeServices {
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBLocal.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 |
18 | package org.apache.geronimo.daytrader.javaee6.web.ejb3;
19 |
20 | import javax.ejb.Local;
21 | import org.apache.geronimo.daytrader.javaee6.core.api.TradeServices;
22 | import org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean;
23 |
24 | @Local
25 | public interface TradeSLSBLocal extends TradeServices {
26 | public double investmentReturn(double investment, double NetValue) throws Exception;
27 |
28 | public QuoteDataBean pingTwoPhase(String symbol) throws Exception;
29 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBRemote.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 |
18 | package org.apache.geronimo.daytrader.javaee6.web.ejb3;
19 |
20 | import javax.ejb.Remote;
21 | import org.apache.geronimo.daytrader.javaee6.core.api.TradeServices;
22 | import org.apache.geronimo.daytrader.javaee6.entities.QuoteDataBean;
23 |
24 | @Remote
25 | public interface TradeSLSBRemote extends TradeServices {
26 | public double investmentReturn(double investment, double NetValue) throws Exception;
27 |
28 | public QuoteDataBean pingTwoPhase(String symbol) throws Exception;
29 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingBean.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 org.apache.geronimo.daytrader.javaee6.web.prims;
18 |
19 | /**
20 | *
21 | * Simple bean to get and set messages
22 | */
23 |
24 |
25 | public class PingBean {
26 |
27 | private String msg;
28 |
29 | /**
30 | * returns the message contained in the bean
31 | * @return message String
32 | **/
33 | public String getMsg()
34 | {
35 | return msg;
36 | }
37 | /**
38 | * sets the message contained in the bean
39 | * param message String
40 | **/
41 | public void setMsg(String s)
42 | {
43 | msg = s;
44 | }
45 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2IncludeRcv.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 org.apache.geronimo.daytrader.javaee6.web.prims;
18 |
19 | import java.io.*;
20 | import javax.servlet.*;
21 | import javax.servlet.http.*;
22 | import javax.servlet.annotation.WebServlet;
23 | /**
24 | *
25 | * PingServlet2Include tests servlet to servlet request dispatching. Servlet 1,
26 | * the controller, creates a new JavaBean object forwards the servlet request with
27 | * the JavaBean added to Servlet 2. Servlet 2 obtains access to the JavaBean through
28 | * the Servlet request object and provides the dynamic HTML output based on the JavaBean
29 | * data.
30 | * PingServlet2Servlet is the initial servlet that sends a request to {@link PingServlet2ServletRcv}
31 | *
32 | */
33 | @WebServlet("/servlet/PingServlet2IncludeRcv")
34 | public class PingServlet2IncludeRcv extends HttpServlet {
35 |
36 | /**
37 | * forwards post requests to the doGet method
38 | * Creation date: (11/6/2000 10:52:39 AM)
39 | * @param res javax.servlet.http.HttpServletRequest
40 | * @param res2 javax.servlet.http.HttpServletResponse
41 | */
42 | public void doPost(HttpServletRequest req, HttpServletResponse res)
43 | throws ServletException, IOException {
44 | doGet(req, res);
45 | }
46 | /**
47 | * this is the main method of the servlet that will service all get requests.
48 | * @param request HttpServletRequest
49 | * @param responce HttpServletResponce
50 | **/
51 | public void doGet(HttpServletRequest req, HttpServletResponse res)
52 | throws ServletException, IOException {
53 | // do nothing but get included by PingServlet2Include
54 | }
55 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2Jsp.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 org.apache.geronimo.daytrader.javaee6.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 org.apache.geronimo.daytrader.javaee6.utils.Log;
25 |
26 |
27 | /**
28 | *
29 | * PingServlet2JSP tests a call from a servlet to a JavaServer Page providing server-side dynamic
30 | * HTML through JSP scripting.
31 | *
32 | */
33 | @WebServlet("/servlet/PingServlet2Jsp")
34 | public class PingServlet2Jsp extends HttpServlet {
35 | private static int hitCount = 0;
36 |
37 | /**
38 | * forwards post requests to the doGet method
39 | * Creation date: (11/6/2000 10:52:39 AM)
40 | * @param res javax.servlet.http.HttpServletRequest
41 | * @param res2 javax.servlet.http.HttpServletResponse
42 | */
43 | public void doPost(HttpServletRequest req, HttpServletResponse res)
44 | throws ServletException, IOException {
45 | doGet(req, res);
46 | }
47 |
48 | /**
49 | * this is the main method of the servlet that will service all get requests.
50 | * @param request HttpServletRequest
51 | * @param responce HttpServletResponce
52 | **/
53 | public void doGet(HttpServletRequest req, HttpServletResponse res)
54 | throws ServletException, IOException {
55 | PingBean ab;
56 | try
57 | {
58 | ab = new PingBean();
59 | hitCount++;
60 | ab.setMsg("Hit Count: " + hitCount);
61 | req.setAttribute("ab", ab);
62 |
63 | getServletConfig().getServletContext().getRequestDispatcher("/PingServlet2Jsp.jsp").forward(req, res);
64 | }
65 | catch (Exception ex)
66 | {
67 | Log.error(
68 | ex,"PingServlet2Jsp.doGet(...): request error");
69 | res.sendError(
70 | 500,
71 | "PingServlet2Jsp.doGet(...): request error"
72 | + ex.toString());
73 |
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2Servlet.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 org.apache.geronimo.daytrader.javaee6.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 org.apache.geronimo.daytrader.javaee6.utils.Log;
25 |
26 |
27 | /**
28 | *
29 | * PingServlet2Servlet tests servlet to servlet request dispatching. Servlet 1,
30 | * the controller, creates a new JavaBean object forwards the servlet request with
31 | * the JavaBean added to Servlet 2. Servlet 2 obtains access to the JavaBean through
32 | * the Servlet request object and provides the dynamic HTML output based on the JavaBean
33 | * data.
34 | * PingServlet2Servlet is the initial servlet that sends a request to {@link PingServlet2ServletRcv}
35 | *
36 | */
37 | @WebServlet("/servlet/PingServlet2Servlet")
38 | public class PingServlet2Servlet extends HttpServlet {
39 | private static int hitCount = 0;
40 |
41 | /**
42 | * forwards post requests to the doGet method
43 | * Creation date: (11/6/2000 10:52:39 AM)
44 | * @param res javax.servlet.http.HttpServletRequest
45 | * @param res2 javax.servlet.http.HttpServletResponse
46 | */
47 | public void doPost(HttpServletRequest req, HttpServletResponse res)
48 | throws ServletException, IOException {
49 | doGet(req, res);
50 | }
51 | /**
52 | * this is the main method of the servlet that will service all get requests.
53 | * @param request HttpServletRequest
54 | * @param responce HttpServletResponce
55 | **/
56 | public void doGet(HttpServletRequest req, HttpServletResponse res)
57 | throws ServletException, IOException {
58 | PingBean ab;
59 | try
60 | {
61 | ab = new PingBean();
62 | hitCount++;
63 | ab.setMsg("Hit Count: " + hitCount);
64 | req.setAttribute("ab", ab);
65 |
66 | getServletConfig().getServletContext().getRequestDispatcher("/servlet/PingServlet2ServletRcv").forward(req, res);
67 | }
68 | catch (Exception ex)
69 | {
70 | Log.error(
71 | ex, "PingServlet2Servlet.doGet(...): general exception");
72 | res.sendError(500, "PingServlet2Servlet.doGet(...): general exception" + ex.toString());
73 |
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/PingServlet2ServletRcv.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 org.apache.geronimo.daytrader.javaee6.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 org.apache.geronimo.daytrader.javaee6.utils.Log;
25 |
26 | /**
27 | *
28 | * PingServlet2Servlet tests servlet to servlet request dispatching. Servlet 1,
29 | * the controller, creates a new JavaBean object forwards the servlet request with
30 | * the JavaBean added to Servlet 2. Servlet 2 obtains access to the JavaBean through
31 | * the Servlet request object and provides the dynamic HTML output based on the JavaBean
32 | * data.
33 | * PingServlet2ServletRcv receives a request from {@link PingServlet2Servlet} and displays output.
34 | *
35 | */
36 | @WebServlet("/servlet/PingServlet2ServletRcv")
37 | public class PingServlet2ServletRcv extends HttpServlet {
38 | private static String initTime = null;
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 |
52 | /**
53 | * this is the main method of the servlet that will service all get requests.
54 | * @param request HttpServletRequest
55 | * @param responce HttpServletResponce
56 | **/
57 | public void doGet(HttpServletRequest req, HttpServletResponse res)
58 | throws ServletException, IOException {
59 | PingBean ab;
60 | try
61 | {
62 | ab = (PingBean) req.getAttribute("ab");
63 | res.setContentType("text/html");
64 | PrintWriter out = res.getWriter();
65 | out.println(
66 | "Ping Servlet2Servlet"
67 | + " PingServlet2Servlet: Init time: "
68 | + initTime
69 | + "
Message from Servlet: "
70 | + ab.getMsg()
71 | + "");
72 | }
73 | catch (Exception ex)
74 | {
75 | Log.error(ex, "PingServlet2ServletRcv.doGet(...): general exception");
76 | res.sendError(
77 | 500,
78 | "PingServlet2ServletRcv.doGet(...): general exception"
79 | + ex.toString());
80 | }
81 |
82 | }
83 | /**
84 | * called when the class is loaded to initialize the servlet
85 | * @param config ServletConfig:
86 | **/
87 | public void init(ServletConfig config) throws ServletException {
88 | super.init(config);
89 | initTime = new java.util.Date().toString();
90 |
91 | }
92 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/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 org.apache.geronimo.daytrader.javaee6.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 | byte[] byteVal = new byte[16]; // 8 * 16 = 128 bits
33 | char[] charVal = new char[8]; // 16 * 8 = 128 bits
34 | int a, b, c, d; // 4 * 32 = 128 bits
35 | float e, f, g, h; // 4 * 32 = 128 bits
36 | double i, j; // 2 * 64 = 128 bits
37 | // Primitive type size = ~5*128= 640
38 |
39 | String s1 = new String("123456789012");
40 | String s2 = new String("abcdefghijkl");
41 | // String type size = ~2*12*16 = 384
42 | // Total blob size (w/o overhead) = 1024
43 |
44 |
45 | // The Session blob must be filled with data to avoid compression of the blob during serialization
46 | PingSession3Object()
47 | {
48 | int index;
49 | byte b = 0x8;
50 | for (index=0; index<16; index++)
51 | {
52 | byteVal[index] = (byte) (b+2);
53 | }
54 |
55 | char c = 'a';
56 | for (index=0; index<8; index++)
57 | {
58 | charVal[index] = (char) (c+2);
59 | }
60 |
61 | a=1; b=2; c=3; d=5;
62 | e = (float)7.0; f=(float)11.0; g=(float)13.0; h=(float)17.0;
63 | i=(double)19.0; j=(double)23.0;
64 | }
65 | /**
66 | * Main method to test the serialization of the Session Data blob object
67 | * Creation date: (4/3/2000 3:07:34 PM)
68 | * @param args java.lang.String[]
69 | */
70 |
71 | /** Since the following main method were written for testing purpose, we comment them out
72 | *public static void main(String[] args) {
73 | * try {
74 | * PingSession3Object data = new PingSession3Object();
75 | *
76 | * FileOutputStream ostream = new FileOutputStream("c:\\temp\\datablob.xxx");
77 | * ObjectOutputStream p = new ObjectOutputStream(ostream);
78 | * p.writeObject(data);
79 | * p.flush();
80 | * ostream.close();
81 | * }
82 | * catch (Exception e)
83 | * {
84 | * System.out.println("Exception: " + e.toString());
85 | * }
86 | *}
87 | */
88 |
89 | }
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/weblogic/application/ApplicationLifecycleEvent.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 weblogic.application;
18 |
19 | public interface ApplicationLifecycleEvent {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/java/weblogic/application/ApplicationLifecycleListener.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 weblogic.application;
18 |
19 | public class ApplicationLifecycleListener {
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/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 | -- DROP TABLE OPENJPASEQ;
25 |
26 | create table OPENJPASEQ
27 | (ID SMALLINT NOT NULL PRIMARY KEY,
28 | SEQUENCE_VALUE BIGINT);
29 |
30 | CREATE TABLE HOLDINGEJB
31 | (PURCHASEPRICE DECIMAL(14, 2),
32 | HOLDINGID INTEGER NOT NULL,
33 | QUANTITY DOUBLE NOT NULL,
34 | PURCHASEDATE TIMESTAMP,
35 | ACCOUNT_ACCOUNTID INTEGER,
36 | QUOTE_SYMBOL VARCHAR(250));
37 |
38 | ALTER TABLE HOLDINGEJB
39 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
40 |
41 | CREATE TABLE ACCOUNTPROFILEEJB
42 | (ADDRESS VARCHAR(250),
43 | PASSWD VARCHAR(250),
44 | USERID VARCHAR(250) NOT NULL,
45 | EMAIL VARCHAR(250),
46 | CREDITCARD VARCHAR(250),
47 | FULLNAME VARCHAR(250));
48 |
49 | ALTER TABLE ACCOUNTPROFILEEJB
50 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
51 |
52 | CREATE TABLE QUOTEEJB
53 | (LOW DECIMAL(14, 2),
54 | OPEN1 DECIMAL(14, 2),
55 | VOLUME DOUBLE NOT NULL,
56 | PRICE DECIMAL(14, 2),
57 | HIGH DECIMAL(14, 2),
58 | COMPANYNAME VARCHAR(250),
59 | SYMBOL VARCHAR(250) NOT NULL,
60 | CHANGE1 DOUBLE NOT NULL);
61 |
62 | ALTER TABLE QUOTEEJB
63 | ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
64 |
65 | CREATE TABLE KEYGENEJB
66 | (KEYVAL INTEGER NOT NULL,
67 | KEYNAME VARCHAR(250) NOT NULL);
68 |
69 | ALTER TABLE KEYGENEJB
70 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
71 |
72 | CREATE TABLE ACCOUNTEJB
73 | (CREATIONDATE TIMESTAMP,
74 | OPENBALANCE DECIMAL(14, 2),
75 | LOGOUTCOUNT INTEGER NOT NULL,
76 | BALANCE DECIMAL(14, 2),
77 | ACCOUNTID INTEGER NOT NULL,
78 | LASTLOGIN TIMESTAMP,
79 | LOGINCOUNT INTEGER NOT NULL,
80 | PROFILE_USERID VARCHAR(250));
81 |
82 | ALTER TABLE ACCOUNTEJB
83 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
84 |
85 | CREATE TABLE ORDEREJB
86 | (ORDERFEE DECIMAL(14, 2),
87 | COMPLETIONDATE TIMESTAMP,
88 | ORDERTYPE VARCHAR(250),
89 | ORDERSTATUS VARCHAR(250),
90 | PRICE DECIMAL(14, 2),
91 | QUANTITY DOUBLE NOT NULL,
92 | OPENDATE TIMESTAMP,
93 | ORDERID INTEGER NOT NULL,
94 | ACCOUNT_ACCOUNTID INTEGER,
95 | QUOTE_SYMBOL VARCHAR(250),
96 | HOLDING_HOLDINGID INTEGER);
97 |
98 | ALTER TABLE ORDEREJB
99 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
100 |
101 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
102 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
103 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
104 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
105 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
106 |
107 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/dbscripts/informix/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 PRIMARY KEY CONSTRAINT HOLDINGID,
28 | QUANTITY FLOAT NOT NULL,
29 | PURCHASEDATE DATETIME YEAR TO SECOND,
30 | ACCOUNT_ACCOUNTID INTEGER,
31 | QUOTE_SYMBOL VARCHAR(255));
32 |
33 |
34 | CREATE TABLE ACCOUNTPROFILEEJB
35 | (ADDRESS VARCHAR(255),
36 | PASSWD VARCHAR(255),
37 | USERID VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT USERID,
38 | EMAIL VARCHAR(255),
39 | CREDITCARD VARCHAR(255),
40 | FULLNAME VARCHAR(255));
41 |
42 |
43 | CREATE TABLE QUOTEEJB
44 | (LOW DECIMAL(14, 2),
45 | OPEN1 DECIMAL(14, 2),
46 | VOLUME FLOAT NOT NULL,
47 | PRICE DECIMAL(14, 2),
48 | HIGH DECIMAL(14, 2),
49 | COMPANYNAME VARCHAR(255),
50 | SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT SYMBOL,
51 | CHANGE1 FLOAT NOT NULL);
52 |
53 |
54 | CREATE TABLE KEYGENEJB
55 | (KEYVAL INTEGER NOT NULL,
56 | KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT KEYNAME);
57 |
58 |
59 | CREATE TABLE ACCOUNTEJB
60 | (CREATIONDATE DATETIME YEAR TO SECOND,
61 | OPENBALANCE DECIMAL(14, 2),
62 | LOGOUTCOUNT INTEGER NOT NULL,
63 | BALANCE DECIMAL(14, 2),
64 | ACCOUNTID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ACCOUNTID,
65 | LASTLOGIN DATETIME YEAR TO SECOND,
66 | LOGINCOUNT INTEGER NOT NULL,
67 | PROFILE_USERID VARCHAR(255));
68 |
69 |
70 | CREATE TABLE ORDEREJB
71 | (ORDERFEE DECIMAL(14, 2),
72 | COMPLETIONDATE DATETIME YEAR TO SECOND,
73 | ORDERTYPE VARCHAR(255),
74 | ORDERSTATUS VARCHAR(255),
75 | PRICE DECIMAL(14, 2),
76 | QUANTITY FLOAT NOT NULL,
77 | OPENDATE DATETIME YEAR TO SECOND,
78 | ORDERID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ORDERID,
79 | ACCOUNT_ACCOUNTID INTEGER,
80 | QUOTE_SYMBOL VARCHAR(255),
81 | HOLDING_HOLDINGID INTEGER);
82 |
83 |
84 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
85 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
86 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
87 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
88 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
89 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/dbscripts/mysql/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 DATETIME,
30 | ACCOUNT_ACCOUNTID INTEGER,
31 | QUOTE_SYMBOL VARCHAR(255));
32 |
33 | ALTER TABLE holdingejb
34 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
35 |
36 | CREATE TABLE accountprofileejb
37 | (ADDRESS VARCHAR(255),
38 | PASSWD VARCHAR(255),
39 | USERID VARCHAR(255) NOT NULL,
40 | EMAIL VARCHAR(255),
41 | CREDITCARD VARCHAR(255),
42 | FULLNAME VARCHAR(255));
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(255),
54 | SYMBOL VARCHAR(255) 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(255) NOT NULL);
63 |
64 | ALTER TABLE keygenejb
65 | ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
66 |
67 | CREATE TABLE accountejb
68 | (CREATIONDATE DATETIME,
69 | OPENBALANCE DECIMAL(14, 2),
70 | LOGOUTCOUNT INTEGER NOT NULL,
71 | BALANCE DECIMAL(14, 2),
72 | ACCOUNTID INTEGER NOT NULL,
73 | LASTLOGIN DATETIME,
74 | LOGINCOUNT INTEGER NOT NULL,
75 | PROFILE_USERID VARCHAR(255));
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 DATETIME,
83 | ORDERTYPE VARCHAR(255),
84 | ORDERSTATUS VARCHAR(255),
85 | PRICE DECIMAL(14, 2),
86 | QUANTITY DOUBLE NOT NULL,
87 | OPENDATE DATETIME,
88 | ORDERID INTEGER NOT NULL,
89 | ACCOUNT_ACCOUNTID INTEGER,
90 | QUOTE_SYMBOL VARCHAR(255),
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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/dbscripts/other/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/dbscripts/postgre/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 |
19 | -- If you first time initialize postgre db, the drop statements should be commented out as following.
20 | -- DROP TABLE holdingejb;
21 | -- DROP TABLE accountprofileejb;
22 | -- DROP TABLE quoteejb;
23 | -- DROP TABLE keygenejb;
24 | -- DROP TABLE accountejb;
25 | -- DROP TABLE orderejb;
26 |
27 | CREATE TABLE holdingejb
28 | (PURCHASEPRICE DECIMAL(14, 2),
29 | HOLDINGID INTEGER NOT NULL,
30 | QUANTITY DOUBLE PRECISION NOT NULL,
31 | PURCHASEDATE TIMESTAMP,
32 | ACCOUNT_ACCOUNTID INTEGER,
33 | QUOTE_SYMBOL VARCHAR(255));
34 |
35 | ALTER TABLE holdingejb
36 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
37 |
38 | CREATE TABLE accountprofileejb
39 | (ADDRESS VARCHAR(255),
40 | PASSWD VARCHAR(255),
41 | USERID VARCHAR(255) NOT NULL,
42 | EMAIL VARCHAR(255),
43 | CREDITCARD VARCHAR(255),
44 | FULLNAME VARCHAR(255));
45 |
46 | ALTER TABLE accountprofileejb
47 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
48 |
49 | CREATE TABLE quoteejb
50 | (LOW DECIMAL(14, 2),
51 | OPEN1 DECIMAL(14, 2),
52 | VOLUME DOUBLE PRECISION NOT NULL,
53 | PRICE DECIMAL(14, 2),
54 | HIGH DECIMAL(14, 2),
55 | COMPANYNAME VARCHAR(255),
56 | SYMBOL VARCHAR(255) NOT NULL,
57 | CHANGE1 DOUBLE PRECISION NOT NULL);
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(255) 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(14, 2),
72 | LOGOUTCOUNT INTEGER NOT NULL,
73 | BALANCE DECIMAL(14, 2),
74 | ACCOUNTID INTEGER NOT NULL,
75 | LASTLOGIN TIMESTAMP,
76 | LOGINCOUNT INTEGER NOT NULL,
77 | PROFILE_USERID VARCHAR(255));
78 |
79 | ALTER TABLE accountejb
80 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
81 |
82 | CREATE TABLE orderejb
83 | (ORDERFEE DECIMAL(14, 2),
84 | COMPLETIONDATE TIMESTAMP,
85 | ORDERTYPE VARCHAR(255),
86 | ORDERSTATUS VARCHAR(255),
87 | PRICE DECIMAL(14, 2),
88 | QUANTITY DOUBLE PRECISION NOT NULL,
89 | OPENDATE TIMESTAMP,
90 | ORDERID INTEGER NOT NULL,
91 | ACCOUNT_ACCOUNTID INTEGER,
92 | QUOTE_SYMBOL VARCHAR(255),
93 | HOLDING_HOLDINGID INTEGER);
94 |
95 | ALTER TABLE orderejb
96 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
97 |
98 | CREATE INDEX ACCOUNT_USERID ON accountejb(PROFILE_USERID);
99 | CREATE INDEX HOLDING_ACCOUNTID ON holdingejb(ACCOUNT_ACCOUNTID);
100 | CREATE INDEX ORDER_ACCOUNTID ON orderejb(ACCOUNT_ACCOUNTID);
101 | CREATE INDEX ORDER_HOLDINGID ON orderejb(HOLDING_HOLDINGID);
102 | CREATE INDEX CLOSED_ORDERS ON orderejb(ACCOUNT_ACCOUNTID,ORDERSTATUS);
103 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/resources/dbscripts/sqlserver/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 INT NOT NULL PRIMARY KEY,
28 | QUANTITY FLOAT NOT NULL,
29 | PURCHASEDATE DATETIME,
30 | ACCOUNT_ACCOUNTID INT,
31 | QUOTE_SYMBOL VARCHAR(255));
32 |
33 |
34 | CREATE TABLE ACCOUNTPROFILEEJB
35 | (ADDRESS VARCHAR(255),
36 | PASSWD VARCHAR(255),
37 | USERID VARCHAR(255) NOT NULL PRIMARY KEY,
38 | EMAIL VARCHAR(255),
39 | CREDITCARD VARCHAR(255),
40 | FULLNAME VARCHAR(255));
41 |
42 |
43 | CREATE TABLE QUOTEEJB
44 | (LOW DECIMAL(14, 2),
45 | OPEN1 DECIMAL(14, 2),
46 | VOLUME FLOAT NOT NULL,
47 | PRICE DECIMAL(14, 2),
48 | HIGH DECIMAL(14, 2),
49 | COMPANYNAME VARCHAR(255),
50 | SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY,
51 | CHANGE1 FLOAT NOT NULL);
52 |
53 |
54 | CREATE TABLE KEYGENEJB
55 | (KEYVAL INT NOT NULL,
56 | KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY);
57 |
58 |
59 | CREATE TABLE ACCOUNTEJB
60 | (CREATIONDATE DATETIME,
61 | OPENBALANCE DECIMAL(14, 2),
62 | LOGOUTCOUNT INT NOT NULL,
63 | BALANCE DECIMAL(14, 2),
64 | ACCOUNTID INT NOT NULL PRIMARY KEY,
65 | LASTLOGIN DATETIME,
66 | LOGINCOUNT INT NOT NULL,
67 | PROFILE_USERID VARCHAR(255));
68 |
69 |
70 | CREATE TABLE ORDEREJB
71 | (ORDERFEE DECIMAL(14, 2),
72 | COMPLETIONDATE DATETIME,
73 | ORDERTYPE VARCHAR(255),
74 | ORDERSTATUS VARCHAR(255),
75 | PRICE DECIMAL(14, 2),
76 | QUANTITY FLOAT NOT NULL,
77 | OPENDATE DATETIME,
78 | ORDERID INT NOT NULL PRIMARY KEY,
79 | ACCOUNT_ACCOUNTID INT,
80 | QUOTE_SYMBOL VARCHAR(255),
81 | HOLDING_HOLDINGID INT);
82 |
83 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
84 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
85 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
86 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
87 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
88 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Geronimo
2 | Copyright 2003-2010 The Apache Software Foundation
3 |
4 | This product includes software developed by
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Portions of this software were developed at IBM and donated to the
8 | ASF under the Apache 2.0 license. The former work was referred to
9 | as Trade 6.
10 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/META-INF/context.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
25 |
26 |
30 |
31 |
35 |
36 |
37 |
38 |
42 |
43 |
48 |
49 |
54 |
55 |
59 |
60 |
61 |
65 |
66 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/PingHtml.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | PingHTML.html
20 |
21 |
22 |
23 |
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.
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
The GeronimoTM
36 | performance benchmark sample provides a suite of apache developed
37 | workloads for characterizing performance of the Geronimo J2EE
38 | application Server. The workloads consist of an end to end web
39 | application and a full set of primitives. The applications are a
40 | collection of Java classes, Java Servlets, Java Server pages, Web
41 | Services, and Enterprise Java Beans built to open J2EE apIs. Together
42 | these provide versatile and portable test cases designed to measure
43 | aspects of scalability and performance.
Daytrader
48 | Daytrader is the Geronimo end-to-end benchmark and performance sample
49 | application. The new Daytrader benchmark has been re-designed and
50 | developed to cover Geronimo's significantly expanding programming
51 | model. This provides a real world workload driving Geronimo's
52 | implementation of J2EE 1.4 and Web Services including key Geronimo
53 | performance components and features.
54 |
55 | Daytrader's new design spans J2EE 1.4 including the new EJB 2.1
56 | component architecture, Message Driven beans, transactions (1-phase,
57 | 2-phase commit) and Web Services (SOap, WSDL).
58 |
59 | primitives
60 | The primitives provide a set of workloads to
62 | individually test various components of the Geronimo application
63 | Server. The primitives leverage the Daytrader application
64 | infrastructure to test specific Geronimo J2EE components such as the
65 | servlet engine, JSp support, EJB Entitiy, Session and Message Driven
66 | beans, HTTp Session support and more.
67 |
additional overview
68 | information is included in the FAQ
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/javaee6/modules/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 |
--------------------------------------------------------------------------------
/javaee6/modules/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/dbscripts/informix/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 PRIMARY KEY CONSTRAINT HOLDINGID,
28 | QUANTITY FLOAT NOT NULL,
29 | PURCHASEDATE DATETIME YEAR TO SECOND,
30 | ACCOUNT_ACCOUNTID INTEGER,
31 | QUOTE_SYMBOL VARCHAR(255));
32 |
33 |
34 | CREATE TABLE ACCOUNTPROFILEEJB
35 | (ADDRESS VARCHAR(255),
36 | PASSWD VARCHAR(255),
37 | USERID VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT USERID,
38 | EMAIL VARCHAR(255),
39 | CREDITCARD VARCHAR(255),
40 | FULLNAME VARCHAR(255));
41 |
42 |
43 | CREATE TABLE QUOTEEJB
44 | (LOW DECIMAL(14, 2),
45 | OPEN1 DECIMAL(14, 2),
46 | VOLUME FLOAT NOT NULL,
47 | PRICE DECIMAL(14, 2),
48 | HIGH DECIMAL(14, 2),
49 | COMPANYNAME VARCHAR(255),
50 | SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT SYMBOL,
51 | CHANGE1 FLOAT NOT NULL);
52 |
53 |
54 | CREATE TABLE KEYGENEJB
55 | (KEYVAL INTEGER NOT NULL,
56 | KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY CONSTRAINT KEYNAME);
57 |
58 |
59 | CREATE TABLE ACCOUNTEJB
60 | (CREATIONDATE DATETIME YEAR TO SECOND,
61 | OPENBALANCE DECIMAL(14, 2),
62 | LOGOUTCOUNT INTEGER NOT NULL,
63 | BALANCE DECIMAL(14, 2),
64 | ACCOUNTID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ACCOUNTID,
65 | LASTLOGIN DATETIME YEAR TO SECOND,
66 | LOGINCOUNT INTEGER NOT NULL,
67 | PROFILE_USERID VARCHAR(255));
68 |
69 |
70 | CREATE TABLE ORDEREJB
71 | (ORDERFEE DECIMAL(14, 2),
72 | COMPLETIONDATE DATETIME YEAR TO SECOND,
73 | ORDERTYPE VARCHAR(255),
74 | ORDERSTATUS VARCHAR(255),
75 | PRICE DECIMAL(14, 2),
76 | QUANTITY FLOAT NOT NULL,
77 | OPENDATE DATETIME YEAR TO SECOND,
78 | ORDERID INTEGER NOT NULL PRIMARY KEY CONSTRAINT ORDERID,
79 | ACCOUNT_ACCOUNTID INTEGER,
80 | QUOTE_SYMBOL VARCHAR(255),
81 | HOLDING_HOLDINGID INTEGER);
82 |
83 |
84 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
85 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
86 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
87 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
88 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
89 |
--------------------------------------------------------------------------------
/javaee6/modules/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/dbscripts/other/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 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/dbscripts/postgre/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 |
19 | -- If you first time initialize postgre db, the drop statements should be commented out as following.
20 | -- DROP TABLE holdingejb;
21 | -- DROP TABLE accountprofileejb;
22 | -- DROP TABLE quoteejb;
23 | -- DROP TABLE keygenejb;
24 | -- DROP TABLE accountejb;
25 | -- DROP TABLE orderejb;
26 |
27 | CREATE TABLE holdingejb
28 | (PURCHASEPRICE DECIMAL(14, 2),
29 | HOLDINGID INTEGER NOT NULL,
30 | QUANTITY DOUBLE PRECISION NOT NULL,
31 | PURCHASEDATE TIMESTAMP,
32 | ACCOUNT_ACCOUNTID INTEGER,
33 | QUOTE_SYMBOL VARCHAR(255));
34 |
35 | ALTER TABLE holdingejb
36 | ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
37 |
38 | CREATE TABLE accountprofileejb
39 | (ADDRESS VARCHAR(255),
40 | PASSWD VARCHAR(255),
41 | USERID VARCHAR(255) NOT NULL,
42 | EMAIL VARCHAR(255),
43 | CREDITCARD VARCHAR(255),
44 | FULLNAME VARCHAR(255));
45 |
46 | ALTER TABLE accountprofileejb
47 | ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
48 |
49 | CREATE TABLE quoteejb
50 | (LOW DECIMAL(14, 2),
51 | OPEN1 DECIMAL(14, 2),
52 | VOLUME DOUBLE PRECISION NOT NULL,
53 | PRICE DECIMAL(14, 2),
54 | HIGH DECIMAL(14, 2),
55 | COMPANYNAME VARCHAR(255),
56 | SYMBOL VARCHAR(255) NOT NULL,
57 | CHANGE1 DOUBLE PRECISION NOT NULL);
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(255) 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(14, 2),
72 | LOGOUTCOUNT INTEGER NOT NULL,
73 | BALANCE DECIMAL(14, 2),
74 | ACCOUNTID INTEGER NOT NULL,
75 | LASTLOGIN TIMESTAMP,
76 | LOGINCOUNT INTEGER NOT NULL,
77 | PROFILE_USERID VARCHAR(255));
78 |
79 | ALTER TABLE accountejb
80 | ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
81 |
82 | CREATE TABLE orderejb
83 | (ORDERFEE DECIMAL(14, 2),
84 | COMPLETIONDATE TIMESTAMP,
85 | ORDERTYPE VARCHAR(255),
86 | ORDERSTATUS VARCHAR(255),
87 | PRICE DECIMAL(14, 2),
88 | QUANTITY DOUBLE PRECISION NOT NULL,
89 | OPENDATE TIMESTAMP,
90 | ORDERID INTEGER NOT NULL,
91 | ACCOUNT_ACCOUNTID INTEGER,
92 | QUOTE_SYMBOL VARCHAR(255),
93 | HOLDING_HOLDINGID INTEGER);
94 |
95 | ALTER TABLE orderejb
96 | ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
97 |
98 | CREATE INDEX ACCOUNT_USERID ON accountejb(PROFILE_USERID);
99 | CREATE INDEX HOLDING_ACCOUNTID ON holdingejb(ACCOUNT_ACCOUNTID);
100 | CREATE INDEX ORDER_ACCOUNTID ON orderejb(ACCOUNT_ACCOUNTID);
101 | CREATE INDEX ORDER_HOLDINGID ON orderejb(HOLDING_HOLDINGID);
102 | CREATE INDEX CLOSED_ORDERS ON orderejb(ACCOUNT_ACCOUNTID,ORDERSTATUS);
103 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/dbscripts/sqlserver/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 INT NOT NULL PRIMARY KEY,
28 | QUANTITY FLOAT NOT NULL,
29 | PURCHASEDATE DATETIME,
30 | ACCOUNT_ACCOUNTID INT,
31 | QUOTE_SYMBOL VARCHAR(255));
32 |
33 |
34 | CREATE TABLE ACCOUNTPROFILEEJB
35 | (ADDRESS VARCHAR(255),
36 | PASSWD VARCHAR(255),
37 | USERID VARCHAR(255) NOT NULL PRIMARY KEY,
38 | EMAIL VARCHAR(255),
39 | CREDITCARD VARCHAR(255),
40 | FULLNAME VARCHAR(255));
41 |
42 |
43 | CREATE TABLE QUOTEEJB
44 | (LOW DECIMAL(14, 2),
45 | OPEN1 DECIMAL(14, 2),
46 | VOLUME FLOAT NOT NULL,
47 | PRICE DECIMAL(14, 2),
48 | HIGH DECIMAL(14, 2),
49 | COMPANYNAME VARCHAR(255),
50 | SYMBOL VARCHAR(255) NOT NULL PRIMARY KEY,
51 | CHANGE1 FLOAT NOT NULL);
52 |
53 |
54 | CREATE TABLE KEYGENEJB
55 | (KEYVAL INT NOT NULL,
56 | KEYNAME VARCHAR(255) NOT NULL PRIMARY KEY);
57 |
58 |
59 | CREATE TABLE ACCOUNTEJB
60 | (CREATIONDATE DATETIME,
61 | OPENBALANCE DECIMAL(14, 2),
62 | LOGOUTCOUNT INT NOT NULL,
63 | BALANCE DECIMAL(14, 2),
64 | ACCOUNTID INT NOT NULL PRIMARY KEY,
65 | LASTLOGIN DATETIME,
66 | LOGINCOUNT INT NOT NULL,
67 | PROFILE_USERID VARCHAR(255));
68 |
69 |
70 | CREATE TABLE ORDEREJB
71 | (ORDERFEE DECIMAL(14, 2),
72 | COMPLETIONDATE DATETIME,
73 | ORDERTYPE VARCHAR(255),
74 | ORDERSTATUS VARCHAR(255),
75 | PRICE DECIMAL(14, 2),
76 | QUANTITY FLOAT NOT NULL,
77 | OPENDATE DATETIME,
78 | ORDERID INT NOT NULL PRIMARY KEY,
79 | ACCOUNT_ACCOUNTID INT,
80 | QUOTE_SYMBOL VARCHAR(255),
81 | HOLDING_HOLDINGID INT);
82 |
83 | CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
84 | CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
85 | CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
86 | CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
87 | CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
88 |
--------------------------------------------------------------------------------
/javaee6/modules/web/src/main/webapp/displayQuote.jsp:
--------------------------------------------------------------------------------
1 |
17 | <%@ page
18 | import="java.math.BigDecimal, org.apache.geronimo.daytrader.javaee6.core.direct.*, org.apache.geronimo.daytrader.javaee6.entities.*, org.apache.geronimo.daytrader.javaee6.utils.*,org.apache.geronimo.daytrader.javaee6.core.api.*, org.apache.geronimo.daytrader.javaee6.web.TradeAction"
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 |
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 |