雞肋功能,沒有多大實際作用,只是覺得還有點意思,所以拿來跟大家分享。
1、將如下Jython script代碼COPY至一個文件timeout.py中。
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() 2、修改<timeout value>項為你自己想要的值。
3、保存此文件。
4、執行wsadmin命令
wsadmin -f timeout.py
參考 《WAS6.1 Redbook》
posted on 2007-06-15 20:36
Robin's Programming World 阅读(4373)
评论(0) 编辑 收藏 所属分类:
Webshere