Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315275 - Run on Server may hold the UI if delegate call hangs
Summary: Run on Server may hold the UI if delegate call hangs
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Angel Vera CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 14:52 EDT by Troy Bishop CLA
Modified: 2017-10-11 16:35 EDT (History)
1 user (show)

See Also:


Attachments
possible patch. (2.63 KB, patch)
2010-06-01 14:54 EDT, Troy Bishop CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Bishop CLA 2010-06-01 14:52:43 EDT
Build Identifier: WTP 3.2

The action Run on Server can cause the UI to hang if the call to the delegates ILaunchableAdapter.getLaunchable() hangs.  In this situation the delegate call hangs (which is likely a defect in our adaptor product) but the WTP server tools framework could handle this scenario better by not putting this call in the UI thread.

The Run on Server action is meant to be a background job however in the code for LaunchClientJob#run() a call to Display#asyncExec() is made to run the client in the UI (since the UI could be to launch a web browser, i.e. running a servlet on the server).  I think this code tries to be too safe by executing the call to ILaunchableAdapter.getLaunchable() in the UI thread but I do not think that is necessary.  Since this call would never really run any UI code (the call to IClient#launch will do that) then I think it would be safe to take it out of the Display.asyncExec() block.

I will attached a patch which will correct this problem.

Reproducible: Always

Steps to Reproduce:
1. Cause the call to ILaunchableAdapter.getLaunchable() to hang when performing a Run on Server scenario.
Comment 1 Troy Bishop CLA 2010-06-01 14:54:13 EDT
Created attachment 170679 [details]
possible patch.
Comment 2 Angel Vera CLA 2011-01-05 21:41:05 EST
Changes committed to 32M
Comment 3 Angel Vera CLA 2011-01-05 21:56:37 EST
Changes released to 32M
Comment 4 Angel Vera CLA 2011-01-05 22:01:44 EST
changes committed to HEAD
Comment 5 Angel Vera CLA 2011-01-05 22:02:40 EST
changes released to HEAD
Comment 6 Eclipse Genie CLA 2017-10-11 16:35:22 EDT
New Gerrit change created: https://git.eclipse.org/r/109010