Configure applications for session management

 


One can use AdminApp to configure session manager for an application.

  1. Identify the deployment configuration object for the application and assign it to the deployment variable:

    set deployment [$AdminConfig getid /Deployment:AppName/]
    

    Example output:

    AppName(cells/cellname/applications/AppName.ear/deployments/AppName:deployment.xml#Deployment_1)
    

  2. Retrieve the applicaton deployment and assign it to the appDeploy variable:

    set appDeploy [$AdminConfig showAttribute $deployment deployedObject]
    

    Example output:

    (cells/cellname/applications/AppName.ear/deployments/AppName:deployment.xml#ApplicationDeployment_1)
    

  3. To obtain a list of attributes you can set for session manager, use the attributes command:

    $AdminConfig attributes SessionManager
    

    Example output:

    "accessSessionOnTimeout Boolean"
    "allowSerializedSessionAccess Boolean"
    "context ServiceContext@"
    "defaultCookieSet Cookie"
    "enable Boolean"
    "enableCookies Boolean"
    "enableProtocolSwitchRewriting Boolean"
    "enableSSLTracking Boolean"
    "enableSecurityIntegration Boolean"
    "enableUrlRewriting Boolean"
    "maxWaitTime Integer"
    "properties Property(TypedProperty)*"
    "sessionDRSPersistence DRSSet"
    "sessionDatabasePersistence SessionDatabasePersistence"
    "sessionPersistenceMode ENUM(DATABASE, DATA_REPLICATION, NONE)"
    "tuningParams TuningParams"
    

  4. Set up the attributes for the session manager:

    set attr1 [list enableSecurityIntegration true]
    set attr2 [list maxWaitTime 30]
    set attr3 [list sessionPersistenceMode NONE]
    set attrs [list $attr1 $attr2 $attr3]
    set sessionMgr [list sessionManagement $attrs]
    
    This example sets three top level attributes in the session manager. One can modify the example to set other attributes of session manager including the nested attributes in Cookie, DRSSet, SessionDataPersistence, and TuningParms object types. To list the attributes for those object types, use the attribute command in AdminConfig object.

    Example output:

    sessionManagement {{enableSecurityIntegration true} {maxWaitTime 30} {sessionPersistenceMode NONE}}
    

  5. Create the session manager for the application:

    $AdminConfig create ApplicationConfig $appDeploy [list $sessionMgr]
    

    Example output:

    (cells/cellname/applications/AppName.ear/deployments/AppName:deployment.xml#ApplicationConfig_1)
    

  6. Save changes:

    $AdminConfig save