The Session Service enables applications to do the
following:
-
create a session context. A session
context is a control structure that maintains state information within
a bound session, facilitating resource management, and context passing.
-
bind objects to a session context.
-
use the session context as a convenience
container for passing multiple contexts.
-
use the session context as a convenience
container for passing other services, such as User Services and Logging
Services.
-
notify bound objects when they
are removed from the session context or when the session context is
destroyed, so that objects can perform any necessary cleanup.
For more information,
see
com.sas.services.session
in the
SAS Foundation Services class documentation at
http://support.sas.com/rnd/javadoc/93
.
When the Session Service
initializes, it discovers the Logging Service, and obtains a default
logging context. The Session Service then uses the Session Service
configuration to determine whether to bind to a user context when
creating the root session context:
-
If the Session Service deployment
configuration specifies a user context name, the Session Service discovers
the User Service and obtains the default user context. The Session
Service then creates a default root session context that is bound
to this default user context.
-
If the Session Service deployment
configuration does not specify a user context name, then the Session
Service creates a default root session context that is not bound to
any user context.
Applications can then
use the root session context to track shared resources that are global
to the application and to obtain the initialized logging context and
default user context (if one was specified).