Because it the rest (for example the get(int,int) method for a page) is also synced on session
But only through a session.
That method is special because it is the only one currently i believe that can be access that doesn't go through the session
So thats why it is there that sync.
So if you start changing that (sync on pagemap itself) then do it on more places and also look at the sync blocks in Session
that access again the pagemap.
But do look very carefully then!!
Als the DefaultRequestTargetResolverStrategy has exactly the sync on session because of the same thing:
we do there for example this:
final Access access = (Access)pageMap.getAccessStack().peek();
and that can't be done without a session synch.
But i guess that sync block can be on a much smaller part of the code (only yhe part that really access the stack..)
In 2.0 this is i think much easier because the pagemap is much simpler.
johan
On 6/28/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
I don't see why in PageMap.removeEntry:
public final void removeEntry(final IPageMapEntry entry)
{
// Remove entry from session
synchronized (session)
{
session.removeAttribute(attributeForId(entry.getNumericId()));
// Remove page from acccess stack
final Iterator stack = accessStack.iterator ();
while (stack.hasNext())
{
final Access access = (Access)stack.next();
if ( access.id == entry.getNumericId())
{
stack.remove();
}
}
// Let the session know we changed the pagemap
session.dirtyPageMap(this);
}
}
synchronization has to be done on the session. I'd like to sync on the
instance instead. Or can anyone see the catch?
Furthermore, the synchronized block that starts at line 95 of
DefaultRequestTargetResolverStrategy... is that necesarry, and if so,
wouldn't it be better to place after if
(requestParameters.isOnlyProcessIfPathActive ()) ?
Eelco
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop