Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Wtp-wst-dev] WTP Server adapter framework - how to get publish operation context

Well, this is in relation with the bug here and basically is a workaround for it.

With respect of bug above, I made a start & publish operations synchronous using jobs and job manager.
Start job joins any existing publish job(s) so, once publish job finishes, start job will decide whether to continue server start.
based on the job status. Also, if the publish job is so quickly executed before the start one, that the start job has nothing to join I
do a caching of the last publish job status. This way the start job that came later will still has change to decide whether to start the server or not(again
based on the status of the publish job).

This works perfectly when the user has chosen "Run On Server" option, but has a side effect when the user does only "Publish" on a stopped server.
In this case if the "Publish" has failed, the next server start (provoked by "Start" option) will not succeed, because of the cached last publish status (failed one).
So I need to know the context in which the publish operation in my code is called - this way I could differentiate both cases and change the
Behavior accordingly.


-----Original Message-----
From: wtp-wst-dev-bounces@xxxxxxxxxxx [mailto:wtp-wst-dev-bounces@xxxxxxxxxxx] On Behalf Of Max Rydahl Andersen
Sent: Tuesday, June 28, 2011 11:38 PM
To: Web Standard Tools developer discussions.
Cc: Giormov, Dimitar
Subject: Re: [Wtp-wst-dev] WTP Server adapter framework - how to get publish operation context

> Hi all,
> I would like to know is there an options to get in what context my publish method is called. I have implemented the extension point for publishing, but
> when my 
> public void execute(IProgressMonitor monitor, IAdaptable info) throws CoreException 
> method is called, I don't know whether the user has chosen "Run on Server" or right click on the server in servers view, then "Publish" option.

You should not care at this point. What do you need it for ?


> Best Regards,
> Vladislav 
> _______________________________________________
> wtp-wst-dev mailing list
> wtp-wst-dev@xxxxxxxxxxx


wtp-wst-dev mailing list

Back to the top