Thanks. Makes sense

On Wed, Aug 28, 2013 at 3:10 PM, Sven Meier [via Apache Wicket]
<ml-node+s1842946n4661124...@n4.nabble.com> wrote:

>>Given that behaviors are stateless, why is it discouraged to share them?
> Behaviors can be stateless, but they don't need to be.
> You can share them between components in the same page. But sharing behaviors 
> (or models) between pages is not possible, because each page is serialized 
> separately.
> Sven
> On 08/28/2013 09:47 PM, sc_wicket wrote:
>> I'm trying to understand how Wicket deals with thread-safety.
>>
>>  From Wicket in Action by Martijn Dashorst & Eelco Hillenius
>>      "You never have to worry about thread-safety as long as you keep two
>> things in mind:
>>            
>>            *  Never share component object instances, models, and behaviors
>> between pages that are
>>                in several page maps. ...
>>
>>            *  Application objects, session objects, and session stores aren't
>> thread-safe"
>>
>> I thought @Jochen Mader's explanation was eloquent, "No state = threadsafe"
>> but I'm looking for some clarification.
>>
>> Latter Eelco writes about behaviors, "All the methods in [the IBehavior
>> interface] except isTemporary share a comon feature: they have a Component
>> argument. This way, behaviors can be stateless..."
>>
>> Given that behaviors are stateless, why is it discouraged to share them?
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Thread-safety-of-various-Wicket-classes-tp4652977p4661123.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> _______________________________________________
> If you reply to this email, your message will be added to the discussion 
> below:
> http://apache-wicket.1842946.n4.nabble.com/Thread-safety-of-various-Wicket-classes-tp4652977p4661124.html
> To unsubscribe from Thread safety of various Wicket classes?, visit 
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4652977&code=c3BlbmNlcmRjYXJsc29uQGdtYWlsLmNvbXw0NjUyOTc3fDE4ODczMjMwMTk=



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Thread-safety-of-various-Wicket-classes-tp4652977p4661125.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to