Why nested transactions are not supported in JTA

前端 未结 3 1424
隐瞒了意图╮
隐瞒了意图╮ 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:47

    (As @Piotr Nowicki points out, JTA does allow nested transactions, but this is optional not mandatory.)

    Why? This is one of those questions that is impossible to answer with any certainty, unless you were one of the people "in the room" when the decisions were made.

    • It could be the inherent complexity of including nested transactions as part of the spec. Or apparent complexity at the time; i.e. they weren't sure they knew how to do a good job of specifying them.

    • It could be that they thought there wasn't enough demand.

    • It could be time pressure ... or just plain exhaustion.

    • It could be "commercial reasons"; e.g. certain vendors not wanting to interfere with product launch schedules by expanding the scope of the spec.

    But, the bottom line is that if you want the real answer, you would need to ask the people in the working group that wrote JTA specifications. (And I doubt they would tell you ... on the record.)

提交回复
热议问题