EJB3 Transaction Propagation

后端 未结 8 1714
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 04:25

I have a stateless bean something like:

@Stateless
public class MyStatelessBean implements MyStatelessLocal, MyStatelessRemote {
    @PersistenceContext(unit         


        
8条回答
  •  忘掉有多难
    2020-12-13 05:17

    Matt, for what it's worth I've come to exactly the same conclusion as you.

    TransactionAttributeTypes are only taken into consideration when crossing Bean boundaries. When calling methods within the same bean TransactionAttributeTypes have no effect, no matter what Types are put on the methods.

    As far as I can see there is nothing in the EJB Persistence Spec that specifies what the behaviour should be under these circumstances.

    I've also experienced this in Jboss. I'll also give it a try in Glassfish and let you know the results.

提交回复
热议问题