And what happens if you need to access a Collection in a second
request from user. How it works if you do not reattach the object ?

On 5/19/05, Schulte Marcus <[EMAIL PROTECTED]> wrote:
> I'm using the long session pattern put forward in HIA by Bauer&King. This
> works very well - no LazyInitializationException nor
> NonUniqueObjectExceptions when re-attaching objects. In fact, no
> re-attaching at all.
> The recipe is:
>   1. ServletFilter to manage mapping of Http-Sessions to Hibernate-Sessions
> and putting the latter in a convenient ThreadLocal
>   2. An IActionListener-Wrapper to commit/rollback as desired
>   3. Not forgetting to close your Session and throw away your persistent
> objects at an appropriate point (typically, this is "user choses new
> working-set" or somethin like that)
> Only "drawback" - the pattern is not supported by any IoC-Containers out of
> the box - at least by none I know of.
> If anybody is interested I could post some code ...
> 
> Marcus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to