This is part of Component.java
public final Session getSession()
{
// Fetch page, if possible
final Page page = findPage();
// If this component is attached to a page
if (page != null)
{
// Get Session from Page (which should generally be
// faster than a thread local lookup via Session.get())
return page.getSessionInternal();
}
else
{
// Use ThreadLocal storage to get Session since this
// component is apparently not yet attached to a Page.
return Session.get();
}
}
I wonder if component.findPage() is realy more efficient than a
hashmap access by the ThreadLocal. Is there any other reason besides
performance for this construct?
Juergen
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop