Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349280 - Run on Server: I cannot control server start if a publish before it fails
Summary: Run on Server: I cannot control server start if a publish before it fails
Status: RESOLVED DUPLICATE of bug 390105
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: Future   Edit
Assignee: Elson Yuen CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard: plan_draft_325
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 03:39 EDT by Vladislav Iliev CLA
Modified: 2013-01-10 15:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav Iliev CLA 2011-06-14 03:39:11 EDT
Build Identifier: I20110526-1708, version 3.7.0.v20110520-0800-9gF7UHNFFt4cwE-pibLJ7m-mS0OWjdqewtz0110

Working with the WTP server adapter and trying to contribute an extension point I’m observing a strange behavior:

When I say “Run as”->”Run on Server” for a particular servlet I expect to have a sequence of 
2 operations : 
•	publish 
•	server start (in my extension point startBeforePublish="false")
This is OK. The entry point here is org.eclipse.wst.server.core.internal.Server#start(String mode2, final IOperationListener opListener)
that calls the operation above in an asynchronous way. This does not suit me, as I want to start the server only if the publish operation is successful.

I found another method public void synchronousStart(String mode2, IProgressMonitor monitor) throws CoreException;
That would do the required work instead of me, but what is strange to me is that nobody calls this method.
I didn’t find even how to force the server adapter to call it.



Reproducible: Always

Steps to Reproduce:
There is no an easy way to reproduce it, but in general
1.Create web application with a servlet
2.Right click on the servlet, then Run as->Run on Server, specify or create new
server - for example Tomcat
3. Simulate failing publish (that's the tricky part). I simulate it easy in my
server adapter by throwing CoreException in publish operation.

Expected: Once the publish operation fails, the server will not be started.
Actual: The server is continues starting.
Comment 1 Angel Vera CLA 2011-06-14 15:50:09 EDT
Over to Elson.
Comment 2 Vladislav Iliev CLA 2011-07-15 05:52:28 EDT
(In reply to comment #1)
> Over to Elson.

Hi guys,

Any news on this issue?
Comment 3 Elson Yuen CLA 2013-01-10 15:15:02 EST
This problem should be fixed as part of bug 390105 on Juno code base. Please try it out to see if you still see the problem.

*** This bug has been marked as a duplicate of bug 390105 ***