deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject deltaspike git commit: DELTASPIKE-1049 Avoid bean serializations / use ApplicationScoped instead Dependent for performance reasons
Date Thu, 28 Jan 2016 20:19:59 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 4ae6b0507 -> 515883430


DELTASPIKE-1049 Avoid bean serializations / use ApplicationScoped instead Dependent for performance
reasons

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/51588343
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/51588343
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/51588343

Branch: refs/heads/master
Commit: 5158834308171d1e01aa55b6b7d5a7cd1697ca3d
Parents: 4ae6b05
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Thu Jan 28 21:19:48 2016 +0100
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Thu Jan 28 21:19:48 2016 +0100

----------------------------------------------------------------------
 .../deltaspike/data/impl/builder/QueryBuilderFactory.java     | 7 +++----
 .../org/apache/deltaspike/data/impl/handler/QueryHandler.java | 5 ++---
 .../deltaspike/data/impl/meta/RepositoryComponents.java       | 5 +----
 .../deltaspike/data/impl/tx/TransactionalQueryRunner.java     | 2 ++
 4 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/51588343/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/QueryBuilderFactory.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/QueryBuilderFactory.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/QueryBuilderFactory.java
index ab081bf..be1eaa1 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/QueryBuilderFactory.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/builder/QueryBuilderFactory.java
@@ -22,9 +22,9 @@ import static org.apache.deltaspike.data.impl.meta.MethodType.ANNOTATED;
 import static org.apache.deltaspike.data.impl.meta.MethodType.DELEGATE;
 import static org.apache.deltaspike.data.impl.meta.MethodType.PARSE;
 
-import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
+import javax.enterprise.context.ApplicationScoped;
 
 import org.apache.deltaspike.core.api.provider.BeanProvider;
 import org.apache.deltaspike.core.api.provider.DependentProvider;
@@ -35,11 +35,10 @@ import org.apache.deltaspike.data.impl.meta.QueryInvocationLiteral;
 import org.apache.deltaspike.data.impl.meta.RepositoryMethod;
 import org.apache.deltaspike.data.impl.util.bean.DependentProviderDestroyable;
 
-public class QueryBuilderFactory implements Serializable
+@ApplicationScoped
+public class QueryBuilderFactory
 {
 
-    private static final long serialVersionUID = 1L;
-
     private static final Map<MethodType, QueryInvocationLiteral> LITERALS =
             new HashMap<MethodType, QueryInvocationLiteral>()
             {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/51588343/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
index 5858f16..0831596 100755
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
@@ -48,16 +48,15 @@ import java.lang.reflect.Method;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import javax.enterprise.context.ApplicationScoped;
 
 /**
  * Entry point for query processing.
  */
 @Repository
+@ApplicationScoped
 public class QueryHandler implements Serializable, InvocationHandler
 {
-
-    private static final long serialVersionUID = 1L;
-
     private static final Logger log = Logger.getLogger(QueryHandler.class.getName());
 
     @Inject

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/51588343/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
index f4651f9..2e3d493 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponents.java
@@ -23,7 +23,6 @@ import org.apache.deltaspike.data.impl.meta.extractor.AnnotationMetadataExtracto
 import org.apache.deltaspike.data.impl.meta.extractor.MetadataExtractor;
 import org.apache.deltaspike.data.impl.meta.extractor.TypeMetadataExtractor;
 
-import java.io.Serializable;
 import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.List;
@@ -34,10 +33,8 @@ import java.util.concurrent.ConcurrentHashMap;
  * Convenience class to access Repository and Repository method meta data.
  * Acts as repository for Repository related meta data.
  */
-public class RepositoryComponents implements Serializable
+public class RepositoryComponents
 {
-    private static final long serialVersionUID = 1L;
-
     private final Map<Class<?>, RepositoryComponent> repos = new ConcurrentHashMap<Class<?>,
RepositoryComponent>();
 
     private final List<MetadataExtractor> extractors = Arrays.asList(new AnnotationMetadataExtractor(),

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/51588343/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
index 74079ad..5b8da3c 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/TransactionalQueryRunner.java
@@ -22,6 +22,7 @@ import static org.apache.deltaspike.data.impl.util.ClassUtils.contains;
 import static org.apache.deltaspike.data.impl.util.ClassUtils.extract;
 
 import java.lang.reflect.Method;
+import javax.enterprise.context.ApplicationScoped;
 
 import javax.inject.Inject;
 
@@ -33,6 +34,7 @@ import org.apache.deltaspike.data.impl.meta.RequiresTransaction;
 import org.apache.deltaspike.jpa.spi.entitymanager.ActiveEntityManagerHolder;
 import org.apache.deltaspike.jpa.spi.transaction.TransactionStrategy;
 
+@ApplicationScoped
 public class TransactionalQueryRunner implements QueryRunner
 {
 


Mime
View raw message