Default EJB transaction mode for asynchronous methods?

后端 未结 2 1448
鱼传尺愫
鱼传尺愫 2021-02-01 14:58
  1. When I have an @Asynchronous method in an EJB, and I don\'t specify the @TransactionAttribute, then how exactly does the container handle the

2条回答
  •  长发绾君心
    2021-02-01 15:06

    From EJB 3.1 spec.

    4.5.3 Transactions

    Client transaction context does not propagate with an asynchronous method invocation. From the Bean Developer’s view, there is never a transaction context flowing in from the client. This means, for example, that the semantics of the REQUIRED transaction attribute on an asynchronous method are exactly the same as REQUIRES_NEW.

提交回复
热议问题