Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

C:\Program Files\IBM\WebSphere\AppServer\bin\ProfileManagement

dep = AdminConfig.getid("/Deployment:isclite/" )
appDep = AdminConfig.list("ApplicationDeployment", dep )
sesMgmt = AdminConfig.list("SessionManager", appDep )
# check if existing sesMgmt there or not, if not then create a new one, if
exist then modify it
if (sesMgmt == ""):
# get applicationConfig to create new SessionManager
appConfig = AdminConfig.list("ApplicationConfig", appDep )
if (appConfig == ""):
# create a new one
appConfig = AdminConfig.create("ApplicationConfig", appDep, []
)
# then create a new SessionManager using new Application Config
just created
sesMgmt = AdminConfig.create("SessionManager", appConfig, [] )
else:
# create new SessionManager using the existing
ApplicationConfig
sesMgmt = AdminConfig.create("SessionManager", appConfig, [] )
#endElse
#endIf
# get tuningParams config id
tuningParams = AdminConfig.showAttribute(sesMgmt, "tuningParams" )
if (tuningParams == ""):
# create a new tuningParams
AdminConfig.create("TuningParams", sesMgmt, [["invalidationTimeout",
<timeout value>]] )
else:
#modify the existing one
AdminConfig.modify(tuningParams, [["invalidationTimeout", <timeout
value>]] )
#endElse
# saving the configuration changes
AdminConfig.save()
Change the <timeout value> on the two lines of this sample to the new
session expiration value. This number specifies the number of minutes the
console preserves the session during inactivity.
3. Save the file to any directory using, for example, the filename timeout.py.
4. Start the wsadmin scripting client from the
<was_home>/profiles/<profile_name>/bin directory.
Issue the following command.
wsadmin -f <path to jython file>/timeout.py

You might also like