in omega/omega-transport/omega-transport-dubbo/src/main/java/org/apache/servicecomb/pack/omega/transport/dubbo/PackDubboProviderFilter.java [50:77]
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
if (omegaContext != null) {
String globalTxId = invocation.getAttachment(GLOBAL_TX_ID_KEY);
if (globalTxId == null) {
LOG.debug("Cannot inject transaction ID, no such omega context global id: {}", GLOBAL_TX_ID_KEY);
} else {
omegaContext.setGlobalTxId(globalTxId);
omegaContext.setLocalTxId(invocation.getAttachment(LOCAL_TX_ID_KEY));
LOG.debug("Added {} {} and {} {} to omegaContext", new Object[] {GLOBAL_TX_ID_KEY, omegaContext.globalTxId(),
LOCAL_TX_ID_KEY, omegaContext.localTxId()});
}
invocation.getAttachments().put(GLOBAL_TX_ID_KEY, null);
invocation.getAttachments().put(LOCAL_TX_ID_KEY, null);
} else {
LOG.debug("Cannot inject transaction ID, as the OmegaContext is null.");
}
try {
if (invoker != null) {
return invoker.invoke(invocation);
} else {
return null;
}
} finally {
if (omegaContext != null) {
omegaContext.clear();
}
}
}