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=deploywhere
$ 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 2.1 [java] Number of resources: 1 [java] Resource: MySQLResource [java] Data Service Resource: MyNewResource [java] About to invoke Deploy... [java] Deploy completed!
During this operation 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 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 expose the data service resource to the data service using the command-line ( exposeResource). or GUI-based (guiExposeResource) approaches described earlier.
Note that when exposing new data service resources dynamically via configurable data service this only works if the JARs required by the data service resource (e.g. database driver JARs) are already within the web service container's library directories. If this is not the case then the container has to be restarted.
Back: Exposing Data Service Resources | Up: Deploying Data Services and Data Service Resources | |
© International Business Machines Corporation, 2002-2006 | © The University of Edinburgh, 2002-2006 |