Contexts are externalizable objects, which means that the toolkit can create them from definitions in the context, data, and type definition files stored outside of the system. You can edit these files using any ASCII editor. For more information on externalizable objects, see Externalizers. Contexts created from external definitions are static and you declare them at installation or configuration time. Using external definition files to create contexts does not preclude creating other contexts dynamically during the runtime of the application.
To define a static context, use external definitions as shown in the following example. The first definition defines the myBranch context and the second definition defines a myWorkstation context and chains it to the myBranch context. The first definition also initializes an element (branchId) of the context's keyed collection with a value.
<CSClient id="realCSClient"/> <!-- WOSA service used in the WOSA printer sample--> <WOSADevice id="printerService" logicalName="TESTSPI" deviceType="DSEWPTR" timeout="0" SPMMinVersion="1.00" SPMMaxVersion="2.00" traceLevel="1"/>