This task provides an example that uses the AdminConfig object to configure a session manager for the application.
An application must be installed on a running server.
You can use the AdminConfig object to set configurations in an application. Some configuration settings are not available through the AdminConfig object.
set deployments [$AdminConfig getid /Deployment:myApp/]
deployments = AdminConfig.getid('/Deployment:myApp/') print deployments
set | is a Jacl command |
deployments | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere® Application Server configuration |
getid | is an AdminConfig command |
Deployment | is an attribute |
myApp | is the value of the attribute |
myApp(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#Deployment_1)
set appDeploy [$AdminConfig showAttribute $deployments deployedObject]
appDeploy = AdminConfig.showAttribute(deployments, 'deployedObject') print appDeploy
appDeploy = AdminTask.getOSGiApplicationDeployedObject('-cuName cu_name')
set | is a Jacl command |
appDeploy | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere Application Server configuration |
showAttribute | is an AdminConfig command |
deployments | evaluates the ID of the deployment object that is specified in step number 1 |
deployedObject | is an attribute |
![]() ![]() jul2011 |
![]() ![]() jul2011 |
(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#ApplicationDeployment_1)
$AdminConfig attributes SessionManager
print AdminConfig.attributes('SessionManager')
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere Application Server configuration |
attributes | is an AdminConfig command |
SessionManager | is an attribute |
"accessSessionOnTimeout Boolean" "allowSerializedSessionAccess Boolean" "context ServiceContext@" "defaultCookieSettings Cookie" "enable Boolean" "enableCookies Boolean" "enableProtocolSwitchRewriting Boolean" "enableSSLTracking Boolean" "enableSecurityIntegration Boolean" "enableUrlRewriting Boolean" "maxWaitTime Integer" "properties Property(TypedProperty)*" "sessionDRSPersistence DRSSettings" "sessionDatabasePersistence SessionDatabasePersistence" "sessionPersistenceMode ENUM(DATABASE, DATA_REPLICATION, NONE)" "tuningParams TuningParams"
When you configure an application for session management, it is recommended that you specify each attribute.
The following example sets four top-level attributes in the session manager. You can modify the example to set other attributes of the session manager, including the nested attributes in DRSSettings, SessionDataPersistence, and TuningParms object types.
To list the attributes for those object types, use the attributes command of the AdminConfig object.
set attr1 [list enableSecurityIntegration true] set attr2 [list maxWaitTime 30] set attr3 [list sessionPersistenceMode NONE] set kuki [list maximumAge -1] set cookie [list $kuki] Set cookieSettings [list defaultCookieSettings $cookie] set attrs [list $attr1 $attr2 $attr3 $cookieSettings] set sessionMgr [list sessionManagement $attrs]
sessionManagement {{enableSecurityIntegration true} {maxWaitTime 30} {sessionPersistenceMode NONE} {defaultCookieSettings {{maximumAge -1}}}}
attr1 = ['enableSecurityIntegration', 'true'] attr2 = ['maxWaitTime', 30] attr3 = ['sessionPersistenceMode', 'NONE'] kuki = ['maximumAge', -1] cookie = [kuki] cookieSettings = ['defaultCookieSettings', cookie] attrs = [attr1, attr2, attr3, cookieSettings] sessionMgr = [['sessionManagement', attrs]]
[[sessionManagement, [[enableSecurityIntegration, true], [maxWaitTime, 30], [sessionPersistenceMode, NONE], [defaultCookieSettings [[maximumAge, -1]]]]
set | is a Jacl command |
attr1, attr2, attr3, attrs, sessionMgr | are variable names |
$ | is a Jacl operator for substituting a variable name with its value |
enableSecurityIntegration | is an attribute |
true | is a value of the enableSecurityIntegration attribute |
maxWaitTime | is an attribute |
30 | is a value of the maxWaitTime attribute |
sessionPersistenceMode | is an attribute |
NONE | is a value of the sessionPersistenceMode attribute |
$AdminConfig create ApplicationConfig $appDeploy [list $sessionMgr]
print AdminConfig.create('ApplicationConfig', appDeploy, sessionMgr)
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere Application Server configuration |
create | is an AdminConfig command |
ApplicationConfig | is an attribute |
appDeploy | evaluates the ID of the deployed application that is specified in step number 2 |
list | is a Jacl command |
sessionMgr | evaluates the ID of the session manager that is specified in step number 4 |
(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#ApplicationConfig_1)
set configs [lindex [$AdminConfig showAttribute $appDeploy configs] 0] set appConfig [lindex $configs 0] set SM [$AdminConfig showAttribute $appConfig sessionManagement] $AdminConfig modify $SM $attrs
configs = AdminConfig.showAttribute (appDeploy, 'configs') appConfig = configs[1:len(configs)-1] SM = AdminConfig.showAttribute (appConfig, 'sessionManagement') AdminConfig.modify (SM, attrs)
AdminConfig.save()
In this information ...Related concepts
Related tasks
| IBM Redbooks, demos, education, and more(Index) Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience. This feature requires Internet access. Most of the following links will take you to information that is not part of the formal product documentation and is provided "as is." Some of these links go to non-IBM Web sites and are provided for your convenience only and do not in any manner serve as an endorsement by IBM of those Web sites, the material thereon, or the owner thereof. |