How to Write a JDBC Data Resource Configuration Document

To write a data resource configuration document to expose a JDBC-enabled data resource:

  1. Copy the following XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <dataResourceConfig
      xmlns="https://ogsadai.org.uk/namespaces/2005/10/config">
      <documentation>
        MY-COMMENTS
      </documentation>
      <metaData>
        <productInfo>
          <productName>PRODUCT</productName>
          <productVersion>VERSION</productVersion>
          <vendorName>VENDOR</vendorName>
        </productInfo>
        CUSTOM-METADATA
      </metaData>
      <roleMap name="Name"
        implementation="uk.org.ogsadai.common.rolemap.SimpleFileRoleMapper"
        configuration="ROLE-MAP-FILE"/>
      <dataResource>
        <driver implementation="DATABASE-DRIVER">
          <uri>DATABASE-URI</uri>
        </driver>
      </dataResource>
    </dataResourceConfig>
    
  2. Optionally, replace MY-COMMENTS with some suitable text describing your data resource, or just remove it.
  3. Replace PRODUCT with the name of your data resource e.g. MySQL.
  4. Replace VERSION with the version of your data resource e.g. 4.
  5. Replace VENDOR with the vendor of your data resource e.g. MySQL.
  6. Optionally, replace CUSTOM-METADATA with some suitable XML describing your data resource, or just remove it. Any custom metadata element that is a direct child of the <metadata> element will be published as a data resource property by the service and can be accessed by clients. The data resource property can be accessed by the name of the element. For example,
    <databaseName>
      My database name
    </databaseName>
    
    will be published as data resource property under the name {https://ogsadai.org.uk/namespaces/2005/10/properties}databaseName and the value My database name.
  7. Replace ROLE-MAP-FILE with the relative or absolute location of a role map file consistent with the OGSA-DAI role map document format (which is described later in this guide). Relative pathnames will be resolved against the home directory of the web application of a Web services hosting container, for example CONTAINER/webapps/axis or CONTAINER/webapps/wsrf.
  8. Replace DATABASE-DRIVER with a Java database driver class names. We have already given an overview of recommended relational database drivers.
  9. Replace DATABASE-URI with the driver-specific URI of your data resource. For example: