-
Notifications
You must be signed in to change notification settings - Fork 16
Other Properties
Some properties are not restricted for use by any one specific task. For instance, connection information to the server will be used by all tasks. This section will cover properties that can be used across tasks.
As mentioned, the database connection information is contained in properties. It can either be passed entirely as a connection URI or it can be broken up into multiple parts if the connection URI isn’t provided. Often it's necessary to encrypt connection information, which will be covered later.
- XCC-CONNECTION-URI=theEntireConnectionString
- XCC-USERNAME (Required if XCC-CONNECTION-URI is not specified)
- XCC-PASSWORD (Required if XCC-CONNECTION-URI is not specified)
- XCC-HOSTNAME (Required if XCC-CONNECTION-URI is not specified)
- XCC-PORT (Required if XCC-CONNECTION-URI is not specified)
- XCC-DBNAME (Optional)
- XCC-CONNECTION-RETRY-LIMIT (Number attempts to connect to ML before giving up - default is 3)
- XCC-CONNECTION-RETRY-INTERVAL (in seconds - Time interval in seconds between retry attempts - default is 60)
Prior to CORB 2.1.0, if an XQuery module was going to be used it had to be preloaded into the database at the URI specified by the PRE-BATCH, PROCESS or POST-BATCH module property. With this release, it is no longer necessary to load the modules to the database and instead they can be read from a file into memory and discarded when the task is complete. To make use of this 'ad-hoc' functionality simply append the string "|ADHOC" onto the end of the URI for the module and ensure the file is on the Java classpath. For example:
- POST-BATCH-MODULE=/path/to/postBatch.xqy|ADHOC
If using a database to store the modules, use the following property to specify which database the modules reside in:
- MODULES-DATABASE (Use 0 if on file system; uses the XCC-CONNECTION-URI if not provided)
If the URIs for modules are long it may be desirable to use a property to set a base path for the URIs. If so use:
- MODULE-ROOT (if not used the default is '/' for root)
Sometimes it's desirable to pass in values to an XQuery script. For instance, if a search needs to be performed over a range of dates but the range may change in the future it would be best to put the dates in a properties file so that they could be changed easily. With CORB 2.1.0, all modules support the use of custom properties. To use a custom property, it must be prepended with the Task name and declared as an external variable in the XQuery. For instance, to pass in a beginning and end date to the URIS Task use:
- URIS-MODULE.startDate=20150317
- URIS-MODULE.endDate=20150331
To pass a collection name to the PROCESS task use:
- XQUERY-MODULE.collectionName=nameOfCollectionToUse
This feature is available for the following modules:
- URIS-MODULE
- XQUERY-MODULE
- PRE-BATCH-MODULE
- POST-BATCH-MODULE
- INIT-MODULE