logo       

Re: need help with sessions: msg#00014

java.enhydra.general

Subject: Re: need help with sessions

On St, 2002-11-27 at 08:04, Petr Stehlik wrote:
> Anyway, I would like to hear your opinion on the setUser() vs
> setSessionData(KEY) stuff. Do you use only the setUser() and keep all
> the session variables in the User class or do you use setSessionData()
> with a KEY - or even several different keys for different stuff in your
> application? What's the difference between SessionData and User classes
> when it comes to storing the session related info? Are they equivallent
> or do they differ somehow in handling? And what was the original idea
> behind this division for User and SessionData?

I am reading through the enhydra source code (esp. the session
management) and I am more and more confused.

It seems that a given session can have several (different?) users
attached to it (see comment on BasicSessionHome.setUser()) and _also_
one user can be logged to several different sessions
(BasicSessionHome.numSessions). This makes M:N mapping, right?

Elsewhere the doc says that User must be unique and that User.equals
must be working correctly on that. Why must user be unique? Where is it
used and why?

I wish jasona was here and could explain the magic behind the Enhydra
session/user management :)

Petr


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise