use of io.seata.samples.saga.ApplicationKeeper in project javaboy-code-samples by lenve.
the class DubboSagaProviderStarter method main.
/**
* The entry point of application.
*
* @param args the input arguments
* @throws Exception the exception
*/
public static void main(String[] args) throws Exception {
// mock zk server
mockZKServer();
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[] { "spring/seata-dubbo-provider.xml" });
new ApplicationKeeper(applicationContext).keep();
}
use of io.seata.samples.saga.ApplicationKeeper in project javaboy-code-samples by lenve.
the class DubboSagaTransactionStarter method main.
public static void main(String[] args) {
AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[] { "spring/seata-saga.xml", "spring/seata-dubbo-reference.xml" });
StateMachineEngine stateMachineEngine = (StateMachineEngine) applicationContext.getBean("stateMachineEngine");
// transactionCommittedDemo(stateMachineEngine);
//
transactionCompensatedDemo(stateMachineEngine);
new ApplicationKeeper(applicationContext).keep();
}
Aggregations