Browse Source

[ci fw-only Java/act] update act to 1.8.8-RC12-SNAPSHOT (#3901)

* [ci fw-only Java/act] update act to 1.8.8-RC12-SNAPSHOT: try fix fortune mustache performance issue

* [ci fw-only Java/act] fix CI issue - shall not skip event listener otherwise JPA context is not setup
Green Luo 7 years ago
parent
commit
0b2750e70b

+ 5 - 0
frameworks/Java/act/CHANGELOG.md

@@ -1,5 +1,10 @@
 TechEmpower Framework Benchmark - ActFramework Change log
 TechEmpower Framework Benchmark - ActFramework Change log
 
 
+**1.8.8e**
+
+* update act to 1.8.8-RC12-SNAPSHOT
+    - fix fortune mustache bad performance issue
+
 **1.8.8d**
 **1.8.8d**
 
 
 * update act to 1.8.8-RC11
 * update act to 1.8.8-RC11

+ 7 - 1
frameworks/Java/act/pom.xml

@@ -22,7 +22,7 @@
   <groupId>com.techempower</groupId>
   <groupId>com.techempower</groupId>
   <artifactId>actframework</artifactId>
   <artifactId>actframework</artifactId>
   <packaging>jar</packaging>
   <packaging>jar</packaging>
-  <version>1.8.8d</version>
+  <version>1.8.8e</version>
 
 
   <name>TEB ActFramework Project</name>
   <name>TEB ActFramework Project</name>
   <description>TEB benchmark project with ActFramework</description>
   <description>TEB benchmark project with ActFramework</description>
@@ -50,6 +50,12 @@
 
 
   <dependencies>
   <dependencies>
 
 
+    <dependency>
+      <groupId>org.actframework</groupId>
+      <artifactId>act</artifactId>
+      <version>1.8.8-RC12-SNAPSHOT</version>
+    </dependency>
+
     <dependency>
     <dependency>
       <groupId>org.actframework</groupId>
       <groupId>org.actframework</groupId>
       <artifactId>act-mustache</artifactId>
       <artifactId>act-mustache</artifactId>

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

@@ -32,6 +32,7 @@ import org.osgl.http.H;
 public class HelloWorldController {
 public class HelloWorldController {
 
 
     private static final String HELLO_WORLD = "Hello, World!";
     private static final String HELLO_WORLD = "Hello, World!";
+    private static final String JSON_TYPE = H.Format.JSON.contentType();
 
 
     public static final class Message {
     public static final class Message {
         private final String message;
         private final String message;
@@ -46,7 +47,7 @@ public class HelloWorldController {
     @OnAppStart
     @OnAppStart
     public void routing() {
     public void routing() {
         Act.getNonblock("/json", context -> context.resp()
         Act.getNonblock("/json", context -> context.resp()
-                .contentType(H.Format.JSON.contentType())
+                .contentType(JSON_TYPE)
                 .writeContent(JSON.toJSONString(new Message(HELLO_WORLD), SerializerFeature.DisableCircularReferenceDetect)));
                 .writeContent(JSON.toJSONString(new Message(HELLO_WORLD), SerializerFeature.DisableCircularReferenceDetect)));
     }
     }
 
 

+ 1 - 7
frameworks/Java/act/src/main/java/com/techempower/act/controller/WorldController.java

@@ -26,10 +26,8 @@ import act.app.conf.AutoConfig;
 import act.db.Dao;
 import act.db.Dao;
 import act.db.sql.tx.Transactional;
 import act.db.sql.tx.Transactional;
 import act.sys.Env;
 import act.sys.Env;
-import act.util.FastJsonFeature;
 import act.util.Global;
 import act.util.Global;
 import act.util.JsonView;
 import act.util.JsonView;
-import com.alibaba.fastjson.serializer.SerializerFeature;
 import com.techempower.act.AppEntry;
 import com.techempower.act.AppEntry;
 import com.techempower.act.model.World;
 import com.techempower.act.model.World;
 import org.osgl.mvc.annotation.GetAction;
 import org.osgl.mvc.annotation.GetAction;
@@ -43,6 +41,7 @@ import javax.inject.Inject;
 @AutoConfig
 @AutoConfig
 @Env.RequireProfile(value = AppEntry.PROFILE_JSON_PLAINTEXT, except = true)
 @Env.RequireProfile(value = AppEntry.PROFILE_JSON_PLAINTEXT, except = true)
 @JsonView
 @JsonView
+@SessionFree
 public class WorldController {
 public class WorldController {
 
 
     private static boolean BATCH_SAVE;
     private static boolean BATCH_SAVE;
@@ -59,14 +58,11 @@ public class WorldController {
 
 
 
 
     @GetAction("db")
     @GetAction("db")
-    @SessionFree
     public World findOne() {
     public World findOne() {
         return dao.findById(randomWorldNumber());
         return dao.findById(randomWorldNumber());
     }
     }
 
 
     @GetAction("queries")
     @GetAction("queries")
-    @SessionFree
-    @FastJsonFeature(SerializerFeature.DisableCircularReferenceDetect)
     public final World[] multipleQueries(String queries) {
     public final World[] multipleQueries(String queries) {
         int q = regulateQueries(queries);
         int q = regulateQueries(queries);
 
 
@@ -78,8 +74,6 @@ public class WorldController {
     }
     }
 
 
     @GetAction("updates")
     @GetAction("updates")
-    @SessionFree
-    @FastJsonFeature(SerializerFeature.DisableCircularReferenceDetect)
     public final List<World> updateQueries(String queries) {
     public final List<World> updateQueries(String queries) {
         int q = regulateQueries(queries);
         int q = regulateQueries(queries);
         return doUpdate(q);
         return doUpdate(q);