configuration transaction

This is the runtime configuration for a casual domain.

The sections can be splitted in arbitrary ways, and aggregated to one configuration model casual uses. Same sections can be defined in different files, hence, give more or less unlimited configuration setup.

Most of the sections has a property note for the user to provide descriptions of the documentation. The examples further down uses this to make it easier to understand the examples by them self. But can of course be used as a mean to help document actual production configuration.

domain.transaction

Defines transaction related configuration.

domain.transaction.default.resource

property

description

default

[key : string]

default key to use

[instances : integer]

default number of instances

1

Note: key has to be present in system.resources.key

domain.transaction.log : string

The path of the distributed transactions log file. When a distributed transaction reaches prepare, this state is persistent stored, before the actual commit stage.

if :memory: is used, the log is non-persistent.

domain.transaction.resources (list)

Defines all resources that servers and executables can be associated with, within this configuration.

property

description

default

name : string

a (unique) name to reference this resource

[key : string]

the resource key

domain.transaction.default.resource.key

[instances : integer]

number of resource-proxy instances

domain.transaction.default.resource.instances

[openinfo : string]

resource specific open configurations

[closeinfo : string]

resource specific close configurations

Note: key has to be present in system.resources.key

examples

Below follows examples in yaml and json (casual can also handle ini and xml)

yaml

---
domain:
  transaction:
    default:
      resource:
        key: "db2_rm"
        instances: 3
    log: "/some/fast/disk/domain.A42/transaction.log"
    resources:
      - name: "customer-db"
        instances: 5
        note: "this resource is named 'customer-db' - using the default rm-key (db_rm) - overrides the default rm-instances to 5"
        openinfo: "db=customer,uid=db2,pwd=db2"
      - name: "sales-db"
        note: "this resource is named 'sales-db' - using the default rm-key (db_rm) - using default rm-instances"
        openinfo: "db=sales,uid=db2,pwd=db2"
      - name: "event-queue"
        key: "mq_rm"
        note: "this resource is named 'event-queue' - overrides rm-key - using default rm-instances"
        openinfo: "some-mq-specific-stuff"
        closeinfo: "some-mq-specific-stuff"
...

json

{
    "domain": {
        "transaction": {
            "default": {
                "resource": {
                    "key": "db2_rm",
                    "instances": 3
                }
            },
            "log": "/some/fast/disk/domain.A42/transaction.log",
            "resources": [
                {
                    "name": "customer-db",
                    "instances": 5,
                    "note": "this resource is named 'customer-db' - using the default rm-key (db_rm) - overrides the default rm-instances to 5",
                    "openinfo": "db=customer,uid=db2,pwd=db2"
                },
                {
                    "name": "sales-db",
                    "note": "this resource is named 'sales-db' - using the default rm-key (db_rm) - using default rm-instances",
                    "openinfo": "db=sales,uid=db2,pwd=db2"
                },
                {
                    "name": "event-queue",
                    "key": "mq_rm",
                    "note": "this resource is named 'event-queue' - overrides rm-key - using default rm-instances",
                    "openinfo": "some-mq-specific-stuff",
                    "closeinfo": "some-mq-specific-stuff"
                }
            ]
        }
    }
}