Why nested transactions are not supported in JTA

前端 未结 3 1427
隐瞒了意图╮
隐瞒了意图╮ 2021-01-02 07:27

Why aren\'t nested transactions supported by JTA? Is it because of the complexity of implementing them (which I doubt) or some design principle?

3条回答
  •  庸人自扰
    2021-01-02 07:39

    Its neither the answer is business.

    Many containers such as JBoss provide more complex alternative transaction managers which support concepts like nested transactions, but others like glassfish do not. Yet both of these are Java EE compliant. The idea is to keep the spec simple to lower the barrier of compliance for vendors.

    Why force someone to implement a complex transaction manager that only covers .5% of transactional use cases or forgo Java EE compliance?

    Nothing stops ambitious vendors from going above and beyond the specification, but they don't have the option to leave anything out.

提交回复
热议问题