Author Message
yunjiaohou
Joined: Jan 2, 2008
Messages: 6
Offline
Hi, Expert
Our customer wants to know how DD controls the DD session? it means the mechanism of session control.

for mySession in DD, does it have any relationship with http session of each project if we have many modules?

If the main flow invoke a sub module, when the callflow quit from the module, will it destroy the http session of that module and all variables in that module?

Thanks in advance.
Yunjiao
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
First, the purpose of each DD SCESession object is to cache information for each call. To accomplish this, the SCESession object get created at the start of the call and removed at the end of the call.
Each SCESession object is bound to the http session when the call starts. That means if for some reason the http session get invalidated, the SCESession will get removed as well.
Each SCESession object is identified by an ID. When the main app invoke a sub module, the SCESession id and the module call flag is passed along in the URL so when the framework sees these parameters, it will retrieve the SCESession object for the use by the module. The SCESession does not get destroyed until the end of the call or the main app. Going in and out of module will not destroy http session. Variables are stored in SCESession and won't get destroyed until the end of the call.
yunjiaohou
Joined: Jan 2, 2008
Messages: 6
Offline
For those variables which we define in project.variables, will they be destroyed after the flow quit from sub module? It is very important to our customer since they have too many modules.

For http session, is there only one http session for the call, or one separate http session for each module?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The module variables will be destroyed when exiting the module.
We don't create new http session for each module.
yunjiaohou
Joined: Jan 2, 2008
Messages: 6
Offline
Can we define some variables only for sub flow? if main flow doesn't invoke sub flow, these variables will not use memory. the variables can also be released when existing sub flow.
I know currently sub flow will use the same variables which be defined in project.variables with main flow. Just double check. customer concern about memory usage very much.

Another question:
Does the DD project use the same Class Loader with web container? or use the separate framework with defferent Class Loader?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
No, you can not. A variable really doesn't take a much memory. Are we talking about living in the 80s when memory was expensive?
DD project uses the default class loaders in the web container.
yunjiaohou
Joined: Jan 2, 2008
Messages: 6
Offline
When we store some properties by invoking mySession.setProperty(), does that mean the property will be stored in the mySession Object, not http session?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Correct.
yunjiaohou
Joined: Jan 2, 2008
Messages: 6
Offline
How about the system variables in module?such as date, session,shareduui.
Are they stored in each module or shared in SCESession?
And how are they passed from main module to sub module?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Modules would have their own set of variables defined since they are separate applications to begin with. Since they are sharing the SCESession object with the main app, the system variables, shareduui get their values from there by directly accessing the variables. Date and time are calculated at the moment of accessing.
Go to:   
Mobile view