In JAC, sessions are simply handled by saving a defined set of attributes of the collaborations and make them corespond to a session id.
The current session id is defined as a context attribute called "Session.sid". This attribute must be set by the client before initiating a collaboration if he wants its collaborations characteritics to be memorized and restored for each new interaction.
The session aspect is useful since that if it is not woven, the user will have to input several times the same informations again and again such as its password to access a restricted method.
A typical configuration for the session aspect is to save the
authentication contextual information saved by the
authentication aspect (see package
org.objectweb.jac.aspects.authentication
) so that the user will
not have to authenticate on each access to the objects:
declareStoredAttributes {"Authentication.user"}