Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352001

Summary: Intermittent problem when changing server hostname in server editor can mess up sever status
Product: [WebTools] WTP ServerTools Reporter: Christine <jycli>
Component: wst.serverAssignee: Steven Hung <sghung>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3 CC: eyuen7, mcraquel
Version: unspecified   
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/109058
Whiteboard:
Attachments:
Description Flags
Patch v1.0 eyuen7: iplog+

Description Christine CLA 2011-07-13 12:06:17 EDT
Build Identifier: 

Some long running operations (including JMX call) are on the UI thread when saving server configuration after modification of server hostname in server editor. Users experienced a non-responding UI for a few seconds. 

Reproducible: Always

Steps to Reproduce:
1.Open Server Editor and modify the hostname, eg. from localhost to the hosting machine name.
2.Save the change and experience a non-responding UI.
3.
Comment 1 Christine CLA 2011-07-29 13:05:58 EDT
After some investigation, I've found the problem should be resolved by the underline server code,and shouldn't be handled by the framework.

However, during the work, I've also noticed an intermittent bug during save of the server configuration. The symptom is the status of the server in the Server View showed [Stopped, Publishing] and an error dialog pops up with message "Publish is not performed since the server is not started. Start the server before performing the publish operation.". Once you click OK, the publish will continual. Eventually, you will see server in a correct status [Started, Synchronized]

To reproduce the symptom:
1. Create and start a new local server with host name "localhost"
2. Add an application to this server
3. Create another new local server using the same profile as in step 1, the status of this server should be started after synchronized with the previous one
4. Open server editor for both servers
5. In one server editor, change the host name to the machine's name. In my case, I changed it to "abc" and save it
6. If you keep on changing the host name from "localhost" to "abc" and vice versa from "abc" to "localhost". you will hit this problem in a couple of tries
Comment 2 Steven Hung CLA 2011-08-03 17:36:40 EDT
Created attachment 200861 [details]
Patch v1.0

The change for autopublish from the Server to the ServerWorkingCopy will prevent the issue described by Christine in comment #2 from occurring.

Tests run:
1. Christine ran the scenario using her server adapter and the issue was fixed
2. Regression: I used Tomacat with auto publish on and ensured that modifications to the server's editor caused an automatic publish (such as changing the server's name). My dynamic web project would publish without any issues. This behaviour is consistent with the behehaviour before the patch.
Comment 3 Steven Hung CLA 2011-08-03 17:41:04 EDT
(In reply to comment #2)
> Created attachment 200861 [details]
> Patch v1.0
> 
> The change for autopublish from the Server to the ServerWorkingCopy will
> prevent the issue described by Christine in comment #2 from occurring.
> 
> Tests run:
> 1. Christine ran the scenario using her server adapter and the issue was fixed
> 2. Regression: I used Tomacat with auto publish on and ensured that
> modifications to the server's editor caused an automatic publish (such as
> changing the server's name). My dynamic web project would publish without any
> issues. This behaviour is consistent with the behehaviour before the patch.

Sorry, to avoid confusion, I meant "regression test" for tests run #2, not that the tests run caused a regression
Comment 4 Elson Yuen CLA 2011-08-03 17:45:14 EDT
Changes looks good with sufficient test coverage on both the specific adopter's
server type and also on tomcat server.
Comment 5 Elson Yuen CLA 2011-08-03 17:50:35 EDT
Code released to 32M, 33M, HEAD
Comment 6 Eclipse Genie CLA 2017-10-11 16:36:58 EDT
New Gerrit change created: https://git.eclipse.org/r/109058