[ 
https://issues.apache.org/jira/browse/WICKET-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526842
 ] 

John Ray commented on WICKET-946:
---------------------------------

The way my application is currently written it has a number of pages created 
the standard wicket way. However the user can add a page dynamically anyplace 
they want. The issues with having a dispatch page is that it restricts the 
possible URLs of any of the dynamic pages. For instance if I have the following 
top level pages

  /index
  /page1
  /page2

If the user then wants to add a couple pages to the top level you end up with 
the following

 /index
 /page1
 /page2
 /page/foo1
 /page/foo2

I would also need to create a dispatch page in each of my applications 
directories when the application is first started just in case the user wants 
to add a page there. I do see where your coming from though and perhaps I 
should be looking at patching into wicket farther up chain. When I saw the 
unmount method I assumed this was the best place and just thought the 
synchronization was an oversight.

> WebRequestCodingStrategy is not synchronized
> --------------------------------------------
>
>                 Key: WICKET-946
>                 URL: https://issues.apache.org/jira/browse/WICKET-946
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: John Ray
>            Assignee: Igor Vaynberg
>         Attachments: WebRequestCodingStrategy-patch, 
> WebRequestCodingStrategy.java
>
>
> The WebRequestCodingStrategy class uses a TreeMap to store mounted pages 
> however there is no synchronization done. This will cause problems if pages 
> are being mounted/unmounted by one thread while web requests are being served 
> from a different one. It could also cause problems if two threads try to 
> mount/unmount pages at the same time.
> I'll include a patch to fix this as well as a new version of the java file 
> that you can use if you want
> Keep up the good work

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to