Results 1 to 3 of 3

Thread: What's recommended Procedure for flushing.

  1. #1
    Join Date
    Sep 2004
    Posts
    346

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    Where are you storing the status?

    Ultimately, that needs to be tied to the transaction...
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

  3. #3
    Join Date
    Sep 2004
    Posts
    346

    Default I am storing it in a variable.

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

Similar Threads

  1. Replies: 5
    Last Post: Oct 1st, 2010, 08:00 AM
  2. Informix stored procedure & spring
    By miha in forum Data
    Replies: 8
    Last Post: Dec 5th, 2006, 10:44 PM
  3. Replies: 0
    Last Post: Jun 3rd, 2005, 09:18 AM
  4. Replies: 0
    Last Post: May 11th, 2005, 06:11 AM
  5. Replies: 1
    Last Post: Nov 25th, 2004, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •