You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/03/24 08:47:35 UTC

[incubator-servicecomb-saga] branch master updated (9d57ce6 -> c534e04)

This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git.


 discard 9d57ce6  修改idGenerator 的bean 名称为omegaUniquaIdGenerator
 discard 01d39bb  change type of CompensationContext.contexts from HashMap to ConcurrentHashMap
     new 869effa  SCB-426 change type of CompensationContext.contexts from HashMap to ConcurrentHashMap
     new c534e04  SCB-428 Changed idGenerator bean name omegaUniquaIdGenerator

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (9d57ce6)
            \
             N -- N -- N   refs/heads/master (c534e04)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.

[incubator-servicecomb-saga] 01/02: SCB-426 change type of CompensationContext.contexts from HashMap to ConcurrentHashMap

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit 869effa6aae56d878cbd3e004d05f04f9adf082e
Author: Daniel Qian <ch...@gmail.com>
AuthorDate: Thu Mar 22 16:14:21 2018 +0800

    SCB-426 change type of CompensationContext.contexts from HashMap to ConcurrentHashMap
---
 .../apache/servicecomb/saga/omega/context/CompensationContext.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
index 118b033..067af92 100644
--- a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
+++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
@@ -20,15 +20,15 @@ package org.apache.servicecomb.saga.omega.context;
 import java.lang.invoke.MethodHandles;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class CompensationContext {
   private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  private final Map<String, CompensationContextInternal> contexts = new HashMap<>();
+  private final Map<String, CompensationContextInternal> contexts = new ConcurrentHashMap<>();
 
   public void addCompensationContext(Method compensationMethod, Object target) {
     compensationMethod.setAccessible(true);
@@ -58,4 +58,4 @@ public class CompensationContext {
       this.compensationMethod = compensationMethod;
     }
   }
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.

[incubator-servicecomb-saga] 02/02: SCB-428 Changed idGenerator bean name omegaUniquaIdGenerator

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git

commit c534e042da2c2ecb4e4fd3c847fee2d63c940700
Author: CMonkey <42...@gmail.com>
AuthorDate: Fri Mar 23 11:54:02 2018 +0800

    SCB-428 Changed idGenerator bean name omegaUniquaIdGenerator
---
 .../org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
index fa4027b..1422025 100644
--- a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
+++ b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
@@ -27,6 +27,8 @@ import org.apache.servicecomb.saga.omega.format.KryoMessageFormat;
 import org.apache.servicecomb.saga.omega.format.MessageFormat;
 import org.apache.servicecomb.saga.omega.transaction.MessageHandler;
 import org.apache.servicecomb.saga.omega.transaction.MessageSender;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -35,13 +37,13 @@ import org.springframework.context.annotation.Lazy;
 @Configuration
 class OmegaSpringConfig {
 
-  @Bean
+  @Bean(name = {"omegaUniqueIdGenerator"})
   IdGenerator<String> idGenerator() {
     return new UniqueIdGenerator();
   }
 
   @Bean
-  OmegaContext omegaContext(IdGenerator<String> idGenerator) {
+  OmegaContext omegaContext(@Qualifier("omegaUniqueIdGenerator") IdGenerator<String> idGenerator) {
     return new OmegaContext(idGenerator);
   }
 

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.