somiljain2006 commented on code in PR #8106:
URL: https://github.com/apache/incubator-seata/pull/8106#discussion_r3299304948


##########
spring/src/main/java/org/apache/seata/spring/annotation/GlobalTransactionScanner.java:
##########
@@ -518,7 +518,7 @@ private MethodDesc makeMethodDesc(GlobalTransactional anno, 
Method method) {
     @Override
     protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String 
beanName, TargetSource customTargetSource)
             throws BeansException {
-        return new Object[] {interceptor};
+        return interceptor == null ? DO_NOT_PROXY : new Object[] {interceptor};

Review Comment:
   My understanding is that this only affects the early AOT bean type 
determination phase, where getAdvicesAndAdvisorsForBean is invoked before 
wrapIfNecessary initializes the interceptor. 
   
   In the normal runtime path, wrapIfNecessary initializes the interceptor 
before proxy creation, so the transactional interceptor is applied as usual. 
   
   The change only avoids returning new Object[] { null } during the premature 
AOT inspection stage, which currently causes UnknownAdviceTypeException. So the 
intention is not to permanently bypass the interceptor, but only to avoid 
creating an invalid proxy before the interceptor becomes available.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to