Browse Source

[ci fw-only Java/act] update act to 1.0.6; set connection pool number (#2620)

* update act to release version 1.0.2

* update ACT README

* update act to 1.0.4; update act-ebean to 1.0.3

* update README; update act-morphia to 1.0.2

* update to act-1.0.5; update mysql and postgres jdbc driver version

* disable JSON response charset output

* update to act-1.0.6
Green Luo 8 years ago
parent
commit
a7fa2f8b6f

+ 3 - 3
frameworks/Java/act/README.md

@@ -136,9 +136,9 @@ The common base classes for mysql and pgsql classes
 ## Infrastructure Software Versions
 The tests were run with:
 
-* [ActFramework 1.0.2](http://actframework.org/)
-* [act-ebean plugin 1.0.1](https://github.com/actframework/act-ebean)
-* [act-morphia plugin 1.0.1](https://github.com/actframework/act-morphia)
+* [ActFramework 1.0.4](http://actframework.org/)
+* [act-ebean plugin 1.0.3](https://github.com/actframework/act-ebean)
+* [act-morphia plugin 1.0.2](https://github.com/actframework/act-morphia)
 * [Undertow 1.4.8.Final](http://undertow.io/)
 
 ## Local Test Result

+ 6 - 6
frameworks/Java/act/pom.xml

@@ -7,18 +7,18 @@
 
     <groupId>com.techempower</groupId>
     <artifactId>actframework</artifactId>
-    <version>1.0.0</version>
+    <version>1.0.3</version>
     <name>ActFramework sample project</name>
     <packaging>jar</packaging>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <act.version>1.0.2</act.version>
-        <act-morphia.version>1.0.1</act-morphia.version>
-        <act-ebean.version>1.0.1</act-ebean.version>
-        <mysql.version>5.1.38</mysql.version>
-        <postgres-jdbc.version>9.4.1208</postgres-jdbc.version>
+        <act.version>1.0.6</act.version>
+        <act-morphia.version>1.0.3</act-morphia.version>
+        <act-ebean.version>1.0.4</act-ebean.version>
+        <mysql.version>6.0.6</mysql.version>
+        <postgres-jdbc.version>42.0.0</postgres-jdbc.version>
         <app.entry>com.techempower.act.AppEntry</app.entry>
     </properties>
 

+ 1 - 1
frameworks/Java/act/src/main/java/com/techempower/act/AppEntry.java

@@ -36,7 +36,7 @@ public class AppEntry {
 	}
 
 	public static void main(String[] args) throws Exception {
-		RunApp.start("Act Test", Version.appVersion(), AppEntry.class);
+		RunApp.start("ACT Benchmark", Version.appVersion(), AppEntry.class);
 	}
 
 }

+ 1 - 5
frameworks/Java/act/src/main/java/com/techempower/act/controller/WorldControllerBase.java

@@ -3,13 +3,9 @@ package com.techempower.act.controller;
 import act.app.conf.AutoConfig;
 import act.controller.Controller;
 import act.db.Dao;
-import com.avaje.ebean.Transaction;
-import com.avaje.ebean.annotation.Transactional;
 import com.techempower.act.domain.IWorld;
-import com.techempower.act.mongo.domain.World;
 import org.osgl.$;
 import org.osgl.mvc.annotation.GetAction;
-import org.osgl.util.C;
 import org.osgl.util.Const;
 
 import java.util.ArrayList;
@@ -57,7 +53,7 @@ public abstract class WorldControllerBase<MODEL_TYPE extends IWorld,
 	}
 
 	protected List<MODEL_TYPE> doUpdate(int q) {
-		List<MODEL_TYPE> retVal = C.newList();
+		List<MODEL_TYPE> retVal = new ArrayList<>();
 		for (int i = 0; i < q; ++i) {
 			retVal.add(findAndModifyOne());
 		}

+ 1 - 2
frameworks/Java/act/src/main/java/com/techempower/act/sql/controller/SqlWorldControllerBase.java

@@ -5,7 +5,6 @@ import act.db.ebean.EbeanQuery;
 import com.avaje.ebean.Transaction;
 import com.techempower.act.controller.WorldControllerBase;
 import com.techempower.act.sql.domain.World;
-import org.osgl.util.C;
 
 import javax.persistence.PersistenceException;
 import java.util.ArrayList;
@@ -44,7 +43,7 @@ public abstract class SqlWorldControllerBase<
     }
 
     private List<MODEL_TYPE> doBatchUpdate(int q) {
-        List<MODEL_TYPE> retVal = C.newList();
+        List<MODEL_TYPE> retVal = new ArrayList<>();
         Transaction tx = worldDao.ebean().beginTransaction();
         try {
             for (int i = 0; i < q; ++i) {

+ 1 - 0
frameworks/Java/act/src/main/resources/app.version

@@ -0,0 +1 @@
+app.version=${project.version}

+ 3 - 0
frameworks/Java/act/src/main/resources/conf/common/app.properties

@@ -1,6 +1,9 @@
 # follow Java world convention
 http.port=8080
 
+# disable charset output for JSON response
+render.json.output_charset=false
+
 # disable CLI service
 cli=false
 

+ 5 - 5
frameworks/Java/act/src/main/resources/conf/common/db.properties

@@ -5,20 +5,20 @@ mongo.host=localhost
 db.mongo.impl=act.db.morphia.MorphiaPlugin
 db.mongo.uri=mongodb://${mongo.host}/hello_world
 
-
 mysql.host=localhost
 
 db.mysql.impl=act.db.ebean.EbeanPlugin
-db.mysql.url=jdbc:mysql://${mysql.host}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+db.mysql.url=jdbc:mysql://${mysql.host}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts=true&cacheRSMetadata=true&serverTimezone=UTC
 db.mysql.username=benchmarkdbuser
 db.mysql.password=benchmarkdbpass
+db.mysql.maximumPoolSize=256
+db.mysql.useServerPrepStmts=true
 
 pgsql.host=localhost
 
 db.pgsql.impl=act.db.ebean.EbeanPlugin
-db.pgsql.url=jdbc:postgresql://${pgsql.host}:5432/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+db.pgsql.url=jdbc:postgresql://${pgsql.host}:5432/hello_world
 db.pgsql.username=benchmarkdbuser
 db.pgsql.password=benchmarkdbpass
 db.pgsql.namingconvention=com.avaje.ebean.config.MatchingNamingConvention
-
-
+db.pgsql.maximumPoolSize=256