On 9/22/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
>
>         There's a third approach you should definitely consider:
>
>         Never detatch your persistent objects and use a long session. It'll
> prevent all those nasty dirty collection, uninitialized collection, and lazy
> initialization problems.

That's exactly what I am considering. Also this is the approach that
Seam is taking (the new JBoss framework sounds to me like a
Spring+hacks for JSF) .
Are there any troubles by storing a Hibernate Session in a Visit?

>
>         The downside is that every time a page submits, it writes "live"
> into your persistent object which will write through the next time the
> session flushes so you have to be careful about that.

I don't see any downside here, wouldn't the same occur with a notbound
exception in a per-session model?

>         Also, make sure you use temp sessions for large queries so as not to
> pollute your "long" session with lots of persistent objects it doesn't
> really need.

I guess that a downside is that the sessions get very large and suck memory?
And so ideally I guess there should be 2 hibernate sessions:
one for the "conversation" (accross several pages), and another one
for short lived objects (per page session)?

Thanks,

Henri.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to