zhengyangyong commented on a change in pull request #210: [SCB-244] enable servicecomb and add demo URL: https://github.com/apache/incubator-servicecomb-saga/pull/210#discussion_r196996244
########## File path: omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandler.java ########## @@ -22,27 +22,35 @@ import java.lang.invoke.MethodHandles; +import org.apache.servicecomb.core.Handler; +import org.apache.servicecomb.core.Invocation; +import org.apache.servicecomb.foundation.common.utils.BeanUtils; import org.apache.servicecomb.saga.omega.context.OmegaContext; +import org.apache.servicecomb.swagger.invocation.AsyncResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.apache.servicecomb.core.Handler; -import org.apache.servicecomb.core.Invocation; -import org.apache.servicecomb.swagger.invocation.AsyncResponse; +import com.google.common.annotations.VisibleForTesting; public class SagaProviderHandler implements Handler { private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private final OmegaContext omegaContext; - public SagaProviderHandler(@Autowired(required=false) OmegaContext omegaContext) { - this.omegaContext = omegaContext; - if (omegaContext == null) { - LOG.info("The OmegaContext is not injected, The SagaProviderHander is disabled."); + private OmegaContext omegaContext; Review comment: Done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services