This page describes how to add a data service resource to a data service, thereby allowing clients to access and interact with the data service resource. It assumes that both the data service and data service resource have been deployed.
You can:
To add data service resources to data services under Tomcat:
$ ant addResourceTomcat -Ddai.service.path=service/path -Ddai.resource.id=ResourceID -Dtomcat.dir=/path/to/Tomcat/directory
To add data service resources under GT4 requires execution of the addResourceGT4 target. This takes the same arguments as addResourceTomcat. The exception is the tomcat.dir argument - this target instead accepts gt.dir which specifies the location of GT4. If this argument is omitted then the GT4 location specified within GLOBUS_LOCATION is used.
After restarting your container, you can test whether the new data service resource was successfully added using the OGSA-DAI WSRF listResourcesClient client. We describe how to use this client on this page.
To add data service resources to data services under Tomcat:
$ ant guiAddResourceTomcat
To add data service resources from data services under GT4 requires execution of the guiAddResourceGT4 target.
After restarting your container, you can test whether the new data service resource was successfully added using the OGSA-DAI WSRF listResourcesClient client. We describe how to use this client on this page.
If your data service is configurable then you can request that the data service immediately expose the data service resource, without having to restart your Web services container. This is done as follows:
$ ant dataServiceClient -Ddai.url=SERVICE-URL
-Ddai.resource.id=RESOURCE-ID -Ddai.action=deploy
where
$ ant dataServiceClient -Ddai.url=http://localhost:8080/wsrf/services/ogsadai/MyDataService -Ddai.resource.id=MyNewResource -Ddai.action=deploy
[echo] Deploying resource MyNewResource... [java] Contacting ... http://localhost:8080/wsrf/services/ogsadai/DataService [java] Service version: OGSA-DAI WSRF 1.0 [java] Number of resources: 1 [java] Resource: MySQLResource [java] Data Service Resource: MyNewResource [java] About to invoke Deploy... [java] Deploy completed!
During a deployment the service will attempt to update a data service resources file on the server. If this fails then a ConfigurationFaultType will occur with a corresponding message. The new data service resource will still be available via the data service but not if the container is shutdown and restarted. If such a failure occurs you can always add the data service resource to the data service using the first two approaches above.
| Back: Deploying Data Service Resources | Up: Deploying OGSA-DAI WSRF Data Services and Data Service Resources | Next: Removing Data Service Resources from Data Services |
| © International Business Machines Corporation, 2005. | © The University of Edinburgh, 2005. |