2

I'm using jetty and JSF 2.2 in my webapp. Normally when I make a change to a page it refreshes fine in my webapp. After load testing the page (I load a page 500 times), the page stops refreshing.

However, if I change the FACELETS_REFRESH_PERIOD from 2->0 it starts refreshing again. Is this a bug?

 <context-param>
    <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
    <param-value>0</param-value>
</context-param>

Load Test:

public static void main(String[] args) throws Exception {
        for (int i = 0; i < 500; i++) {
            URL myURL = new URL("http://localhost:8080/test");
            URLConnection myURLConnection = myURL.openConnection();
            myURLConnection.connect();
            myURLConnection.getContent();
            ((HttpURLConnection)myURLConnection).disconnect();
        }
    }
DD.
  • 21,498
  • 52
  • 157
  • 246
  • I am experiencing something similar, but not with 500 loads, I am sometimes getting it after a few reloads of a page while changing XHTML composite component content. I have only recently had the problem (with as far as I can tell exactly the same NetBeans8.1beta+Glassfish4.1 setup). Running the same projects (it affected multiple projects at once) on a freshly installed NetBeans8.1+Glassfish4.1.1 did not help. Forcing FACELETS_REFRESH_PERIOD to 0 "solved" the problems, but meant that some page refreshes took over a minute instead of seconds for complex pages. It might even be a MacOS problem. – Webel IT Australia - upvoter Feb 28 '16 at 06:15
  • [Mac: JSF: why are development stage JSF web apps not always catching composite component changes?](http://stackoverflow.com/questions/35680986/mac-jsf-why-are-development-stage-jsf-web-apps-not-always-catching-composite-c) – Webel IT Australia - upvoter Feb 28 '16 at 10:34

0 Answers0