Hi,
I´m experimenting with Seam Managed long running atomic conversations right now. I
succesfully managed to have changes made to existing entities get flushed when the @End
method is called. This works fine so far and is conform to my understanding of a Seam
Managed Transaction using @Begin and @End Annotations.
My next step was to create a new entity during that conversation. To attach the new
instance to the entityManager I´m using persist() (side note: tried merge() as well, no
difference). What puzzles me, is that immediately when em.persist(myNewInstance) is
called, an insert is happening (used the debugger to confirm this).
I tested some more, and so far I can say, that it´s only the insert that is happening at
the time persist() is called. When I have also made changes to the already existing
entities in the same conversation, they are still correctly updated at the end of the
conversation, not before.
So I´m wondering - is creating new instances in a long running conversation a somewhat
"invalid" approach?
A possible solution might be to put the new instances in some kind of collection and call
persist on each of its members during the @End method. But maybe there is a more
"automatic" way Seam provides?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998252#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...