使用脚本编制配置运行时事务服务
使用 wsadmin 工具配置服务器的事务属性。事务服务是服务器运行时组件,可以协调对多个资源管理器进行的更新以确保进行原子数据更新。由应用程序或部署应用程序的容器开始和结束事务。
关于此任务
有两种方式可用来执行本任务。通过本任务中的步骤来使用 AdminControl 对象,以修改事务服务配置。或者,可以使用 AdminServerManagement 脚本库中的 configureTransactionService Jython 脚本来配置事务服务配置属性。可以使用 configureRuntimeTransactionService 来更新事务服务 MBean 属性。wsadmin 工具启动时将自动装入脚本。
通过以下语法使用 configureTransactionService 脚本来配置事务服务设置:
AdminServerManagement.configureTransactionService(nodeName, serverName, totalTranLifetimeTimeout, clientInactivityTimeout,
maximumTransactionTimeout, heuristicRetryLimit, heuristicRetryWait, propogatedOrBMTTranLifetimeTimeout, asyncResponseTimeout,
otherAttributeList)
通过以下语法使用 configureRuntimeTransactionService 脚本来配置运行时事务服务设置:
AdminServerManagement.configureRuntimeTransactionService(nodeName, serverName, totalTranLifetimeTimeout,
clientInactivityTimeout)
有关其他信息和参数定义,请参阅 AdminServerMananagment 脚本库的文档。