CORAL Component documentation: XMLLookupService

The CORAL Team

CERN

November 2005


1. Introduction

1.1. Purpose of the component

The XMLLookupService package is a plugin library providing logical-physical mapping technology in xml format and providing an implementation of the ILookupService interface.

1.2. Repository of the component

:pserver:anonymoys@coral.cvs.cern.ch:/cvs/coral/coral/XMLLookupService

2. XMLLookupService Semantics

The XMLLookupService is responsible for logical-physical mapping and is providing list of possible replica based on logical database/service name, authentication method and access mode in which database will be accessed.

Service specific parameters can be specified as child nodes of the service entries (see example below).

The XML file should have a format like the following:


<servicelist>

  <logicalservice name="myservice1">
    <service name="oracle://host1/schema1" accessMode="update" authentication="password" />
    <service name="oracle://host2/schema1" accessMode="readonly" authentication="password" />
    <service name="oracle://host3/schema1" accessMode="update" authentication="certificate" />
  </logicalservice>

  <logicalservice name="myservice2">
    <service name="oracle://host1/schema2" accessMode="readonly" authentication="password certificate" />
    <service name="oracle://host2/schema2" accessMode="readonly" authentication="certificate" />
    <service name="oracle://host3/schema2" accessMode="update" authentication="certificate password" />
  </logicalservice>

  <logicalservice name="myservice3">
    <service name="oracle://host1/schema2" accessMode="update" authentication="password" >
      <parameter name="ConnectionRetrialPeriod" value="60" />
      <parameter name="ConnectionRetrialTimeOut" value="360" />
      <parameter name="ConnectionTimeOut" value="3000" />
    </service>
  </logicalservice>

</servicelist>


The dblookup.xml file is searched for in the current working directory and, if not found, the directories defined in the CORAL_DBLOOKUP_PATH environment path variable.

XMLLookup service returns a list of possible replica as object of class IDatabaseServiceSet defined in RelationalAccess package. Through IDatabaseServiceSet information can be accessed about number of available replicas, replica connection string, allowed access mode and authentication procedure of originating site.

3. Implementation specifics

The implementation of the package is based on XercesC for the parsing of the XML file.

4. Related components

  • RelationalAccess, is the package where the CORAL abstract interfaces are defined.

  • CoralCommon, is the package where some developer-level interfaces and some common implementation classes are defined.

5. XMLLookupService Reference

5.1. Properties of the "CORAL/Services/XMLLookupService" component

  • Properties of Lookup File : The name of the file can be set through property manager of the service. The authentication methods include options of password or certificate, depending on originating site. Access Mode can be 'readonly' or 'update'.

5.2. Environment variables related to the "CORAL/Services/XMLLookupService" component

  • CORAL_DBLOOKUP_PATH : a path environment variable, where the XML input file is searched for. The current working directory has always higher priority.

5.3. Connection related service parameters

Currently three parameters are supported (see ConnectionService documentation for their meaning and usage):

  • ConnectionRetrialPeriod.

  • ConnectionRetrialTimeOut.

  • ConnectionTimeOut.