[GLASSFISH-12793] Ability to Load Individual Servlets without reloading entire web app Created: 26/Jul/10  Updated: 23/Mar/11

Status: Open
Project: glassfish
Component/s: deployment
Affects Version/s: 3.1
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: hoffman462 Assignee: Hong Zhang
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All
URL: http://forums.java.net/jive/thread.jspa?threadID=79152


Attachments: Zip Archive dynamicreload.zip    
Issue Links:
Duplicate
is duplicated by GLASSFISH-15928 Dynamic Reload doesnt work for servlet Closed
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



 Comments   
Comment by fsousa [ 26/Jul/10 ]
      • Issue 12793 has been confirmed by votes. ***
Comment by Hong Zhang [ 26/Jul/10 ]

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

Comment by tetyanac [ 10/Feb/11 ]

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?

Comment by Hong Zhang [ 11/Feb/11 ]

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).

Comment by tetyanac [ 14/Feb/11 ]

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

Comment by tetyanac [ 14/Feb/11 ]

Same problem for GF 3.1_b42.

Comment by Tim Quinn [ 15/Feb/11 ]

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.

Comment by tetyanac [ 15/Feb/11 ]

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.

Comment by Tim Quinn [ 16/Feb/11 ]

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.

Comment by tetyanac [ 16/Feb/11 ]

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

Comment by Tim Quinn [ 16/Feb/11 ]

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.

Comment by tetyanac [ 16/Feb/11 ]

Thank you. Now it works as expected.

Generated at Sat Dec 03 09:39:46 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.