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

Bug 338940

Summary: IServer#start(String, IOperationListener) does not notify the listener in error situations
Product: [WebTools] WTP ServerTools Reporter: Troy Bishop <tjbishop>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2.4   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/109039
Whiteboard:
Attachments:
Description Flags
possible patch
none
patch for just this problem arvera: iplog+

Description Troy Bishop CLA 2011-03-04 10:07:19 EST
Build Identifier: 

See the attached patch.  When IServer#start(String, IOperationListener) is called and either the publishBeforeStart() fails or the start action itself fails then the corresponding IOperationListener is not notified of the resulting status.  This can lead to hangs in the callers code if they are waiting for the result before proceeding

Reproducible: Always
Comment 1 Troy Bishop CLA 2011-03-04 10:09:26 EST
Created attachment 190390 [details]
possible patch

This patch also contains the work done for bug 337907.
Comment 2 Troy Bishop CLA 2011-03-10 17:58:16 EST
Created attachment 190938 [details]
patch for just this problem
Comment 3 Troy Bishop CLA 2011-03-10 18:31:59 EST
(In reply to comment #2)
> Created attachment 190938 [details]
> patch for just this problem

I've tested this patch in the UI with both Tomcat and our adaptor server (using the Start server action) and have not encountered any problem as in both situations the operation listener is null so it will never be used.

This patch is beneficial for a headless adopter product which provides a facility (ant task) for synchronously starting the server.  Without this patch there is a possibility that the start server call will hang indefinitely if IServer.start(String, final IOperationListener) is used and it waits for the IOperationListener to report that the operation is complete.
Comment 4 Angel Vera CLA 2011-03-30 16:44:02 EDT
Changes committed to 32M
Comment 5 Angel Vera CLA 2011-03-30 22:07:15 EDT
Code released to 32M
Comment 6 Angel Vera CLA 2011-04-19 11:40:08 EDT
changes committed to HEAD(3.3)
Comment 7 Angel Vera CLA 2011-04-19 15:35:44 EDT
Changes released to HEAD(3.3)
Comment 8 Eclipse Genie CLA 2017-10-11 16:36:12 EDT
New Gerrit change created: https://git.eclipse.org/r/109039