Configuring transaction properties for a server using scripting

Use scripting to configure transaction properties for servers.

Before you begin

Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.

About this task

Perform the following steps to configure the runtime transaction properties for an application server.

Procedure

  1. Identify the transaction service MBean for the application server. The following command returns the transaction service MBean for server1.
    • Using Jacl:
      set ts [$AdminControl completeObjectName cell=mycell,node=mynode,process=server1,type=TransactionService,*]
    • Using Jython:
      ts = AdminControl.completeObjectName('cell=mycell,node=mynode,process=server1,type=TransactionService,*')
      print ts
    where:
    set is a Jacl command
    ts is a variable name
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere server process
    completeObjectName is an AdminControl command
    cell=mycell,node=mynode,process=server1,type=TransactionService is a fragment of the object name whose complete name is returned by this command. It is used to find the matching object name which is, in this case, the transaction object MBean for the node mynode, where mynode is the name of the node that you use to synchronize configuration changes. For example: type=TransactionService, process=server1. It can be any valid combination of domain and key properties. For example, type, name, cell, node, process, etc.
    Example output:
    WebSphere:cell=mycell,name=TransactionService,mbeanIdentifier=TransactionService,
    type=TransactionService,node=mynode,process=server1
  2. Modify the attributes.
    • Using Jacl:

      $AdminControl setAttributes $ts {{clientInactivityTimeout 30} {totalTranLifetimeTimeout 180}}
    • Using Jython:

      AdminControl.setAttributes(ts, [['clientInactivityTimeout', 30],  ['totalTranLifetimeTimeout', 180]])
    where:
    $ is a Jacl operator for substituting a variable name with its value
    AdminControl is an object that enables the manipulation of MBeans running in a WebSphere server process
    setAttributes is an AdminControl command
    ts evaluates to the ID of the transaction service specified in step number 1
    clientInactivityTimeout is an attribute
    30 is the value of the clientInactivityTimeout attribute specified in seconds. A value of 0 means that there is no timeout limit.
    totalTranLifetimeTimeout is an attribute
    180 is the value of the totalTranLifetimeTimeout attribute specified in seconds. A value of 0 means that there is no timeout limit.



In this information ...


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.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=txml_transaction
File name: txml_transaction.html