funky-eyes commented on code in PR #7443: URL: https://github.com/apache/incubator-seata/pull/7443#discussion_r2159889037
########## common/src/main/java/org/apache/seata/common/transaction/api/TransactionParticipant.java: ########## @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.seata.common.transaction.api; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Transaction Participant annotation. + * A general annotation for marking beans that participate in distributed transactions. + * This annotation is designed to replace the specific usage of @LocalTCC in Saga scenarios + * to avoid confusion, while also being applicable to TCC and other transaction modes. + * <p> + * In distributed transaction terminology, a "participant" is any component that takes part + * in the transaction protocol, making this name semantically accurate across different + * transaction patterns (TCC, Saga, XA, etc.). + * + * @see org.apache.seata.rm.tcc.api.LocalTCC // the original TCC-specific annotation, still supported for backward compatibility + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@Inherited +public @interface TransactionParticipant { Review Comment: > @funky-eyes @YongGoose Thanks for the feedback! I've adopted the `@LocalTransactional` naming as suggested by @YongGoose. > > **Regarding transaction mode parameters:** @funky-eyes Your suggestion about enhancing with transaction mode parameters and AT isolation levels is excellent for future iterations. For this PR, I focused on the core issue #7439 - removing Saga's semantic dependency on `@LocalTCC`. The current simple annotation provides a clean foundation that can be enhanced later. This keeps the current PR focused while leaving room for those valuable enhancements in follow-up work. I agree with your opinion. However, the name of this annotation may need to be approved by the majority of the community at the next weekly meeting before this PR can be merged. -- 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: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org