WillemJiang commented on a change in pull request #506: SCB-1385 provide a
common way to pass the GID and LID
URL: https://github.com/apache/servicecomb-pack/pull/506#discussion_r305582614
##########
File path:
omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/TransactionAspect.java
##########
@@ -59,4 +70,15 @@ Object advise(ProceedingJoinPoint joinPoint, Compensable
compensable) throws Thr
LOG.debug("Restored context back to {}", context);
}
}
+
+ TransactionContext getTransactionContextFromArgs(Object[] args) {
+ if (args != null) {
+ for (Object arg : args) {
+ if (arg instanceof TransactionContextWrapper) {
+ return ((TransactionContextWrapper) arg).getTransactionContext();
+ }
Review comment:
Do you mean that user could just pass the TransactionContext as a parament
to the subtransaction class? Yeah, we could support this feature at the
meantime.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services