To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 456decc1 authored by Rui Chen's avatar Rui Chen
Browse files

[Daytrader]Updated the patch files for daytrader and geronimo

parent 1c179885
diff -urNw dt-a/daytrader-jetty/pom.xml dt-e/daytrader-jetty/pom.xml
--- daytrader-jetty/pom.xml 2009-10-13 15:17:48.000000000 +1100
+++ daytrader-jetty/pom.xml 2009-10-22 15:20:20.000000000 +1100
@@ -40,7 +40,7 @@
</dependency>
diff -urNw daytrader/javaee6/assemblies/daytrader-ear/pom.xml ../daytrader-new/javaee6/assemblies/daytrader-ear/pom.xml
--- daytrader/javaee6/assemblies/daytrader-ear/pom.xml 2018-03-12 16:45:38.000000000 +1100
+++ ../daytrader-new/javaee6/assemblies/daytrader-ear/pom.xml 2018-03-12 17:50:21.885173631 +1100
@@ -20,7 +20,6 @@
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>utils</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.geronimo.daytrader</groupId>
- <artifactId>daytrader-derby-datasource</artifactId>
+ <artifactId>daytrader-h2-datasource</artifactId>
<version>${version}</version>
<type>car</type>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>entities</artifactId>
@@ -30,6 +29,22 @@
<artifactId>web</artifactId>
<type>war</type>
</dependency>
@@ -195,6 +195,97 @@
</instance>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <echo>Copying manually generated geronimo-plugin.xml files for app daytrader ws client</echo>
+ <copy todir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-ws-client/${version}/daytrader-ws-client-${version}.car/META-INF"
+ failonerror="false" overwrite="true">
+ <fileset dir="${basedir}/../plans/wsclient" includes="geronimo-plugin.xml"/>
+ </copy>
+
+ <echo>Copying manually generated geronimo-plugin.xml files for daytrader dacapo ws client</echo>
+ <copy todir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-dacapo/${version}/daytrader-dacapo-${version}.car/META-INF"
+ failonerror="false" overwrite="true">
+ <fileset dir="${basedir}/../plans/dacapo" includes="geronimo-plugin.xml"/>
+ </copy>
+
+ <echo>Copying manually generated geronimo-plugin.xml files for app daytrader streamer client</echo>
+ <copy todir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-streamer-client/${version}/daytrader-streamer-client-${version}.car/META-INF"
+ failonerror="false" overwrite="true">
+ <fileset dir="${basedir}/../plans/streamerclient" includes="geronimo-plugin.xml"/>
+ </copy>
+
+ <echo>Pack the daytrader ws client car file and install onto local repo</echo>
+ <jar destfile="${project.build.directory}/daytrader-ws-client-${version}.car"
+ basedir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-ws-client/${version}/daytrader-ws-client-${version}.car"/>
+
+ <condition property="mvn.exe" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+ <exec executable="${mvn.exe}">
+ <arg value="install:install-file"/>
+ <arg value="-Dfile=${project.build.directory}/daytrader-ws-client-${version}.car"/>
+ <arg value="-DgroupId=org.apache.geronimo.daytrader"/>
+ <arg value="-DartifactId=daytrader-ws-client"/>
+ <arg value="-Dversion=${version}"/>
+ <arg value="-Dpackaging=car"/>
+ <arg value="-DgeneratePom=true"/>
+ <arg value="-DcreateChecksum=true"/>
+ </exec>
+
+ <echo>Pack the daytrader dacapo ws client car file and install onto local repo</echo>
+ <jar destfile="${project.build.directory}/daytrader-dacapo-${version}.car"
+ basedir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-dacapo/${version}/daytrader-dacapo-${version}.car"/>
+
+ <condition property="mvn.exe" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+ <exec executable="${mvn.exe}">
+ <arg value="install:install-file"/>
+ <arg value="-Dfile=${project.build.directory}/daytrader-dacapo-${version}.car"/>
+ <arg value="-DgroupId=org.apache.geronimo.daytrader"/>
+ <arg value="-DartifactId=daytrader-dacapo"/>
+ <arg value="-Dversion=${version}"/>
+ <arg value="-Dpackaging=car"/>
+ <arg value="-DgeneratePom=true"/>
+ <arg value="-DcreateChecksum=true"/>
+ </exec>
+
+ <echo>Pack the daytrader streamer client car file and install onto local repo</echo>
+ <jar destfile="${project.build.directory}/daytrader-streamer-client-${version}.car"
+ basedir="${project.build.directory}/repository/org/apache/geronimo/daytrader/daytrader-streamer-client/${version}/daytrader-streamer-client-${version}.car"/>
+
+
+ <condition property="mvn.exe" value="mvn.bat" else="mvn">
+ <os family="windows"/>
+ </condition>
+ <exec executable="${mvn.exe}">
+ <arg value="install:install-file"/>
+ <arg value="-Dfile=${project.build.directory}/daytrader-streamer-client-${version}.car"/>
+ <arg value="-DgroupId=org.apache.geronimo.daytrader"/>
+ <arg value="-DartifactId=daytrader-streamer-client"/>
+ <arg value="-Dversion=${version}"/>
+ <arg value="-Dpackaging=car"/>
+ <arg value="-DgeneratePom=true"/>
+ <arg value="-DcreateChecksum=true"/>
+ </exec>
+
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
diff -urNw dt-a/daytrader-jetty/src/main/plan/plan.xml dt-e/daytrader-jetty/src/main/plan/plan.xml
--- daytrader-jetty/src/main/plan/plan.xml 2009-10-13 15:17:48.000000000 +1100
+++ daytrader-jetty/src/main/plan/plan.xml 2009-10-22 15:20:20.000000000 +1100
@@ -179,4 +179,26 @@
</application-client>
</module>
+ <module>
+ <java>dacapo.jar</java>
+ <application-client xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
+ <client-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+ <moduleId>
+ <groupId>org.apache.geronimo.daytrader</groupId>
+ <artifactId>daytrader-dacapo</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ <type>car</type>
+ </moduleId>
+ </client-environment>
+ <server-environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
+ <moduleId>
+ <groupId>org.apache.geronimo.daytrader</groupId>
+ <artifactId>daytrader-dacapo-server</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ <type>car</type>
+ </moduleId>
+ </server-environment>
+ </application-client>
+ </module>
+
</application>
diff -urNw dt-a/daytrader-tomcat/pom.xml dt-e/daytrader-tomcat/pom.xml
--- daytrader-tomcat/pom.xml 2009-10-13 15:17:40.000000000 +1100
+++ daytrader-tomcat/pom.xml 2009-10-22 15:20:20.000000000 +1100
@@ -39,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.daytrader</groupId>
- <artifactId>daytrader-derby-datasource</artifactId>
+ <artifactId>daytrader-h2-datasource</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
diff -urNw dt-a/modules/ear/pom.xml dt-e/modules/ear/pom.xml
--- modules/ear/pom.xml 2009-10-13 15:17:44.000000000 +1100
+++ modules/ear/pom.xml 2009-10-22 15:20:20.000000000 +1100
@@ -58,6 +58,11 @@
<artifactId>daytrader-wsappclient</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.daytrader</groupId>
+ <artifactId>daytrader-dacapo</artifactId>
+ <version>${version}</version>
+ </dependency>
</dependencies>
<build>
+ <dependency>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>dacapo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>wsappclient</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>web</artifactId>
+ <version>${project.version}</version>
+ <classifier>classes</classifier>
+ </dependency>
</dependencies>
<build>
<plugins>
@@ -93,6 +98,12 @@
<bundleFileName>wsappclient.jar</bundleFileName>
<includeInApplicationXml>true</includeInApplicationXml>
</javaModule>
@@ -58,6 +73,23 @@
<contextRoot>/daytrader</contextRoot>
<bundleFileName>web.war</bundleFileName>
</webModule>
+ <javaModule>
+ <groupId>org.apache.geronimo.daytrader</groupId>
+ <artifactId>daytrader-dacapo</artifactId>
+ <bundleFileName>dacapo.jar</bundleFileName>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>web</artifactId>
+ <classifier>classes</classifier>
+ <uri>web.jar</uri>
+ </javaModule>
+ <javaModule>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>dacapo</artifactId>
+ <uri>dacapo.jar</uri>
+ <includeInApplicationXml>true</includeInApplicationXml>
+ </javaModule>
+ <javaModule>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>wsappclient</artifactId>
+ <uri>lib/wsappclient.jar</uri>
+ </javaModule>
</modules>
<!--
HACK: Include legal muck from maven-remote-resources-plugin
diff -urNw dt-a/modules/ejb/pom.xml dt-e/modules/ejb/pom.xml
--- modules/ejb/pom.xml 2009-10-13 15:17:42.000000000 +1100
+++ modules/ejb/pom.xml 2009-10-22 15:20:20.000000000 +1100
@@ -173,6 +173,17 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <generateClient>true</generateClient>
+ <archive>
+ <manifestEntries>
+ <Class-Path>dacapo.jar</Class-Path>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff -urNw daytrader/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/application.xml ../daytrader-new/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/application.xml
--- daytrader/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/application.xml 2018-03-12 16:45:38.000000000 +1100
+++ ../daytrader-new/javaee6/assemblies/daytrader-ear/src/main/resources/META-INF/application.xml 1970-01-01 10:00:00.000000000 +1000
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
- <application-name>daytrader</application-name>
- <description>DayTrader Stock Trading Performance Benchmark Sample</description>
- <display-name>DayTrader EAR</display-name>
-
- <module>
- <web>
- <web-uri>web.war</web-uri>
- <context-root>/daytrader</context-root>
- </web>
- </module>
-
-</application>
\ No newline at end of file
diff -urNw daytrader/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml ../daytrader-new/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
--- daytrader/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml 2018-03-12 16:45:42.000000000 +1100
+++ ../daytrader-new/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml 2018-03-12 17:46:16.734487837 +1100
@@ -30,7 +30,7 @@
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
- <property name="openjpa.jdbc.DBDictionary" value="derby" />
+ <property name="openjpa.jdbc.DBDictionary" value="h2" />
<property name="openjpa.BrokerImpl" value="non-finalizing" />
<!-- To enable OpenJPA to generate foreign key constraints, comment out this line -->
<!-- <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/> -->
diff -urNw daytrader/javaee6/modules/pom.xml ../daytrader-new/javaee6/modules/pom.xml
--- daytrader/javaee6/modules/pom.xml 2018-03-12 16:45:38.000000000 +1100
+++ ../daytrader-new/javaee6/modules/pom.xml 2018-03-12 17:04:56.082488471 +1100
@@ -19,5 +19,7 @@
<module>entities</module>
<module>utils</module>
<module>web</module>
+ <module>dacapo</module>
+ <module>wsappclient</module>
</modules>
</project>
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/TradeDirect.java 2009-10-22 15:20:20.000000000 +1100
@@ -1975,6 +1975,27 @@
}
+ /**
+ * @see TradeServices#resetDaCapo(String)
+ */
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception {
+ org.apache.geronimo.samples.daytrader.dacapo.DaCapoRunner.runDaCapoTrade(size, threads, soap);
+ }
+
+ /**
+ * @see TradeServices#initializeDaCapo(String)
+ */
+ public void initializeDaCapo(String size) throws Exception {
+ org.apache.geronimo.samples.daytrader.dacapo.DaCapoDBBuilder.create(this, 1, size);
+ }
\ No newline at end of file
diff -urNw daytrader/javaee6/modules/web/pom.xml ../daytrader-new/javaee6/modules/web/pom.xml
--- daytrader/javaee6/modules/web/pom.xml 2018-03-12 16:45:41.000000000 +1100
+++ ../daytrader-new/javaee6/modules/web/pom.xml 2018-03-12 17:23:53.712399247 +1100
@@ -28,6 +28,12 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
+ <artifactId>wsappclient</artifactId>
+ <scope>provided</scope>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>entities</artifactId>
<scope>provided</scope>
</dependency>
@@ -126,6 +132,7 @@
</includes>
</resource>
</webResources>
+ <attachClasses>true</attachClasses>
</configuration>
</plugin>
</plugins>
diff -urNw daytrader/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java ../daytrader-new/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java
--- daytrader/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java 2018-03-12 16:45:45.000000000 +1100
+++ ../daytrader-new/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/api/TradeServices.java 2018-03-12 17:07:46.771646293 +1100
@@ -281,5 +281,11 @@
*/
public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception, RemoteException;
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception, RemoteException;
+
+ /**
+ * @see TradeServices#resetDaCapo(String)
+ */
+ public boolean resetDaCapo(String size, int threads) throws Exception {
+ return org.apache.geronimo.samples.daytrader.dacapo.DaCapoDBBuilder.reset(this, size, threads);
+ }
+
private void releaseConn(Connection conn) throws Exception {
try {
if (conn != null) {
@@ -2101,8 +2122,7 @@
private final static String updateAccountProfileSQL = "update accountprofileejb set "
+ "passwd = ?, fullname = ?, address = ?, email = ?, creditcard = ? "
- + "where userid = (select profile_userid from accountejb a "
- + "where a.profile_userid=?)";
+ + "where userid = ?";
private final static String loginSQL = "update accountejb set lastLogin=?, logincount=logincount+1 "
+ "where profile_userid=?";
@@ -2114,17 +2134,14 @@
private static final String getAccountForUpdateSQL = "select * from accountejb a where a.accountid = ? for update";
- private final static String getAccountProfileSQL = "select * from accountprofileejb ap where ap.userid = "
- + "(select profile_userid from accountejb a where a.profile_userid=?)";
+ private final static String getAccountProfileSQL = "select * from accountprofileejb ap where ap.userid = ?";
private final static String getAccountProfileForAccountSQL = "select * from accountprofileejb ap where ap.userid = "
+ "(select profile_userid from accountejb a where a.accountid=?)";
- private static final String getAccountForUserSQL = "select * from accountejb a where a.profile_userid = "
- + "( select userid from accountprofileejb ap where ap.userid = ?)";
+ private static final String getAccountForUserSQL = "select * from accountejb a where a.profile_userid = ?";
- private static final String getAccountForUserForUpdateSQL = "select * from accountejb a where a.profile_userid = "
- + "( select userid from accountprofileejb ap where ap.userid = ?) for update";
+ private static final String getAccountForUserForUpdateSQL = "select * from accountejb a where a.profile_userid = ?";
private static final String getHoldingSQL = "select * from holdingejb h where h.holdingid = ?";
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/DirectSLSBBean.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/DirectSLSBBean.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/DirectSLSBBean.java 2009-10-13 15:17:40.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/DirectSLSBBean.java 2009-10-22 15:20:20.000000000 +1100
@@ -128,4 +128,16 @@
public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception {
return (new TradeDirect(false)).resetTrade(deleteAll);
}
+
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception {
+ (new TradeDirect(true)).runDaCapoTrade(size, threads, soap);
+ }
+ public void initializeDaCapo(String size) throws Exception, RemoteException;
+
+ public void initializeDaCapo(String size) throws Exception {
+ (new TradeDirect(true)).initializeDaCapo(size);
+ }
+
+ public boolean resetDaCapo(String size, int threads) throws Exception {
+ return (new TradeDirect(true)).resetDaCapo(size, threads);
+ }
}
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java 2009-10-13 15:17:40.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ejb3/TradeSLSBBean.java 2009-10-22 15:20:20.000000000 +1100
@@ -615,6 +615,19 @@
return new org.apache.geronimo.samples.daytrader.direct.TradeDirect(false).resetTrade(deleteAll);
}
+ public void runDaCapoTrade(String size, int threads, boolean soap) {
+ System.err.println("Hmmmmmmmmmmmmm... haven't worked this bit out yet: "+size);
+ }
+
+ public void initializeDaCapo(String size) {
+ System.err.println("Hmmmmmmmmmmmmm... haven't worked this bit out yet: "+size);
+ }
+ public boolean resetDaCapo(String size, int threads) throws Exception, RemoteException;
+
+ public boolean resetDaCapo(String size, int threads) {
+ System.err.println("Hmmmmmmmmmmmmm... haven't worked this bit out yet: "+size);
+ return false;
+ }
+
private void publishQuotePriceChange(QuoteDataBean quote, BigDecimal oldPrice, BigDecimal changeFactor, double sharesTraded) {
if (!TradeConfig.getPublishQuotePriceChange())
return;
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWebSoapProxy.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWebSoapProxy.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWebSoapProxy.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWebSoapProxy.java 2009-10-22 15:20:20.000000000 +1100
@@ -266,6 +266,27 @@
return convertQuoteDataBean(getTrade().updateQuotePriceVolume(symbol, newPrice, sharesTraded));
}
}
diff -urNw daytrader/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJDBCDirect.java ../daytrader-new/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJDBCDirect.java
--- daytrader/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJDBCDirect.java 2018-03-12 16:45:40.000000000 +1100
+++ ../daytrader-new/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/core/direct/TradeJDBCDirect.java 2018-03-12 17:07:46.651648286 +1100
@@ -1930,4 +1930,26 @@
return TradeConfig.JDBC;
}
+ /**
+ * @see TradeServices#runDaCapoTrade(String, int, boolean)
+ */
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception {
+ getTrade().runDaCapoTrade(size, threads, soap);
+ }
+
+ /**
+ * @see TradeServices#initializeDaCapo(String)
+ */
+ public void initializeDaCapo(String size) throws Exception {
+ getTrade().initializeDaCapo(size);
+ }
+
+ /**
+ * @see TradeServices#resetDaCapo(String, int)
+ */
+ public boolean resetDaCapo(String size, int threads) throws Exception {
+ return getTrade().resetDaCapo(size, threads);
+ }
+
private org.apache.geronimo.samples.daytrader.OrderDataBean convertOrderDataBean(org.apache.geronimo.samples.daytrader.client.ws.OrderDataBean bean) {
return new org.apache.geronimo.samples.daytrader.OrderDataBean(
bean.getOrderID(),
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWSAction.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWSAction.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWSAction.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/soap/TradeWSAction.java 2009-10-22 15:20:20.000000000 +1100
@@ -180,9 +180,10 @@
}
}
- public void logout(String userID) throws RemoteException {
+ public boolean logout(String userID) throws RemoteException {
try {
trade.logout(userID);
+ return true;
} catch (Exception e) {
throw new RemoteException("", e);
}
@@ -204,4 +205,28 @@
}
}
+ public boolean runDaCapoTrade(String size, int threads, boolean soap) throws RemoteException {
+ try {
+ trade.runDaCapoTrade(size, threads, soap);
+ return true;
+ } catch (Exception e) {
+ throw new RemoteException("", e);
+ }
+ }
+ public boolean initializeDaCapo(String size) throws RemoteException {
+ try {
+ trade.initializeDaCapo(size);
+ return true;
+ } catch (Exception e) {
+ throw new RemoteException("", e);
+ }
+ }
+
+ public boolean resetDaCapo(String size, int threads) throws RemoteException {
+ try {
+ return trade.resetDaCapo(size, threads);
+ } catch (Exception e) {
+ throw new RemoteException("", e);
+ }
+ }
}
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeAction.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeAction.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeAction.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeAction.java 2009-10-22 15:20:20.000000000 +1100
@@ -531,4 +531,41 @@
runStatsData = trade.resetTrade(deleteAll);
return runStatsData;
}
+
+
+ /**
+ * Initialize the database for DaCapo
+ *
+ * @param size the size of the workload
+ * @param threads the number of threads participating in the reset
+ * @see TradeServices#resetDaCapo(String)
+ */
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception {
+ if (Log.doActionTrace())
+ Log.trace("TradeAction:runDaCapoTrade", size);
+ trade.runDaCapoTrade(size, threads, soap);
+ throw new UnsupportedOperationException();
+ }
+
+
+ /**
+ * Initialize the database for DaCapo
+ *
+ * @param size the size of the workload
+ * @see TradeServices#initializeDaCapo(String)
+ */
+ public void initializeDaCapo(String size) throws Exception {
+ if (Log.doActionTrace())
+ Log.trace("TradeAction:initializeDaCapo", size);
+ trade.initializeDaCapo(size);
+ throw new UnsupportedOperationException();
+ }
+
+
+ /**
+ * Initialize the database for DaCapo
+ *
+ * @param size the size of the workload
+ * @param threads the number of threads participating in the reset
+ * @see TradeServices#resetDaCapo(String)
+ */
+ public boolean resetDaCapo(String size, int threads) throws Exception {
+ if (Log.doActionTrace())
+ Log.trace("TradeAction:resetDaCapo", size);
+ return trade.resetDaCapo(size, threads);
+ }
}
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeServices.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeServices.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeServices.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeServices.java 2009-10-22 15:20:20.000000000 +1100
@@ -272,5 +272,11 @@
* return statistics for this benchmark run
*/
public RunStatsDataBean resetTrade(boolean deleteAll) throws Exception, RemoteException;
+
+ public void runDaCapoTrade(String size, int threads, boolean soap) throws Exception, RemoteException;
+ return true; }
+
+ public void initializeDaCapo(String size) throws Exception, RemoteException;
+
+ public boolean resetDaCapo(String size, int threads) throws Exception, RemoteException;
}
diff -urNw dt-a/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java dt-e/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java
--- modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java 2009-10-13 15:17:41.000000000 +1100
+++ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java 2009-10-22 15:20:20.000000000 +1100
@@ -36,7 +36,10 @@
public org.apache.geronimo.samples.daytrader.AccountProfileDataBean getAccountProfileData(java.lang.String userID) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountProfileDataBean updateAccountProfile(org.apache.geronimo.samples.daytrader.AccountProfileDataBean profileData) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountDataBean login(java.lang.String userID, java.lang.String password) throws java.rmi.RemoteException;
- public void logout(java.lang.String userID) throws java.rmi.RemoteException;
+ public boolean logout(java.lang.String userID) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountDataBean register(java.lang.String userID, java.lang.String password, java.lang.String fullname, java.lang.String address, java.lang.String email, java.lang.String creditcard, java.math.BigDecimal openBalance) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.RunStatsDataBean resetTrade(boolean deleteAll) throws java.rmi.RemoteException;
+ public boolean runDaCapoTrade(java.lang.String size, int threads, boolean soap) throws java.rmi.RemoteException;
+ public boolean initializeDaCapo(java.lang.String size) throws java.rmi.RemoteException;
+ public boolean resetDaCapo(java.lang.String size, int threads) throws java.rmi.RemoteException;
}
diff -urNw dt-a/modules/ejb/src/main/resources/META-INF/persistence.xml dt-e/modules/ejb/src/main/resources/META-INF/persistence.xml
--- modules/ejb/src/main/resources/META-INF/persistence.xml 2009-10-13 15:17:42.000000000 +1100
+++ modules/ejb/src/main/resources/META-INF/persistence.xml 2009-10-22 15:20:20.000000000 +1100
@@ -30,7 +30,7 @@
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
- <property name="openjpa.jdbc.DBDictionary" value="derby" />
+ <property name="openjpa.jdbc.DBDictionary" value="h2" />
<property name="openjpa.BrokerImpl" value="non-finalizing" />
<!-- To enable OpenJPA to generate foreign key constraints, comment out this line -->
<!-- <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/> -->
diff -urNw dt-a/modules/json-proxy/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java dt-e/modules/json-proxy/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java
--- modules/json-proxy/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java 2009-10-13 15:17:44.000000000 +1100
+++ modules/json-proxy/src/main/java/org/apache/geronimo/samples/daytrader/TradeWSServices.java 2009-10-22 15:20:20.000000000 +1100
@@ -45,7 +45,10 @@
public org.apache.geronimo.samples.daytrader.AccountProfileDataBean getAccountProfileData(java.lang.String userID) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountProfileDataBean updateAccountProfile(org.apache.geronimo.samples.daytrader.AccountProfileDataBean profileData) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountDataBean login(java.lang.String userID, java.lang.String password) throws java.rmi.RemoteException;
- public void logout(java.lang.String userID) throws java.rmi.RemoteException;
+ public boolean logout(java.lang.String userID) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.AccountDataBean register(java.lang.String userID, java.lang.String password, java.lang.String fullname, java.lang.String address, java.lang.String email, java.lang.String creditcard, java.math.BigDecimal openBalance) throws java.rmi.RemoteException;
public org.apache.geronimo.samples.daytrader.RunStatsDataBean resetTrade(boolean deleteAll) throws java.rmi.RemoteException;
+ public boolean runDaCapoTrade(java.lang.String size, int threads, boolean soap) throws java.rmi.RemoteException;