Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Configure servers with scripting
Configure database session persistence using scripting
Jacl
set server [$AdminConfig getid /Node:node_name/Server:server_name]
set sm [$AdminConfig list SessionManager $server]
$AdminConfig modify $sm {{sessionPersistenceMode "DATABASE"}}
set sesdb [$AdminConfig list SessionDatabasePersistence $sm]
$AdminConfig modify $sesdb { {userId "db2_administrator"} {password "db2_password"} {tableSpaceName ""} {datasourceJNDIName "jdbc/SessionDataSource"} }Jython...
server = AdminConfig.getid('/Node:node_name/Server:server_name
Saving configuration changes with wsadmin.sh')
sm = AdminConfig.list('SessionManager', server)
AdminConfig.modify(sm,'[[sessionPersistenceMode "DATABASE"]]')
sesdb = AdminConfig.list('SessionDatabasePersistence',sm)
AdminConfig.modify(sesdb,'[[userId "db2_administrator"] [password "db2_password"] [tableSpaceName ""] [datasourceJNDIName "jdbc/SessionDataSource"]]')
Use the wsadmin scripting AdminConfig object for scripted administration
Commands for the AdminConfig object using wsadmin.sh
Configure for database session persistence