I wonder if there in eclipse RCP a programmatically way to remove an app deployed to a custom server that extends from a ServerDelegate
, just like it is done with the existing functionality Add and Remove..., available doing right click on the server.
I understand that the deployed app is into an IModule and this IModule is into the IServer.
I already tried with the method modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor)
but I only achieved to stop the app running, but nevertheless the app continue attached to the module and this to the server.
Have you tried to use the modifyModules from the ServerWorkingCopy?
The documentation form the modifyModules method on the ServerDelegate states:
This method is called by the web server core framework, in response to a call to IServerWorkingCopy.modifyModules
So seems that the modifyModules form the ServerDelegate it's called from the modifyModules from the ServerWorkingCopy which modifies the lost of modules associated with the server. Also as the modifyModules form the ServerWorkingCopy specifies, remember to do a Save and a publish to sync up with the server. Hope it helps!