12 Replies Latest reply on Aug 1, 2007 11:12 AM by Manfred Griesser

    Persistence context propagation.

    Dave Whittaker Novice

      I am coming across a bit of a design dillema and I am curious about what others are doing.

      The issue is that within a long running conversation I might have several SFSB components handling logical chunks of whatever is getting done. Those beans often communicate with each other through the bijection of Entity Beans. The problem is when I switch from one SFSB to another, the PersistenceContext will change and if I create/update an object that references an injected entity, I'll get a detached object exception.

      It seems like what I need is a way to force my application to use a conversation scoped PersistenceContext and I'm not sure of the best way to implement that. I remember from the docs that you can use a seam managed EntityManager, but will that still follow the same rules for context propagation to SLSB DAOs? Anybody have any experience with this issue?