Chapter 18. Advanced server configuration

18.1. OGSA-DAI GT configuration
18.2. Changing JNDI configuration
18.3. Configuration files directory
18.4. Persistence manager
18.4.1. Selecting a different persistence manager
18.5. Resource manager
18.5.1. Selecting a different resource manager
18.6. Activity manager
18.6.1. Selecting a different activity manager
18.7. Common components configuration manager
18.7.1. Selecting a different common components configuration manager
18.8. Login provider
18.8.1. Specifying a login provider
18.9. Miscellaneous objects
18.9.1. Specifying miscellaneous objects
18.9.2. External information on JNDI

18.1. OGSA-DAI GT configuration

OGSA-DAI GT is configured using a JNDI configuration file. This configuration file is used to populate the OGSA-DAI context.

In OGSA-DAI distributions, this file is located in:

deploy/jndi-config.xml

In a deployment on Tomcat, this file is located in:

TOMCAT/webapps/wsrf/WEB-INF/etc/dai/jndi-config.xml

In a deployment on Globus Toolkit container, this file is located in:

GT/etc/dai/jndi-config.xml

18.2. Changing JNDI configuration

To change a JNDI configuration option in a deployed OGSA-DAI:

  1. Edit the OGSA-DAI JNDI configuration file on the server and make the required changes.
  2. Add any JARs containing any additional classes to the server.
    • In OGSA-DAI GT on Tomcat, JARs should be placed in:
      TOMCAT/webapps/wsrf/WEB-INF/lib
      
    • In OGSA-DAI GT on Globus Toolkit, JARs should be placed in:
      GT/lib
      
  3. Ensure that any additional configuration is done.
  4. You will need to restart OGSA-DAI for any changes to take effect.

Alternatively you can change a JNDI configuration option in OGSA-DAI prior to deployment as follows:

  1. Edit the OGSA-DAI JNDI configuration file in the OGSA-DAI binary distribution and make the required changes.
  2. Add any JARs containing any additional classes to the OGSA-DAI binary distribution in the directory:
    thirdparty/lib
    
  3. Ensure that any additional configuration is done.
  4. Deploy OGSA-DAI as described in Chapter 12, Deploying OGSA-DAI.

18.3. Configuration files directory

Certain OGSA-DAI extensible components (e.g. the OGSA-DAI file-based persistence manager) require the provision of a configuration files directory. These components expect this directory to be located in the OGSA-DAI context with ID uk.org.ogsadai.CONFIG_DIR.

In OGSA-DAI GT this directory is declared using JNDI as follows:

<environment name="ogsadai/uk.org.ogsadai.CONFIG_DIR" 
             value="etc/dai"
             type="java.lang.String"/>

This directory is relative to the Globus Toolkit wsrf webapp when deployed on Tomcat or the root Globus Toolkit distribution directory when deployed on the Globus Toolkit container.

18.4. Persistence manager

The persistence manager is used to handle OGSA-DAI server configuration and persistence of resources is specified as part of the JNDI configuration.

The OGSA-DAI server must be able to access in its OGSA-DAI context a persistence manager with ID uk.org.ogsadai.PERSISTENCE_MANAGER and which implements the interface uk.org.ogsadai.persistence.PersistenceManager.

In OGSA-DAI GT the persistence manager is declared using JNDI as follows:

<resource name="ogsadai/uk.org.ogsadai.PERSISTENCE_MANAGER"
          type="uk.org.ogsadai.persistence.file.ContextFilePersistenceManager">
  <resourceParams>
    <parameter>
      <name>factory</name>
      <value>org.globus.wsrf.jndi.BeanFactory</value>
    </parameter>
  </resourceParams>
</resource>

By default OGSA-DAI uses the class uk.org.ogsadai.persistence.file.ContextFilePersistenceManager. This provides simple file-based persistence and configuration of resources, configuration of activities and configuration of common components. This relies upon a configuration directory specified in the OGSADAI context as descibed in Section 18.3, “Configuration files directory”.

18.4.1. Selecting a different persistence manager

To select and use a different persistence manager follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and change the class in the type attribute of the JNDI entry for the persistence manager to specify the class of the persistence manager you want to use.
  • Add the JAR containing the persistence manager to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.5. Resource manager

The resource manager manages the OGSA-DAI resources currently available in an OGSA-DAI server which are exposed by OGSA-DAI presentation layers. The resource manager is specified as part of the JNDI configuration.

The OGSA-DAI server must be able to access in its OGSADAI context a resource manager with ID uk.org.ogsadai.RESOURCE_MANAGER and which implements the interface uk.org.ogsadai.resource.ResourceManager.

In OGSA-DAI GT the resource manager is declared using JNDI as follows:

<resource name="ogsadai/uk.org.ogsadai.RESOURCE_MANAGER"
           type="uk.org.ogsadai.resource.SimpleResourceManager">
  <resourceParams>
    <parameter>
      <name>factory</name>
      <value>org.globus.wsrf.jndi.BeanFactory</value>
    </parameter>
  </resourceParams>
</resource>

By default OGSA-DAI uses the class uk.org.ogsadai.resource.SimpleResourceManager. This provides basic in-memory caching of resources and consults the persistence and configuration components of OGSA-DAI only when a resource is initially created, a resource cannot be found in the cache or is destroyed. See also Section 17.2.4, “Resource Files”.

18.5.1. Selecting a different resource manager

To select and use a different resource manager follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and change the class in the type attribute of the JNDI entry for the resource manager to specify the class of the resource manager you want to use.
  • Add the JAR containing the resource manager to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.6. Activity manager

The activity manager manages the OGSA-DAI activities currently available in an OGSA-DAI server. The activity manager is specified as part of the JNDI configuration.

The OGSA-DAI server must be able to access in its OGSA-DAI context an activity manager with ID uk.org.ogsadai.ACTIVITY_MANAGER and which implements the interface uk.org.ogsadai.activity.ActivityManager.

In OGSA-DAI GT the activity manager is declared using JNDI as follows:

<resource name="ogsadai/uk.org.ogsadai.ACTIVITY_MANAGER"
          type="uk.org.ogsadai.activity.SimpleActivityManager">
  <resourceParams>
    <parameter>
      <name>factory</name>
      <value>org.globus.wsrf.jndi.BeanFactory</value>
    </parameter>
  </resourceParams>
</resource>

By default OGSA-DAI uses the class uk.org.ogsadai.activity.SimpleActivityManager. This provides basic in-memory caching of activity specifications and consults the persistence and configuration components of OGSA-DAI only when an activity specification is initially created or when an activity specification cannot be found in the cache. See also Section 17.2.2, “Activity specification file”.

18.6.1. Selecting a different activity manager

To select and use a different activity manager follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and change the class in the type attribute of the JNDI entry for the activity manager to specify the class of the activity manager you want to use.
  • Add the JAR containing the activity manager to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.7. Common components configuration manager

The common components configuration manager manages the configuration of generic or common components used in an OGSA-DAI server. The common components configuration manager is specified as part of the JNDI configuration.

[Note]Note
OGSA-DAI has no components that use common components configuration. However, any application-specific components developed by third-party developers may make use of this.

The OGSA-DAI server must be able to access in its OGSA-DAI context a common components configuration manager with ID uk.org.ogsadai.COMMON_COMPONENTS_CONFIGURATION_MANAGER and which implements the interface uk.org.ogsadai.config.CommonComponentsConfigurationManager.

In OGSA-DAI GT the common components configuration manager is declared using JNDI as follows:

<resource name="ogsadai/uk.org.ogsadai.COMMON_COMPONENTS_CONFIGURATION_MANAGER"
          type="uk.org.ogsadai.config.SimpleCommonComponentsConfigurationManager">
  <resourceParams>
    <parameter>
      <name>factory</name>
      <value>org.globus.wsrf.jndi.BeanFactory</value>
    </parameter>
  </resourceParams>
</resource>

By default OGSA-DAI uses the class uk.org.ogsadai.config.SimpleCommonComponentsConfigurationManager. This provides access to common components configuration from the persistence and configuration components of OGSA-DAI. See also Section 17.2.6, “Common components configuration file”.

18.7.1. Selecting a different common components configuration manager

To select and use a different common components configuration manager follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and change the class in the type attribute of the JNDI entry for the common components configuration manager to specify the class of the common components configuration manager you want to use.
  • Add the JAR containing the common components configuration manager to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.8. Login provider

Login providers are used by certain data resource implementations to perform certain authorization functions, e.g. Login providers are specified as part of the JNDI configuration.

Login providers are optional and one or more can be declared. They are added to the OGSA-DAI context with IDs specified in the JNDI configuration.

Data resource implementations can then get the login provider with the required ID from the OGSADAIContext. The ID to use is specified as part of the configuration for the data resource that uses that implementation - this allows a single login provider to be used by one or more data resources, for example.

All login providers specified via JNDI must implement the interface uk.org.ogsadai.authorization.LoginProvider.

An example of declaring a login provider in OGSA-DAI GT is as follows:

<resource name="ogsadai/logins/uk.org.ogsadai.LOGIN_PROVIDER"
          type="uk.org.ogsadai.authorization.file.ContextFileLoginProvider">
  <resourceParams>
    <parameter>
      <name>factory</name>
      <value>org.globus.wsrf.jndi.BeanFactory</value>
    </parameter>
  </resourceParams>
</resource>

OGSA-DAI's default JDBC and XMLDB data resource implementations use the class uk.org.ogsadai.authorization.file.ContextFileLoginProvider. This provides mappings from the caller's distinguished name to usernames and passwords for 0 or more data resources using a file. See also Section 17.2.3, “Logins File”.

18.8.1. Specifying a login provider

To specify a login provider follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and insert a declaration for your login provider.
    • For OGSA-DAI GT add, in the <global> element, an XML fragment of the following form:
      <resource name="ogsadai/logins/LOGIN-PROVIDER-ID"
                type="LOGIN-PROVIDER-CLASS">
        <resourceParams>
          <parameter>
            <name>factory</name>
            <value>org.globus.wsrf.jndi.BeanFactory</value>
          </parameter>
        </resourceParams>
      </resource>
      
    • Where:
      • LOGIN-PROVIDER-ID is an ID for the login provider. This ID will be used to name the login provider in the OGSADAIContext.
      • LOGIN-PROVIDER-CLASS is the name of the class implementing the login provider.
  • Add the JAR containing the login provider to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.9. Miscellaneous objects

Arbitrary application-specific objects can be specified via JNDI with associated IDs. These objects will then be added to the OGSA-DAI context with the IDs specified in the JNDI configuration.

18.9.1. Specifying miscellaneous objects

To specify a miscellaneous object follow section Section 18.2, “Changing JNDI configuration” with reference to the following:

  • Edit the OGSA-DAI JNDI configuration file and insert a declaration for your object.
    • For OGSA-DAI GT add, in the <global> element, an XML fragment of the following form:
      <resource name="ogsadai/misc/MISC-ID"
                type="MISC-CLASS">
        <resourceParams>
          <parameter>
            <name>factory</name>
            <value>org.globus.wsrf.jndi.BeanFactory</value>
          </parameter>
        </resourceParams>
      </resource>
      
    • Where:
      • MISC-ID is an ID for the object. This ID will be used to name the object in the OGSADAIContext.
      • MISC-CLASS is the name of the class.
  • Add the JAR containing the class to the specified directory in Section 18.2, “Changing JNDI configuration”.

18.9.2. External information on JNDI

Please consult documentation on JNDI for more advanced JNDI configuration options.