All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redismq.utils.SeataUtil Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package com.redismq.utils;

import io.seata.tm.api.transaction.TransactionHookAdapter;
import io.seata.tm.api.transaction.TransactionHookManager;

public class SeataUtil {
    public void registerHook(Runnable runnable) {
        TransactionHookAdapter adapter = new TransactionHookAdapter() {
            @Override
            public void afterCommit() {
                runnable.run();
            }
        };
        //seata事务提交后执行的方法
        TransactionHookManager.registerHook(adapter);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy