Announcement Announcement Module
Collapse
No announcement yet.
Persistence Context, Subflows and New Records (Can I list them before committing?) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Persistence Context, Subflows and New Records (Can I list them before committing?)

    Hello Spring people, I need your help about something:

    I'm using Web Flow and I need to manage the following situation: I have three flows: A, B and C. All of them are declared so they use the Flow Managed Persistence Context (FMPC). All of them have end-states with "commit=true".
    A calls B as a subflow and B calls C as a subflow. In C I add an entity that is suppost to appear in a select list on B (so I can assign it to the entity I'm adding/editing on flow B).
    I'm using all my controller's methods with @Transactional(reanOnly=true), and my domain entities with a Table Generator, so early commits are not a problem.
    However, when I'm in a transaction, and insert a record, I expect that being inside that transaction (before commit) and request a "select * from table", the recent added record appears in the list.
    I know the FMPC doesn't work in a transaction scope, but within a long session with a MANUAL FlushMode (please correct me if I'm wrong).
    Beside that.. is there anyway to list the recent added entity in flow C (along with already existant ones) in flow B???

    I really hope that you can help me on this. Thank you!

    Gian Franco Zabarino
Working...
X