Announcement Announcement Module
Collapse
No announcement yet.
What's recommended Procedure for flushing. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • What's recommended Procedure for flushing.

    If there is a call to a service method proxied by Hibernate transaction manager in a situation as follows:

    save Object A
    store STATUS that save was sucessful
    save Object B
    transaction ends and flush occurs

    When flush occurs A and B get written to database but the STATUS was already stored so if A now fails STATUS will be incorrect. What is the correct practice for having service method return the correct status of A's save?

    Is a flush nessecary after saving A? Is there a way to in general force a flush after every save? What are the implications of this way?

  • #2
    Where are you storing the status?

    Ultimately, that needs to be tied to the transaction...

    Comment


    • #3
      I am storing it in a variable.

      I am storing it in a variable. What do you mean tied to a transaction?

      Comment

      Working...
      X