Dear Dhanji,
thanks for the reply!
> if it is REQUEST and you have a filter running
But then I can't retry the transaction automatically (when it is
desired), right?
Just as a side note - on the hibernate forum I read [1]:
"AFAIK exceptions thrown by hibernate are not recovarable. You have to
rollback and close your session and start again. At least that was
true for H2, I'm not 100% sure for H3."
So for my usecase where I manage my sessions on my own with the
WorkManager the 3 steps above should be sufficient
(be sure that you re-attach the objects to the new session)
Regards,
Peter.
[1]
https://forum.hibernate.org/viewtopic.php?p=2266139
On Jul 22, 5:08 pm, "Dhanji R. Prasanna" <
dha...@gmail.com> wrote:
> It depends on what your unit of work is, if it is REQUEST and you have a
> filter running you dont have to do anything coz the filter cleans up after
> you. Same with transaction strategy.
>
> So the basic answer is you should do whatever you'd normally do in handling
> SOSE for hibernate, everything else should just work. If you're asking what
> causes SOSE and how to fix it, that maybe better answered by the hibernate
> folk =)
>
> Dhanji.
>
> On Thu, Jul 22, 2010 at 7:42 PM, Peter <
tableyourt...@googlemail.com> wrote:
> > Hi,
>
> > I am using hibernate and would like to know how you would handle
> > StaleObjectStateException:s within a open transaction when using warp
> > persist.
>
> > Do I need to do the following:
> > 1. leave the @Transactional-marked method
> > 2. call manager.endWork()
> > 3. call manager.beginWork()
> > to make it correctly working? Or what minimal code is required for
> > that?
>
> > Regards,
> > Peter.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "warp-core" group.
> > To post to this group, send email to
warp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
warp-core+...@googlegroups.com<
warp-core%2Bunsu...@googlegroups.com>
> > .