-
Enhancement
-
Resolution: Done
-
Major
-
2.2.14.Final, 2.3.0.Beta2, 3.0.0.Alpha11
-
None
Right now, the generator and the conversation map are always stored in the request during conversation context association. If the session already exists, Weld attempts to load the values from there. Otherwise, new generator and conversation map is created. If the session exists when the request is dissociated, both instances are stored in the session.
WRT session replication - if the granularity is set to SESSION (WildFly default) and set-and-non-primitive-get strategy or similar is used, the load attempt triggers replication of the whole HTTP session. In other words, once the HTTP session is created ALL subsequent requests trigger replication no matter whether user touches the HTTP session (e.g. calls a @SessionScoped bean) or not.
Also unnecessary generator and conversation map are created for every HTTP request unless an HTTP session is associated (common scenario for RESTful webapps).