The OGSA-DAI server makes use of a single context object to which any class on the server has access. This is class:
uk.org.ogsadai.context.OGSADAIContext
and classes can get a reference to the context by doing:
OGSADAIContext context = OGSADAIContext.getInstance();
The OGSA-DAI context provides a key-object store which can use any object as keys or values.
The OGSA-DAI context must contain the following entries
at a minimum.
uk.org.ogsadai.context.OGSADAIConstants
provides constants containing the keys for these entries (and
OGSADAIContext provides getter
methods to provide access to many of these directly).
uk.org.ogsadai.PERSISTENCE_MANAGERuk.org.ogsadai.persistence.PersistenceManager.
uk.org.ogsadai.RESOURCE_MANAGERuk.org.ogsadai.resource.ResourceManager.
uk.org.ogsadai.ACTIVITY_MANAGERuk.org.ogsadai.activity.ActivityManager.
uk.org.ogsadai.COMMON_COMPONENTS_CONFIGURATION_MANAGERuk.org.ogsadai.config.CommonComponentsConfigurationManager.
![]() | 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. |
uk.org.ogsadai.REQUEST_FACTORYuk.org.ogsadai.activity.request.RequestFactory.
In addition the following may also be recorded in the OGSA-DAI
context. Again
uk.org.ogsadai.context.OGSADAIConstants
provides constants containing the keys for these entries.
3.0.
uk.org.ogsadai.CORE_VERSION.
java.lang.String.
Axis
1.4.
uk.org.ogsadai.PRESENTATION_VERSION.
java.lang.String.
uk.org.ogsadai.CONFIG_DIR.
java.io.File.
uk.org.ogsadai.SCHEMA_DIR.
java.io.File.
uk.org.ogsadai.USAGE_MONITOR_URL.
java.lang.String.
uk.org.ogsadai.WORKFLOW_AUTHORIZERuk.org.ogsadai.authorization.WorkflowAuthorizer.
The OGSA-DAI context is also the place to record any information that
any OGSA-DAI component may require. It is particularly useful to store
application-specific components needed by application-specific data
resources and activities. For example the login provider which
OGSA-DAI relational and XMLDB resources are configured to use by default
(ID uk.org.ogsadai.LOGIN_PROVIDER)
is placed in the context.
Whether resources are persisted is partly a factor of the implementation of a resource state DAO currently being used and also as to the resource is sticky and transient.
A sticky resource is one that cannot be persisted as it contains state that is non-serializable by a persistence layer. This is intended for future use when looking at using multiple JVMs in conjunction with OGSA-DAI servers. It is intended that the server would decide whether a resource is sticky or not based upon its state and resource properties.
A transient resource is one that is not persisted because the resource creator does not wish it to be so.
The default sticky and transient settings of OGSA-DAI resources are as follows. The resource APIs allow these to be changed however, via method calls, but those doing this should bear in mind the restrictions also imposed by the resource state DAO currently being used to persist and restore resources.
| Resource | Sticky | Transient |
|---|---|---|
| DRER | true | false |
| Session | false | false |
| Data resource | false | false |
| Data source | true | true |
| Data sink | true | true |
| Request | true | true |
Table G.1. Sticky and transient defaults for OGSA-DAI resources
These comments apply to the default OGSA-DAI resource manager
(uk.org.ogsadai.resource.SimpleResourceManager)
and file-based resource state DAO
(uk.org.ogsadai.persistence.file.resource.SimpleFileResourceStateDAO).
These comments apply to the default OGSA-DAI activity manager
(uk.org.ogsadai.activity.SimpleActivityManager)
and file-based activity specification DAO
(uk.org.ogsadai.persistence.file.activity.SimpleFileActivitySpecDAO).
These comments apply to the default OGSA-DAI common components
configuration manager
(uk.org.ogsadai.config.SimpleCommonComponentsConfigurationManager)
and file-based common components configuration DAO
(uk.org.ogsadai.persistence.config.config.SimpleFileCommonComponentsConfigurationDAO).
* - each starred interface has an
implementation class with name
SimpleX where
X is the interface name.
OGSA-DAI global context classes and interfaces.
Source release location: src/core/context-api uk.org.ogsadai.context.OGSADAIContext uk.org.ogsadai.context.OGSADAIContextInitializer uk.org.ogsadai.context.OGSADAIConstants
OGSA-DAI resource interfaces.
Source release location: src/core/resource-api uk.org.ogsadai.resource.Resource uk.org.ogsadai.resource.drer.DRER * uk.org.ogsadai.resource.session.SessionResource * uk.org.ogsadai.resource.request.RequestResource * uk.org.ogsadai.resource.datasource.DataSourceResource * uk.org.ogsadai.resource.datasink.DataSinkResource * uk.org.ogsadai.resource.dataresource.DataResource
OGSA-DAI manager interfaces:
Source release location: src/core/resource-api uk.org.ogsadai.resource.ResourceManager * Source release location: src/core/activityframework-api uk.org.ogsadai.activity.ActivityManager * Source release location: src/core/config-api uk.org.ogsadai.config.CommonComponentsConfigurationManager *
OGSA-DAI state and configuration interfaces. These represent the contract between OGSA-DAI persistence components and the OGSA-DAI core components.
Source release location: src/core/persistence-api uk.org.ogsadai.persistence.Persistable Source release location: src/core/activityframework-api uk.org.ogsadai.activity.ActivitySpec * Source release location: src/core/resource-api uk.org.ogsadai.resource.ResourceState uk.org.ogsadai.resource.ResourceLifetime * uk.org.ogsadai.resource.SupportedActivities * uk.org.ogsadai.resource.ResourcePropertySet * uk.org.ogsadai.resource.ResourceProperty * uk.org.ogsadai.resource.ResourcePropertyValue * uk.org.ogsadai.resource.PersistedResourceProperty * uk.org.ogsadai.resource.OnDemandResourceProperty * uk.org.ogsadai.resource.OnDemandResourcePropertyCallback uk.org.ogsadai.resource.dataresource.DataResourceState * uk.org.ogsadai.resource.datasink.DataSinkResourceState * uk.org.ogsadai.resource.datasource.DataSourceResourceState * uk.org.ogsadai.resource.drer.DRERState * uk.org.ogsadai.resource.drer.EngineState * uk.org.ogsadai.resource.request.RequestResourceState * uk.org.ogsadai.resource.session.SessionResourceState * Source release location: src/core/config-api uk.org.ogsadai.config.CommonComponentsConfiguration * uk.org.ogsadai.config.KeyValueProperties *
Event model
Source release location: src/core/activityframework-api uk.org.ogsadai.activity.event.ActivityEvent uk.org.ogsadai.activity.event.ActivityEventDispatcher uk.org.ogsadai.activity.event.ActivityEventListener Source release location: src/core/config-api uk.org.ogsadai.config.event.ConfigurationEvent uk.org.ogsadai.config.event.ConfigurationEventDispatcher uk.org.ogsadai.config.event.ConfigurationEventListener uk.org.ogsadai.config.event.KeyValueEvent uk.org.ogsadai.config.event.KeyValueEventDispatcher uk.org.ogsadai.config.event.KeyValueEventListener Source release location: src/core/resource-api uk.org.ogsadai.resource.event.ResourceEvent uk.org.ogsadai.resource.event.ResourceEventDispatcher uk.org.ogsadai.resource.event.ResourceEventListener uk.org.ogsadai.resource.event.ResourceManagerEvent uk.org.ogsadai.resource.event.ResourceManagerEventDispatcher uk.org.ogsadai.resource.event.ResourceManagerEventListener uk.org.ogsadai.resource.event.ResourcePropertyEvent uk.org.ogsadai.resource.event.ResourcePropertyEventDispatcher uk.org.ogsadai.resource.event.ResourcePropertyEventListener Source release location: src/core/event-api uk.org.ogsadai.event.UpdateEvent uk.org.ogsadai.event.UpdateEventDispatcher uk.org.ogsadai.event.UpdateEventListener uk.org.ogsadai.event.UpdateID
OGSA-DAI data resource state interfaces.
Source release location: src/core/resource uk.org.ogsadai.resource.dataresource.jdbc.JDBCDataResourceState uk.org.ogsadai.resource.dataresource.xmldb.XMLDBDataResourceState uk.org.ogsadai.resource.dataresource.file.FileDataResourceState uk.org.ogsadai.resource.dataresource.group.ResourceGroupDataResourceState
Each of these has an implementation class with name
SimpleX where
X is the interface name.
OGSA-DAI data resource classes
Source release location: src/core/resource uk.org.ogsadai.resource.dataresource.jdbc.JDBCDataResource uk.org.ogsadai.resource.dataresource.xmldb.XMLDBDataResource uk.org.ogsadai.resource.dataresource.file.FileDataResource uk.org.ogsadai.resource.dataresource.group.ResourceGroupDataResource
The OGSA-DAI core, persistence and configuration components do not treat these specially. They are developed using the data resource extensibility point.
The following classes make up the OGSA-DAI persistence APIs.
Source release location: src/core/persistence-api uk.org.ogsadai.persistence.PersistenceManager uk.org.ogsadai.persistence.DAO uk.org.ogsadai.persistence.resource.ResourceStateDAO * uk.org.ogsadai.persistence.activity.ActivitySpecDAO * uk.org.ogsadai.persistence.config.CommonComponentsConfigurationDAO * uk.org.ogsadai.persistence.Persistable uk.org.ogsadai.persistence.event.AccessStateDispatcher // Unused uk.org.ogsadai.persistence.event.AccessStateListener // Unused uk.org.ogsadai.persistence.event.UpdatePolicyController
* - each starred interface has an
implementation class with name
SimpleFile where
X is the interface name. These are in
the
uk.org.ogsadai.persistence.file
package and its sub-packages.
There is also
uk.org.ogsadai.persistence.file.ContextFilePersistenceManager
which takes its configuration directory via a property in
uk.org.ogsadai.context.OGSADAIContext
rather than via a method.
* - each starred interface has an
implementation class with name
DummyFile where
X is the interface name. These are in
the
uk.org.ogsadai.persistence.dummy
package and its sub-packages.
OGSA-DAI managers are each given a DAO of the associated type to manage configuration and persistence. By default they are given a dummy DAO. Server-specific configuration files ensure that they are given file-based DAOs.
OGSA-DAI's
uk.org.ogsadai.common.Base64
encoding class requires a third-party implementation of base 64
encoding.
By default this is
org.apache.axis.encoding.Base64.
Application developers can override this value by using the
Base64.registerBase64Class(String
className) method to provide the name of a class that
implements base 64. This class must support the following methods:
byte[] decode(String data) String encode(byte[] data) String encode(byte[] data, int offset, int length)
![]() | Note |
|---|---|
| Place-holder for possible future content. A list of standard targets for database type conversion e.g. integers always map to 32 bit |
These are OGSA-DAI's core types as exposed to the presentation layers.
These are just standard Java classes apart from the list start/end
markers
(uk.org.ogsadai.activity.io.ControlBlock.LIST_BEGIN and LIST_END).
java.lang.String char[] byte[] java.lang.Boolean java.lang.Float java.lang.Integer java.lang.Long java.lang.Double java.lang.Date java.lang.Calendar uk.org.ogsadai.activity.io.ControlBlock.LIST_BEGIN uk.org.ogsadai.activity.io.ControlBlock.LIST_END
uk.org.ogsadai.activity.delivery.ObtainFromDataSourceActivity
converts from uk.org.ogsadai.data types
to core types.
uk.org.ogsadai.data value Core type StringData.getString() String CharData.getChars() char[] BinaryData.getBytes() byte[] BooleanData.getBoolean() Boolean FloatData.getFloat() Float IntegerData.getInteger() Integer LongData.getLong() Long DoubleData.getDouble() Double Date.getDate() Date ListBegin LIST_BEGIN ListEnd LIST_END
uk.org.ogsadai.activity.delivery.DeliverToDataSinkActivity
converts from core types to
uk.org.ogsadai.data types.
Core type uk.org.ogsadai.data String StringData char[] CharData byte[] BinaryData Boolean BooleanData Float FloatData Integer IntegerData Long LongData Double DoubleData Date DateData(Date) LIST_BEGIN ListBegin LIST_END ListEnd
uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestBuilder converts
uk.org.ogsadai.data types to
uk.org.ogsadai.service.gt.types.DataType beans.
uk.org.ogsadai.data class DataType bean StringData DataType.setString(String.toString()) CharData DataType.setCharArray(String(CharData.getChars())) BinaryData DataType.setBinary(BinaryData.getBytes()) BooleanData DataType.set_boolean(BooleanData.getBoolean()) FloatData DataType.set_float(FloatData.getFloat()) IntegerData DataType.set_int(IntegerData.getInteger()) LongData DataType.set_long(LongData.getLong()) DoubleData DataType.set_double(DoubleData.getDouble()) DateData DataType.setDate(DateData.getCalendar()) ListBegin DataType.setListBegin(ListBeginType bean) ListEnd DataType.setListEnd(ListEndType bean)
GTRequestBuilder is used by
uk.org.ogsadai.client.toolkit.presentation.gt.GTDataRequestExecutionResource uk.org.ogsadai.client.toolkit.presentation.gt.GTDataSink
uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestStatusBuilder.getDataValue(DataType) converts
uk.org.ogsadai.service.gt.types.DataType
beans to uk.org.ogsadai.data types.
uk.org.ogsadai.data class DataType bean StringData(String) DataType.getString() CharArray(String.toCharArray()) DataType.getCharArray() BinaryData(byte[]) DataType.getBinary() BooleanData(boolean) DataType.get_boolean() FloatData(float) DataType.get_float() IntegerData(integer) DataType.get_int() LongData(long) DataType.get_long() DoubleData(double) DataType.get_double() DateData(Calendar.getTime()) DateType.getDate(); ListBegin if DataType.getListBegin() != null ListEnd if DataType.getListEnd() != null
GTRequestBuilder.getDataValue(DataType) is used by
uk.org.ogsadai.client.toolkit.presentation.gt.GTDataSource
uk.org.ogsadai.client.toolkit.presentation.gt.GTRequestStatusBuilder.processActivityResults(ResultType) converts
uk.org.ogsadai.service.gt.types.DataType
beans to uk.org.ogsadai.data types.
uk.org.ogsadai.data class DataType bean StringData(String) DataType.getString() CharArray(char[]) DataType.getCharArray().toCharArray() BinaryData(byte[]) DataType.getBinary() BooleanData(boolean) DataType.get_boolean() FloatData(float) DataType.get_float() IntegerData(integer) DataType.get_int() LongData(long) DataType.get_long() DoubleData(double) DataType.get_double() DateData(Date) DateType.getDate().getTime(); ListBegin if DataType.getListBegin() != null ListEnd if DataType.getListEnd() != null
GTRequestBuilder.processActivityResults(ResultType) is used by
uk.org.ogsadai.client.toolkit.presentation.gt.GTDataRequestExecutionResource
uk.org.ogsadai.service.gt.GTUtils.getDataValue(Object)
converts OGSA-DAI core types to
uk.org.ogsadai.service.gt.types.DataType beans.
Core Type DataType bean String DataType.setString(String) char[] DataType.setCharArray(new String(char[])) byte[] DataType.setBinary(byte[]) Boolean DataType.set_boolean(Boolean) Float DataType.set_float(Float) Integer DataType.set_int(Integer) Long DataType.set_long(Long) Double DataType.set_double(Double) Date DataType.setDate(Calendar.getInstance().setTime(Date)) LIST_BEGIN DataType.setListBegin(ListBeginType bean) LIST_END DataType.setListEnd(ListEndType bean)
GTUtils.getDataValue(Object) is used by
uk.org.ogsadai.service.gt.datasource.GTDataSourceProvider.
uk.org.ogsadai.service.gt.GTUtils.getDataObject(DataType)
converts
uk.org.ogsadai.service.gt.types.DataType
beans to OGSA-DAI core types.
Core Type DataType bean String DataType.getString() char[] DataType.getCharArray().toCharArray() byte[] DataType.getBinary() Boolean DataType.get_boolean() Float DataType.get_float() Integer DataType.get_int() Long DataType.get_long() Double DataType.get_double() Date DataType.getDate().getTime() (returns Date) LIST_BEGIN ControlBlock.LIST_BEGIN if DataType.getListBegin() != null LIST_END ControlBlock.LIST_END if DataType.getListEnd() != null
GTUtils.getDataObject(DataType) is used by
uk.org.ogsadai.service.gt.datasink.GTDataSinkProvider.
uk.org.ogsadai.service.gt.execution.workflow.InputHandler.handleLiteralInputs()
converts
uk.org.ogsadai.service.gt.types.DataType
beans to OGSA-DAI core types.
Conversions are as for Section G.10.6, “Type mappings - data sink” above
except that OGSA-DAI core type objects are wrapped into
uk.org.ogsadai.activity.pipeline.Literal
objects.
InputHandler.handleLiteralInputs() is used by
uk.org.ogsadai.service.gt.datasink.GTDataRequestExecutionResourceProvider
uk.org.ogsadai.service.gt.request.BeanDataValueVisitor
uk.org.ogsadai.data classes to
uk.org.ogsadai.service.gt.types.DataType beans.
uk.org.ogsadai.data.* DataType bean StringData DataType.setString(String.toString()) CharData DataType.setCharArray(String(CharData.getChars())) BinaryData DataType.setBinary(BinaryData.getBytes()) BooleanData DataType.set_boolean(BooleanData.getBoolean()) FloatData DataType.set_float(FloatData.getFloat()) IntegerData DataType.set_int(IntegerData.getInteger()) LongData DataType.set_long(LongData.getLong()) DoubleData DataType.set_double(DoubleData.getDouble()) DateData DataType.setDate(DateData.getCalendar()) ListBegin DataType.setListBegin(ListBeginType bean) ListEnd DataType.setListEnd(ListEndType bean) NoMoreData Do nothing. DataError Do nothing.
BeanDataValueVisitor is used by
uk.org.ogsadai.service.gt.datasource.GTDataRequestExecutionProvider.