Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stp-dev] Suggestion on undeploy support in SOAS (bug162516)

Hi,
 
I have some draft idea on how to support undeploy function in SOAS:

1. Connection related changes
First, we need to enhance the connection profile to list those deployed service component.
Such as define the new connection interface used in SOAS as following:

public interface org.eclipse.stp.soas.deploy.core.IServerConnection extends IConnection {
      public IServiceController getServiceController();
}
 
public interface org.eclipse.stp.soas.deploy.core.IServiceController() {
     public Collection<ServiceComponent> listServices() throws ServerException;
     public boolean isServiceExists(String serviceName) throws ServerException;  
     public IStatus start(String serviceName) throws ServerException;
     public IStatus stop(String serviceName)  throws ServerException;
     public IStatus undeploy(String serviceName) throws ServerException;
}
 
 
2. ServiceComponent.
Once we integrated with the STP core model in the near future, we can use org.eclipse.stp.core.sca.Component
direclty in the deploy/undeploy scenario. But for the time being, let's define a simple component logic for SOAS to use only.
 
public class org.eclipse.stp.soas.deploy.core.ServiceComponent{
 
      public String getName(); //this name is linked with IPackageOutputDescriptor::LogicalName
      public Properties getProperties(); //Those properties should get from server runtime. we can show them later.
}
 
We can use the ServiceComponent.name to identify the deployed service. This name is linked with IPackageOutputDescriptor::LogicalName
 
3 IDeploySession::unDeploy
Need to add unDeploy function to deploy driver as following:
public interface IDeploySession {
   IStatus unDeploy(IPackageOutputDescriptor descriptor) throws Exception;
   ...
}
 
In deploy driver, we can get IServiceContoller from IServerConnection, then call IServiceContoller.undeploy according to the IPackageOutputDescriptor::LogicalName.
 

4 UnDeploy action from GUI.
The current deploy scenario for Tomcat is: selecting a war file from workspace, then right click the 'Deploy...' menu. It will popup a dialog to ask user to select one target server.
I think the undeploy scenario could be: selecting a war file from workspace, then right click 'Undeploy...' menu. It will popup a dialog to list all servers, which has this component deployed. User select one or more target server, clicks OK to undeploy.
 
Please see the attached sequence diagram for the details.
 
What do you guys think?
 
Johnson
 
 
 
 

 

Attachment: TomcatUnDeploySequenceDiagram.jpg
Description: JPEG image


Back to the top