Do you mean that the database should be queried for every persistent session
object on every request?

On Mon, Aug 24, 2009 at 2:12 PM, Martijn Dashorst <
[email protected]> wrote:

> Don't put the models in your session! Session access is not guaranteed
> to be confined to a single thread - multi window support, resources
> and such all attach the session to their own threads, making the
> session non-thread safe.
>
> Best option is to put the ID of your entities in your session object,
> and store the entities in your request cycle for request processing.
>
> Martijn
>
> On Mon, Aug 24, 2009 at 9:21 PM, Dane Laverty<[email protected]>
> wrote:
> > I understand that a Hibernate-generated object needs to be kept in a
> > LoadableDetachableModel in order to avoid errors across requests. I also
> > understand that a LDM has to belong to a component in order for its
> detach
> > to be called at the end of a request. So what should I do with
> > Hibernate-generated objects that live in the session, specifically a
> > UserInfo object? Since the session doesn't have a model, how do I inform
> > Wicket to detach these models after each request?
> >
> > thanks,
> >
> > Dane
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to