16 messages in org.apache.wicket.usersRe: Wasp/Swarm Questions was Re: Comp...
FromSent OnAttachments
Anthony SchexnaildreSep 9, 2007 1:37 am 
Igor VaynbergSep 9, 2007 9:08 am 
Maurice MarrinkSep 9, 2007 10:12 am 
Anthony SchexnaildreSep 10, 2007 2:47 pm 
Anthony SchexnaildreSep 10, 2007 3:30 pm 
Maurice MarrinkSep 11, 2007 1:11 am 
Martijn DashorstSep 11, 2007 1:38 am 
Maurice MarrinkSep 11, 2007 2:05 am 
Anthony SchexnaildreSep 11, 2007 8:07 am 
Martijn DashorstSep 11, 2007 8:19 am 
Maurice MarrinkSep 11, 2007 3:24 pm 
Anthony SchexnaildreSep 11, 2007 3:33 pm 
Anthony SchexnaildreSep 12, 2007 10:57 am 
Maurice MarrinkSep 12, 2007 2:20 pm 
wicketnewuserOct 22, 2009 11:05 pm 
Pedro SantosOct 23, 2009 11:25 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Wasp/Swarm Questions was Re: Component parent null after replaceActions...
From:Anthony Schexnaildre (apsc@gmail.com)
Date:Sep 11, 2007 8:07:22 am
List:org.apache.wicket.users

This makes sense. Where would you stick the user on the requestcycle? It's not obvious from the javadocs. Is there a "wicket way"?

-Anthony

On Sep 11, 2007, at 10:05 AM, Maurice Marrink wrote:

Martijn, you are absolutely right, i forgot we moved the user from the session to the requestcycle. Just keep the id for your user in the session and keep the actual user for this request in the requestcycle. This way each thread will have its own instance of the user.

Maurice

On 9/11/07, Martijn Dashorst <mart@gmail.com> wrote:

Just a quick note: storing objects that are not thread safe in your session is asking for trouble. While Wicket does limit page processing to one request at a time, other requests like resources can run in parallel. What does this mean?

One thing that comes to mind is that when two requests for the same session are being processed, and one is done before the other it will detach the user model. What are the semantics now for the other thread?

For instance if you have a detachable model storing a User object in your session and use Hibernate you are in a world of hurt, or rather Hibernate will sometimes bork because your Session tries to attach the single User instance to multiple Hibernate Session objects. Exceptions will be having a party.

Now this is not meant as a Hibernate bashing reply, it just happens that Hibernate correctly detects multiple threads modifying the same object's state and stops tampering with it.