You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastiaan van Erk (JIRA)" <ji...@apache.org> on 2007/11/09 13:02:50 UTC

[jira] Created: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
--------------------------------------------------------------------------------------------------------------

                 Key: WICKET-1140
                 URL: https://issues.apache.org/jira/browse/WICKET-1140
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta4
            Reporter: Sebastiaan van Erk
            Priority: Minor


If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Assigned: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag reassigned WICKET-1140:
------------------------------------------

    Assignee: Juergen Donnerstag  (was: Johan Compagner)

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Commented: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Sebastiaan van Erk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541634 ] 

Sebastiaan van Erk commented on WICKET-1140:
--------------------------------------------

I looked into providing a patch into this, but it's not entirely trivial.

The problem is that when a MarkupResourceStream is loaded, it is first located using an IStreamResourceLocator, then it is added to the cache and a watcher so that changes are noticed. However, what changes in this case is not the resource itself, but the resource which the locator returns (i.e., after WebPage.html is added, the locator would now return a resource stream to it, instead of to the BasePage.html, which is the one it returned before and is cached).

I can think of several solutions:
1) Push the caching to the locator. I don't like this solution, since the locator's job should be restricted to locating; make caching one of its concerns seems like bad separation of concerns. It would also mean quite a refactor.
2) Ask the locator for the resource every single time to see if it changed it's mind about the resource. If it returns a different resource from the one in the cache, cache the new one. The problem with this solution is that it may make caching pretty useless, as a new resource stream is returned by the localizer every time anyway...
3) Add a method to the locator to ask if it changed it's mind about the resource, something like locator.isStillValid(oldResource). The locator should be able to answer this question, since it is the one responsible for determining which resource stream to return in the first place. The down side of this approach is that it is a big API break (it would require all resource stream locators to implement this new method). As possible means of minimzing the impact is to have a subinterface of the IStreamResourceLocator interface implement the new method and use an instanceof check to see if the method should be called.

I'm not really happy with any of the solutions, though I'm convinced that the locator has to be involved somehow since it is the ONLY entity which knows if the resource stream has changed or not. I personally prefer a variant of #3 I think, but I'm not sure.

I'd like to know your ideas. I don't mind giving it a shot, but I don't want to start until I have an idea about the preferred approach...

Regards,
Sebastiaan

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Priority: Minor
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Updated: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1140:
------------------------------------

    Fix Version/s: 1.4.0-alpha

moving this to 1.4, its to hard to do it for 1.3 at this time and it seems thats api changes then has to happen.
So for now you have to restart the container or redeploy.

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Priority: Minor
>             Fix For: 1.4.0-alpha
>
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Resolved: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-1140.
----------------------------------------

    Resolution: Fixed

Note that this problem ONLY exists for component's extending a base component (markup inheritance). And it only happens if a new markup file is added. Changing an existing one, will enforce a reload.

In 1.5 you can disable Markup caching completely by subclassing MarkupFactory and replacing getMarkupCache() to return null. To avoid any surprise once the markup is more stable, you should enable caching later on.

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Updated: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1140:
------------------------------------

    Fix Version/s:     (was: 1.4-M1)
                   1.5-M1
         Assignee: Johan Compagner

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Commented: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582469#action_12582469 ] 

Johan Compagner commented on WICKET-1140:
-----------------------------------------

moving to 1.5
i think the localizer cache is already takene care of, you can override if it has to cache or not.

As far as i know, didn't check it you can have a JConsole (JMX) and clear the caches from there in a running system.
So restarting is not needed for markup or properties i guess.

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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


[jira] Commented: (WICKET-1140) Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541324 ] 

Alastair Maw commented on WICKET-1140:
--------------------------------------

FWIW, the same is also true of properties files. It would similarly be nice to fix that.

> Adding WebPage.html after viewing it once requires restart of servlet container for updates in developer mode.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1140
>                 URL: https://issues.apache.org/jira/browse/WICKET-1140
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Sebastiaan van Erk
>            Priority: Minor
>
> If you create a WebPage.java (which extends some base page) and view it in the browser, and afterwards add WebPage.html and update the browser (in development mode), the page will not be updated. The only way to get Wicket to see the new WebPage.html file seems to be to restart the servlet container. It would be nice if Wicket saw the newly added html file and updated the page accordingly.

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