keepConcentration commented on issue #7568:
URL: 
https://github.com/apache/incubator-seata/issues/7568#issuecomment-3151033143

   Thank you for assigning me to this issue. :)
   
   I've analyzed the issue and the related code.
   
   Inside `DefaultInterfaceParser.parserInterfaceToProxy`, the 
`invocationHandlerList` is sorted using the `order()` method of 
`ProxyInvocationHandler`.
   
   Here’s a brief class hierarchy for context:
   
   `SeataInterceptor`
   └── `ProxyInvocationHandler`
     └── `AbstractProxyInvocationHandler`
       ├── `GlobalTransactionalInterceptorHandler`
       ├── `SagaAnnotationActionInterceptorHandler`
       └── `TccActionInterceptorHandler`
   
   Both `SagaAnnotationActionInterceptorHandler` and 
`TccActionInterceptorHandler` override the `order()` method appropriately.
   
   However, `GlobalTransactionalInterceptorHandler` does not override 
`order()`, so it falls back to the implementation in `ProxyInvocationHandler`.
   Even though it defines and uses `getOrder()` / `setOrder()` for managing the 
`order` field, the `order()` method used during sorting does not take that 
field into account.
   
   I've implemented the fix based on our previous discussion.
   
   To summarize the proposed solution for this issue:
   - Override the `order()` method in `GlobalTransactionalInterceptorHandler` 
to return `this.order`.
   - Modify `AbstractProxyInvocationHandler.getOrder()` to return 
`this.order()`.
   - Set the initial value of the `order` field in 
`AbstractProxyInvocationHandler` to `0`.
   - Remove the `default` keyword from the `order()` method in 
`ProxyInvocationHandler`.
   
   I'll submit a pull request with these changes shortly.


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