After you enable the auto-chain function, you can chain a context to the parent context automatically if the context has the parent context name in its definition.
In the following example, if you enable the auto-chain function, the session context will be chained to its parent branchServer context automatically after creation:
By default, the auo-chain function is not enabled. There are two ways to enable it: the application can either call API or set the attribute in btt.xml.
Class ContextFactory provides the following APIs to enable auto-chain function and query the flag: