Currently, the coupling between the undertow subsystem and the modules required for distributed web session manager and single sign-on manager support is very loose.
Consequently, misconfiguration (e.g. a missing "web" cache-container) can prevent deployment from succeeding without an adequate explanation.
The subsystem would define the requisite cache-container, exposed as a capability.
This subsystem would exposes a number of profiles, containing the configuration traditionally specified in jboss-web.xml, as well as the cache configuration to use (specified by cache-container + cache name). jboss-web.xml would only need to reference a profile by name, or, if unspecified, use the default profile.