glassfish
  1. glassfish
  2. GLASSFISH-12793

Ability to Load Individual Servlets without reloading entire web app

    Details

    • Issuezilla Id:
      12,793

      Description

      It would be helpful if it was possible to deploy or load a single new servlet
      listed in the web.xml file without causing issues / or redeploying all ejbs, or
      other resources (JMS queues, etc..).

      This has been discussed here, and more information is contained in the post:

      http://forums.java.net/jive/thread.jspa?threadID=79152

        Issue Links

          Activity

          Hide
          fsousa added a comment -
              • Issue 12793 has been confirmed by votes. ***
          Show
          fsousa added a comment - Issue 12793 has been confirmed by votes. ***
          Hide
          Hong Zhang added a comment -

          Thanks for filing the RFE to track this, we wil revisit it when planning the
          next release.

          Show
          Hong Zhang added a comment - Thanks for filing the RFE to track this, we wil revisit it when planning the next release.
          Hide
          tetyanac added a comment -

          Continuation from issue 15928
          Last comment:

          >Hong Zhang added a comment - 10/Feb/11 06:13 PM
          >You can attach the application (and the modified bits) in its duplicated issue (12793) with exact steps and we will take look to see if we can reproduce it.
          >So after you saved the .reload file, you didn't see anything in the server.log indicating the application is being reloaded?
          >What do you mean it changed only after you executed reloading of the application, do the "reload" here mean redeploy the application?

          I didn't see anything in server.log. Under "reload" I clicked "reload" for application in the applications list in the GUI console.

          Here is my source. Deploy, click "http://localhost:8080/dynamicreload/TestServlet", then go to TestServlet.java, change message, compile, package into WAR, unpack into domains/domain1/applications/dynamicreload, change there .reload file, and access again the link.
          I didnt get new message. What am I doing wrong?

          Show
          tetyanac added a comment - Continuation from issue 15928 Last comment: >Hong Zhang added a comment - 10/Feb/11 06:13 PM >You can attach the application (and the modified bits) in its duplicated issue (12793) with exact steps and we will take look to see if we can reproduce it. >So after you saved the .reload file, you didn't see anything in the server.log indicating the application is being reloaded? >What do you mean it changed only after you executed reloading of the application, do the "reload" here mean redeploy the application? I didn't see anything in server.log. Under "reload" I clicked "reload" for application in the applications list in the GUI console. Here is my source. Deploy, click "http://localhost:8080/dynamicreload/TestServlet", then go to TestServlet.java, change message, compile, package into WAR, unpack into domains/domain1/applications/dynamicreload, change there .reload file, and access again the link. I didnt get new message. What am I doing wrong?
          Hide
          Hong Zhang added a comment -

          Which build were you using? When we tried to reproduce the problem today we actually found some issues with the dynamic reload functionality:
          http://java.net/jira/browse/GLASSFISH-15963

          The fix will go in soon and you can try again with the next promoted build b42 (should be out next Monday).

          Show
          Hong Zhang added a comment - Which build were you using? When we tried to reproduce the problem today we actually found some issues with the dynamic reload functionality: http://java.net/jira/browse/GLASSFISH-15963 The fix will go in soon and you can try again with the next promoted build b42 (should be out next Monday).
          Hide
          tetyanac added a comment -

          I use build 3.1_b38.
          I will try new build.

          Show
          tetyanac added a comment - I use build 3.1_b38. I will try new build.
          Hide
          tetyanac added a comment -

          Same problem for GF 3.1_b42.

          Show
          tetyanac added a comment - Same problem for GF 3.1_b42.
          Hide
          Tim Quinn added a comment -

          Which specific 3.1_b42 did you use and on what operating system?

          The fix for the .reload problem Hong referred to was checked in at 3:00 p.m. Pacific time on Feb. 11. the only b42 build that would have the fix is the one from Feb. 13.

          I just downloaded the Feb. 13 b42 and used the example app, changed TestServlet, recompiled it and rebuild the war, expanded the whole war into dynamicreload again (although copying the new TestServlet.class would be sufficient), and ran "touch xxx/dynamicreload/.reload" and when I reloaded the web page in my browser the new servlet was used.

          Show
          Tim Quinn added a comment - Which specific 3.1_b42 did you use and on what operating system? The fix for the .reload problem Hong referred to was checked in at 3:00 p.m. Pacific time on Feb. 11. the only b42 build that would have the fix is the one from Feb. 13. I just downloaded the Feb. 13 b42 and used the example app, changed TestServlet, recompiled it and rebuild the war, expanded the whole war into dynamicreload again (although copying the new TestServlet.class would be sufficient), and ran "touch xxx/dynamicreload/.reload" and when I reloaded the web page in my browser the new servlet was used.
          Hide
          tetyanac added a comment -

          I downloaded glassfish-3.1-b42.zip ant tested on it on Windows XP.

          I got new Servlet behaviour only after I click reload of application in GUI admin. The problem is still here.

          Show
          tetyanac added a comment - I downloaded glassfish-3.1-b42.zip ant tested on it on Windows XP. I got new Servlet behaviour only after I click reload of application in GUI admin. The problem is still here.
          Hide
          Tim Quinn added a comment -

          You did not mention which specific build 42 you downloaded. There are multiple ones from different dates and not all of them contain the fix for the .reload handling.

          I just downloaded this build

          http://dlc.sun.com.edgesuite.net/glassfish/3.1/nightly/glassfish-3.1-b42-02_13_2011.zip

          onto two different Windows XP systems. On both systems I have:

          deployed your example app,

          accessed http://localhost:8080/dynamicreload

          edited src\webtest\TestServlet.java to display a different message

          recompiled src\webtest\TestServlet.java

          copied the new webtest\TestServlet.class into glassfish\domains\domain1\applications\dynamicreload\WEB-INF\classes\webtest

          used notepad to create .reload in glassfish\domains\domain1\applications\dynamicreload

          accessed the app again

          and this displayed the new output.

          The .reload feature is working for me.

          Show
          Tim Quinn added a comment - You did not mention which specific build 42 you downloaded. There are multiple ones from different dates and not all of them contain the fix for the .reload handling. I just downloaded this build http://dlc.sun.com.edgesuite.net/glassfish/3.1/nightly/glassfish-3.1-b42-02_13_2011.zip onto two different Windows XP systems. On both systems I have: deployed your example app, accessed http://localhost:8080/dynamicreload edited src\webtest\TestServlet.java to display a different message recompiled src\webtest\TestServlet.java copied the new webtest\TestServlet.class into glassfish\domains\domain1\applications\dynamicreload\WEB-INF\classes\webtest used notepad to create .reload in glassfish\domains\domain1\applications\dynamicreload accessed the app again and this displayed the new output. The .reload feature is working for me.
          Hide
          tetyanac added a comment -

          I downloaded from http://dlc.sun.com.edgesuite.net/glassfish/3.1/promoted/:

          [ ] glassfish-3.1-b42.zip 14-Feb-2011 09:27 78M

          Seems it is released after that you mentioned.

          Could you please check whether it contains the discussed fix?

          Thank you

          Show
          tetyanac added a comment - I downloaded from http://dlc.sun.com.edgesuite.net/glassfish/3.1/promoted/: [ ] glassfish-3.1-b42.zip 14-Feb-2011 09:27 78M Seems it is released after that you mentioned. Could you please check whether it contains the discussed fix? Thank you
          Hide
          Tim Quinn added a comment -

          There is an even more recent promoted build now: b43. Use that one.

          The .reload feature works correctly in promoted b43. I am confident it also works in promoted build 42 since earlier, nightly builds of b42 worked correctly.

          Show
          Tim Quinn added a comment - There is an even more recent promoted build now: b43. Use that one. The .reload feature works correctly in promoted b43. I am confident it also works in promoted build 42 since earlier, nightly builds of b42 worked correctly.
          Hide
          tetyanac added a comment -

          Thank you. Now it works as expected.

          Show
          tetyanac added a comment - Thank you. Now it works as expected.

            People

            • Assignee:
              Hong Zhang
              Reporter:
              hoffman462
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: