try
{
FileDataCacheResource dataCache =
(FileDataCacheResource)mResourceFactory.createDataResource(
DATA_CACHE_RESOURCE_TEMPLATE);
DataCacheResourceState state = dataCache.getDataCacheResourceState();
state.getDataResourceState().setResourceID(resourceID);
// Add the resource group to the OGSA-DAI resource manager
// via the resource factory utility.
mResourceFactory.addResource(resourceID, dataCache);
// Output the resource group ID.
mOutput.write(dataCache.getResourceID().toString());