EJB3 Transaction Propagation

后端 未结 8 1696
隐瞒了意图╮
隐瞒了意图╮ 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:05

    I had these circular dependency issues which Kevin mentioned. However, the proposed annotation @IgnoreDependency is a jboss-specific annotation and there is no counterpart in e.g Glassfish.

    Since it does not work with default EJB reference, I felt a bit uncomfortable with this solution.

    Therefore, I gave bluecarbon's solution a chance, thus starting the inner transaction "by hand".

    Beside this, I see no solution but to implement the inner process() in another bean which is also ugly because we simply want to disturb our class model for such technical details.

提交回复
热议问题