+

Search Tips   |   Advanced Search

Configure the runtime transaction service

Use wsadmin.sh to configure transaction properties for servers. The transaction service is a server runtime component that coordinates updates to multiple resource managers to ensure atomic updates of data. Transactions are started and ended by applications or the container in which the applications are deployed.

There are two ways to perform this task. Use the steps in this task to use the AdminControl object to modify the transaction service configuration. Alternatively, we can use the configureTransactionService Jython script in the AdminServerManagement script library to configure the transaction service configuration attributes. Use the configureRuntimeTransactionService to update the transaction service MBean attributes. The wsadmin tool automatically loads the scripts when the tool starts.

Use the following syntax to configure transaction service settings using the configureTransactionService script:

Use the following syntax to configure runtime transaction service settings using the configureRuntimeTransactionService script:

For additional information and argument definitions, see the documentation for the AdminServerMananagment script library.

  1. Identify the transaction service MBean for the application server.

    Use the completeObjectName command for the AdminControl object to return the transaction service MBean for the server1 server, and to set it to the ts variable:

    • Jacl:

        set ts [$AdminControl completeObjectName cell=mycell,node=mynode, process=server1,type=TransactionService,*]

    • Jython:
      ts = AdminControl.completeObjectName('cell=mycell,node=mynode, process=server1,type=TransactionService,*')
      print ts

    Element Description
    set A Jacl command
    ts A variable name
    $ A Jacl operator for substituting a variable name with its value
    AdminControl An object that enables the manipulation of MBeans running in a server process
    completeObjectName An AdminControl command

      cell=mycell,node=mynode, process=server1,type=TransactionService

    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, and process.

    Example output:

      WebSphere:cell=mycell,name=TransactionService,mbeanIdentifier=TransactionService, type=TransactionService,node=mynode,process=server1

  2. Modify the runtime transaction service configuration attributes.

    • Jacl:

        $AdminControl setAttributes $ts {{clientInactivityTimeout 30} {totalTranLifetimeTimeout 180}}

    • Jython:

        AdminControl.setAttributes(ts, [['clientInactivityTimeout', 30], ['totalTranLifetimeTimeout', 180]])

    The following table shows the elements in the previous commands.

    Element Description
    $ Jacl operator for substituting a variable name with its value
    AdminControl An object that enables the manipulation of MBeans running in a server process
    setAttributes An AdminControl command
    ts Evaluates to the ID of the transaction service of interest
    clientInactivityTimeout An attribute
    30 The value of the clientInactivityTimeout attribute specified in seconds. A value of 0 means that there is no timeout limit.
    totalTranLifetimeTimeout An attribute
    180 The value of the totalTranLifetimeTimeout attribute specified in seconds. A value of 0 means that there is no timeout limit.


Subtopics


Related tasks

  • Configure transaction properties for an application server
  • Automating server administration
  • Use the wsadmin scripting AdminControl object for scripted administration

  • Node administration scripts
  • Server settings configuration scripts
  • Transaction service settings
  • Commands for the AdminControl object