事务时间包括从应用程序的声明活动开始,直到一条提交或回滚命令隐式或显式地结束事务为止。
The transaction time includes the time at which an application's statement activity begins until a commit or rollback implicitly or explicitly ends the transaction.
如果发生了错误,catch块可以回滚事务开始以来发生的所有更改,并打印出一条错误消息。
If something goes wrong, the catch block rolls back all changes made since the transaction was started, and then prints out an error message.
这意味着,如果由于尚未接收到某条消息而已经设置了failed标志,则可以回滚事务,并将组中的所有其他消息返回给队列。
This means that, if the failed flag has been set because a message has not been received, we can roll back the transaction and return all of the other messages in the group back to the queue.
记住刚才的两条黄金法则:调用api层方法的客户机方法是事务所有者,只有事务所有者才负责执行回滚。
Remember the golden rules: the client method invoking the API layer method is the transaction owner, and only the transaction owner should be responsible for rollback.
十分钟以后,为了穿过森林,我们将车开上了一条起伏不平的泥泞小道,却发现一只刚从泥坑里打过滚的犀牛跑到了路中间,身后还跟着一只同样满身泥的幼犀,体型差不多有母犀的三分之二左右。
Ten minutes later we were driving through forest along a raised dirt track when a rhino fresh from a wallow climbed onto the road, followed by an equally muddy juvenile two-thirds her size.
十分钟以后,为了穿过森林,我们将车开上了一条起伏不平的泥泞小道,却发现一只刚从泥坑里打过滚的犀牛跑到了路中间,身后还跟着一只同样满身泥的幼犀,体型差不多有母犀的三分之二左右。
Ten minutes later we were driving through forest along a raised dirt track when a rhino fresh from a wallow climbed onto the road, followed by an equally muddy juvenile two-thirds her size.
应用推荐