How to propagate a client-side UserTransaction into a stateless session bean using BMT

前端 未结 1 1453
一向
一向 2021-01-24 09:03

This scenario using CMT is working:

  • Stateless session bean with CMT, one method annotated with @TransactionAttribute(TransactionAttributeType.MANDATORY)

相关标签:
1条回答
  • 2021-01-24 09:37

    BMT beans cannot participate in an existing transaction

    From EJB 3.1 spec.:

    13.6.1 Bean-Managed Transaction Demarcation

    The container must manage client invocations to an enterprise bean instance with bean-managed transaction demarcation as follows. When a client invokes a business method via one of the enterprise bean’s client views, the container suspends any transaction that may be associated with the client request....

    0 讨论(0)
提交回复
热议问题