Dynamically Withdrawing Data Service Resources from Data Services via the Command-line

If your data service is configurable then you can request that the data service immediately no longer expose the data service resource, without having to restart your Web services container. This is done as follows:

  1. Run the following command from within the OGSA-DAI WSRF binary distribution directory:
    $ ant dataServiceClient -Ddai.url=SERVICE-URL
          -Ddai.resource.id=RESOURCE-ID -Ddai.action=undeploy
    
    where For example:
    $ ant dataServiceClient 
     -Ddai.url=http://localhost:8080/wsrf/services/ogsadai/MyDataService
     -Ddai.resource.id=MyResource -Ddai.action=undeploy
    
  2. The request will be forwarded to the data service. For example:
    [echo] Undeploying resource  MyResource...
    [java] Contacting ... http://localhost:8080/wsrf/services/ogsadai/DataService
    [java] Service version: OGSA-DAI WSRF 2.2
    [java] Number of resources: 1
    [java] Resource: MyResource
    [java] Data Service Resource: MyResource
    [java] About to invoke Undeploy...
    [java] Undeploy completed!
    
  3. You can now use the listResourcesClient client (described on this page) to check if the undeployment was successful.

During a withdrawl the service will attempt to update a data service resources file on the server. If this fails then a ServerException will occur with a corresponding message. The data service resource will no longer be available via the data service but if the container is shutdown and restarted it will again be available. If such a failure occurs you can always withdraw the data service resource from the data service using the first two approaches above.