Commit 3f689593 authored by John Zhang's avatar John Zhang

merge version-bump-daytrader to master

parents e9999bd4 4d7db63b
Pipeline #2075 canceled with stage
......@@ -3,7 +3,11 @@ before_script:
- java -version
- ant -version
- cd benchmarks
- echo -e "make=/usr/bin/make\nbuild.failonerror=true\njdk9home=/usr/lib/jvm/java-9-openjdk-amd64" > local.properties
- touch local.properties
- echo "make=/usr/bin/make" >> local.properties
- echo "build.failonerror=true" >> local.properties
- echo "jdk7home=/usr/lib/jvm/java-7-openjdk-amd64" >> local.properties
- echo "jdk9home=/usr/lib/jvm/java-9-openjdk-amd64" >> local.properties
- cat local.properties
avrora:
......
......@@ -24,6 +24,7 @@ import org.dacapo.parser.Config;
public class Tradebeans extends Benchmark {
private Method initializeMethod;
private Method shutdownMethod;
public Tradebeans(Config config, File scratch) throws Exception {
super(config, scratch, false);
......@@ -32,6 +33,7 @@ public class Tradebeans extends Benchmark {
Class<?> clazz = Class.forName("org.dacapo.daytrader.Launcher", true, loader);
this.initializeMethod = clazz.getMethod("initialize", new Class[] { File.class, Integer.TYPE, String.class, Boolean.TYPE });
this.method = clazz.getMethod("performIteration", new Class[] {});
this.shutdownMethod = clazz.getMethod("shutdown", new Class[] {});
}
@Override
......@@ -50,10 +52,15 @@ public class Tradebeans extends Benchmark {
}
public void cleanup() {
try {
shutdownMethod.invoke(null);
}catch (Exception e) {
e.printStackTrace();
}
System.out.println("Shutting down Geronimo...");
if (!getPreserve()) {
deleteTree(new File(scratch, "tradebeans"));
deleteTree(new File(scratch, "geronimo-jetty6-minimal-2.1.4"));
deleteTree(new File(scratch, "geronimo-tomcat7-minimal-3.0.1"));
}
}
......
......@@ -34,6 +34,6 @@ description
author "Apache Geronimo, donated by IBM",
license "Apache License, Version 2.0",
url "http://geronimo.apache.org/",
version "2.1.4",
version "3.0.1",
threads "Explicitly multi-threaded client, scaled to available processors. Internally multi-threaded server.",
repeats "Populates a database with stocks and users, and then perfoms a number of trader actions organized as packets (trade sesions).";
......@@ -22,12 +22,14 @@ import org.dacapo.parser.Config;
*/
public class Tradesoap extends Benchmark {
private Method initializeMethod;
private Method shutdownMethod;
public Tradesoap(Config config, File scratch) throws Exception {
super(config, scratch, false);
Class<?> clazz = Class.forName("org.dacapo.daytrader.Launcher", true, loader);
this.initializeMethod = clazz.getMethod("initialize", new Class[] { File.class, Integer.TYPE, String.class, Boolean.TYPE });
this.method = clazz.getMethod("performIteration", new Class[] {});
this.shutdownMethod = clazz.getMethod("shutdown", new Class[] {});
}
@Override
......@@ -46,10 +48,15 @@ public class Tradesoap extends Benchmark {
}
public void cleanup() {
try {
shutdownMethod.invoke(null);
}catch (Exception e) {
e.printStackTrace();
}
System.out.println("Shutting down Geronimo...");
if (!getPreserve()) {
deleteTree(new File(scratch, "tradesoap"));
deleteTree(new File(scratch, "geronimo-jetty6-minimal-2.1.4"));
deleteTree(new File(scratch, "geronimo-tomcat7-minimal-3.0.1"));
}
}
......
......@@ -34,6 +34,6 @@ description
author "Apache Geronimo, donated by IBM",
license "Apache License, Version 2.0",
url "http://geronimo.apache.org/",
version "2.1.4",
version "3.0.1",
threads "Explicitly multi-threaded client, scaled to available processors. Internally multi-threaded server.",
repeats "Populates a database with stocks and users, and then perfoms a number of trader actions organized as packets (trade sesions).";
......@@ -15,11 +15,8 @@ make=/usr/bin/make
# file.
build.failonerror=true
# Building some of the benchmarks requires jdk 1.6 and its librariess.
# If you have any of these JVMs in standard locations, Derby should
# automatically find them and compile successfully. If you have them
# in non-standard locations, Derby needs to be told where to find the
# class files. It should be sufficient to have a 1.6 JVM.
j16lib=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes
jdk16home=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
jdk9home=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
\ No newline at end of file
# building PMD 6.1.0 requires JDK 9
jdk9home=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
# tradebeans & tradesoap: deploying Geronimo for DayTrader requires JDK 7
jdk7home=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,120 +16,91 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.geronimo.daytrader</groupId>
<artifactId>daytrader</artifactId>
<version>2.2-SNAPSHOT</version>
<artifactId>modules</artifactId>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<version>3.0-SNAPSHOT</version>
</parent>
<artifactId>daytrader-dacapo</artifactId>
<name>DayTrader :: DaCapo Workload</name>
<artifactId>dacapo</artifactId>
<name>DayTrader :: Java EE 6 :: Modules :: DaCapo Workload</name>
<packaging>jar</packaging>
<description>Client demonstrating Web Services</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/modules/dacapo</connection>
<developerConnection>
scm:svn:http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/modules/dacapo</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/geronimo/daytrader/trunk/modules/dacapo</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.daytrader</groupId>
<artifactId>daytrader-ejb</artifactId>
<version>${pom.version}</version>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>web</artifactId>
<version>${project.version}</version>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>utils</artifactId>
<scope>provided</scope>
<type>ejb</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.daytrader</groupId>
<artifactId>daytrader-wsappclient</artifactId>
<version>${pom.version}</version>
<scope>compile</scope>
<dependency>
<groupId>org.apache.geronimo.daytrader.javaee6</groupId>
<artifactId>entities</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
<artifactId>geronimo-ejb_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jsp_2.1_spec</artifactId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_3.0_spec</artifactId>
<artifactId>geronimo-annotation_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ejb_3.0_spec</artifactId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<artifactId>geronimo-jsp_2.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.0_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- Caveat: The wsappclient module currently has a cyclic dependency on the EJB module. Thus we are forced
to include a manual class-path entry pointing to the EJB module. When this is fixed
remove the manifestEntries section below and this comment. -->
<archive>
<!-- <manifestEntries>
<class-path>wsappclient.jar dt-ejb.jar</class-path>
</manifestEntries> -->
<manifestEntries>
<class-path>wsappclient.jar dt-ejb.jar</class-path>
<class-path>web.jar lib/entities.jar lib/utils.jar</class-path>
</manifestEntries>
<manifest>
<main-class>org.apache.geronimo.samples.daytrader.dacapoclient.DaCapoClient</main-class>
<main-class>org.apache.geronimo.daytrader.javaee6.dacapo.dacapoclient.DaCapoClient</main-class>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Caveat: Need to be replaced with axis plugin by Jesse
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wsdl2java-maven-plugin</artifactId>
<configuration>
<packageSpace>org.apache.geronimo.samples.daytrader.client.dacapows</packageSpace>
<serverSide>true</serverSide>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
-->
</plugins>
</build>
</project>
......@@ -14,47 +14,46 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.samples.daytrader.dacapoclient;
package org.apache.geronimo.daytrader.javaee6.dacapo.dacapoclient;
//import org.apache.geronimo.samples.daytrader.*;
import org.apache.geronimo.samples.daytrader.dacapo.DaCapoRunner;
import org.apache.geronimo.samples.daytrader.dacapo.DaCapoTrader;
import org.apache.geronimo.samples.daytrader.soap.TradeWebSoapProxy;
import org.apache.geronimo.daytrader.javaee6.dacapo.*;
import org.apache.geronimo.daytrader.javaee6.soap.TradeWebSoapProxy;
import org.apache.geronimo.daytrader.javaee6.core.direct.TradeJEEDirect;
public class DaCapoClient {
int completed;
int completed;
public static void main(String[] args) {
boolean initialize = false;
boolean beans = false;
int numThreads = 64;
String size = "medium";
try {
for (int i = 0; i < args.length; i++) {
if ("-t".equals(args[i])) {
numThreads = Integer.parseInt(args[++i]);
} else if ("-i".equals(args[i])) {
initialize = true;
} else if ("-s".equals(args[i])) {
size = args[++i];
} else if ("-b".equals(args[i])) {
beans = true;
}
for (int i = 0; i < args.length; i++) {
if ("-t".equals(args[i])) {
numThreads = Integer.parseInt(args[++i]);
} else if ("-i".equals(args[i])) {
initialize = true;
} else if ("-s".equals(args[i])) {
size = args[++i];
} else if ("-b".equals(args[i])) {
beans = true;
}
}
if (initialize) {
DaCapoTrader.initializeTrade(size);
} else {
if (beans) {
/* run workload on the server side */
TradeWebSoapProxy trade = new TradeWebSoapProxy();
trade.runDaCapoTrade(size, numThreads, false);
} else {
/* run workload on the client side */
DaCapoRunner.runDaCapoTrade(size, numThreads, true);
}
}
if (initialize) {
DaCapoTrader.initializeTrade(size);
} else {
if (beans) {
/* run workload on the server side */
TradeWebSoapProxy trade = new TradeWebSoapProxy();
trade.runDaCapoTrade(size, numThreads, false);
} else {
/* run workload on the client side */
DaCapoRunner.runDaCapoTrade(size, numThreads, true);
}
}
} catch (Exception e) {
System.err.println("Caught an unexpected exception!");
e.printStackTrace();
......
Manifest-Version: 1.0
Class-Path: ejb.jar
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.5.4
Main-Class: org.apache.geronimo.samples.daytrader.dacapoclient.DaCapoClient
Manifest-Version: 1.0
Class-Path: ejb.jar
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.5.4
Main-Class: org.apache.geronimo.samples.daytrader.dacapoclient.DaCapoClient
......@@ -23,7 +23,7 @@
<description>WSDL Service Trade</description>
<service-ref-name>service/Trade</service-ref-name>
<service-interface>
org.apache.geronimo.samples.daytrader.client.ws.Trade
org.apache.geronimo.daytrader.javaee6.client.ws.Trade
</service-interface>
<wsdl-file>META-INF/wsdl/TradeServices.wsdl</wsdl-file>
<jaxrpc-mapping-file>
......@@ -35,7 +35,7 @@
</service-qname>
<port-component-ref>
<service-endpoint-interface>
org.apache.geronimo.samples.daytrader.client.ws.TradeWSServices
org.apache.geronimo.daytrader.javaee6.client.ws.TradeWSServices
</service-endpoint-interface>
</port-component-ref>
</service-ref>
......
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.daytrader.javaee6.client.ws;
public class AccountDataBean {
private java.lang.Integer accountID;
private int loginCount;
private int logoutCount;
private java.util.Calendar lastLogin;
private java.util.Calendar creationDate;
private java.math.BigDecimal balance;
private java.math.BigDecimal openBalance;
private java.lang.String profileID;
public AccountDataBean() {
}
public String toString() {
return "\n\tAccount Data for account: " + getAccountID()
+ "\n\t\t loginCount:" + getLoginCount()
+ "\n\t\t logoutCount:" + getLogoutCount()
+ "\n\t\t lastLogin:" + getLastLogin()
+ "\n\t\t creationDate:" + getCreationDate()
+ "\n\t\t balance:" + getBalance()
+ "\n\t\t openBalance:" + getOpenBalance()
+ "\n\t\t profileID:" + getProfileID()
;
}
public java.lang.Integer getAccountID() {
return accountID;
}
public void setAccountID(java.lang.Integer accountID) {
this.accountID = accountID;
}
public int getLoginCount() {
return loginCount;
}
public void setLoginCount(int loginCount) {
this.loginCount = loginCount;
}
public int getLogoutCount() {
return logoutCount;
}
public void setLogoutCount(int logoutCount) {
this.logoutCount = logoutCount;
}
public java.util.Calendar getLastLogin() {
return lastLogin;
}
public void setLastLogin(java.util.Calendar lastLogin) {
this.lastLogin = lastLogin;
}
public java.util.Calendar getCreationDate() {
return creationDate;
}
public void setCreationDate(java.util.Calendar creationDate) {
this.creationDate = creationDate;
}
public java.math.BigDecimal getBalance() {
return balance;
}
public void setBalance(java.math.BigDecimal balance) {
this.balance = balance;
}
public java.math.BigDecimal getOpenBalance() {
return openBalance;
}
public void setOpenBalance(java.math.BigDecimal openBalance) {
this.openBalance = openBalance;
}
public java.lang.String getProfileID() {
return profileID;
}
public void setProfileID(java.lang.String profileID) {
this.profileID = profileID;
}
}
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.daytrader.javaee6.client.ws;
public class AccountProfileDataBean {
private java.lang.String userID;
private java.lang.String password;
private java.lang.String fullName;
private java.lang.String address;
private java.lang.String email;
private java.lang.String creditCard;
public AccountProfileDataBean() {
}
public String toString() {
return "\n\tAccount Profile Data for userID:" + getUserID()
+ "\n\t\t password:" + getPassword()
+ "\n\t\t fullName:" + getFullName()
+ "\n\t\t address:" + getAddress()
+ "\n\t\t email:" + getEmail()
+ "\n\t\t creditCard:" + getCreditCard()
;
}
public java.lang.String getUserID() {
return userID;
}
public void setUserID(java.lang.String userID) {
this.userID = userID;
}
public java.lang.String getPassword() {
return password;
}
public void setPassword(java.lang.String password) {
this.password = password;
}
public java.lang.String getFullName() {
return fullName;
}
public void setFullName(java.lang.String fullName) {
this.fullName = fullName;
}
public java.lang.String getAddress() {
return address;
}
public void setAddress(java.lang.String address) {
this.address = address;
}
public java.lang.String getEmail() {
return email;
}
public void setEmail(java.lang.String email) {
this.email = email;
}
public java.lang.String getCreditCard() {
return creditCard;
}
public void setCreditCard(java.lang.String creditCard) {
this.creditCard = creditCard;
}
}
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.geronimo.daytrader.javaee6.client.ws;
import java.net.URL;