Jesse,

  Currently my find() methods are calling into some spring-managed DAOs,
which in turn run a named query on the database to retrieve the object.  I
will try changing these to use the EntityManager directly and see if that
helps.

Thanks,
Eric
---------------------------------------------------
Eric Andresen


On Tue, Feb 7, 2012 at 12:15 PM, Jesse Hutton <[email protected]>wrote:

> Eric,
>
> By flush you mean the primary object has it's values rest to the
> persistent state in the db?
>
> What does your Locator#find() method look like? When using Hibernate
> with RequestFactory, you should always use EntityManager.find() (or
> the Hibernate Session equivalents) in Locator#find() because that will
> prevent hitting the db multiple times for a given entity, which I'm
> guessing might be part of the problem.
>
> Jesse
>
> On Tue, Feb 7, 2012 at 11:25 AM, Eric Andresen <[email protected]>
> wrote:
> > Stefan,
> >
> >   In the past we have investigated FlushMode.COMMIT and FlushMode.MANUAL,
> > but everything we have read about this is that Spring/Hibernate treats it
> > only as a suggestion and not a rule, and it may still flush at
> inopportune
> > times.
> >
> >   We did bring in some consultants from SpringSource and asked them this
> > question a few months ago, but they recommended against changing the
> > FlushMode.  They instead suggested either maintaining a strict order of
> > operations or working with detached objects.
> >
> > Thanks,
> > Eric
> > ---------------------------------------------------
> > Eric Andresen
> >
> >
> >
> > On Tue, Feb 7, 2012 at 6:44 AM, StefanR <[email protected]>
> wrote:
> >>
> >> Hi Eric,
> >>
> >> is setting the hibernate flush mode to COMMIT an option? That would mean
> >> that no flush is executed before running a query.
> >>
> >> Regards,
> >> Stefan.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google Web Toolkit" group.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msg/google-web-toolkit/-/iw6cs7bEpbIJ.
> >>
> >> To post to this group, send email to
> [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected].
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected]
> .
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> > http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to