WAS v8.5 > Script the application serving environment (wsadmin) > Configure servers with scripting

Configure timer manager custom properties using wsadmin

We can use wsadmin to set custom properties for the timer manager.

The lateTimerTime custom property represents the number of seconds beyond which a late-firing timer causes an informational message to be logged. The informational message is logged once per timer manager. Default is 5 seconds and a value of 0 disables this property.

  1. Launch the wsadmin scripting tool using the Jython scripting language.

  2. Identify the application server, and assign it to the server variable. Use the AdminConfig object, and the getid command to retrieve the configuration ID of the server and assign it to the <varname> variable:

    • Using Jacl:

        set serv1 [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]
    • Using Jython:

        serv1 = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')

  3. Identify the timer manager that belongs to the server, and assign it to the timer manager variable. Use the AdminConfig object, the list command, and the server variable to retrieve the timer manager and assign it to the <varname> variable:

    • Using Jacl:

        set timermanager1 [$AdminConfig list TimerManagerInfo $serv1]
    • Using Jython:

        timermanager1 = AdminConfig.list('TimerManagerInfo', 'serv1')

  4. Create a new J2EEResourcePropertySet property set for the timer manager, and assign it to the timer manager property set variable. Use the AdminConfig object, the create command, and the timer manager variable to create a new J2EEResourcePropertySet and assign it to the <varname> variable:

    • Using Jacl:

    • Using Jython:

        timermanagerpropset1 = AdminConfig.create('J2EEResourcePropertySet', 'timermanager1', [])

  5. Create a new J2EEResourceProperty for the J2EEResourcePropertySet, and assign it to the timer manager property variable.

    Use the AdminConfig object, the create command, and the property set variable to create a new J2EEResourceProperty for the lateTimerTime custom property and assign it to the <varname> variable:

    • Using Jacl:

      set timermanagerproperty1 [$AdminConfig create J2EEResourceProperty $timermanagerpropset1 
      {{name "lateTimerTime"} {value "10"} {description "Custom lateTimerTime"} {type "java.lang.String"} 
      {required "false"}}]
    • Using Jython:

      timermanagerproperty1 = AdminConfig.create('J2EEResourceProperty', 'timermanagerpropset1', 
      '[[name "lateTimerTime"] [value "10"] [description "Custom lateTimerTime"] [type "java.lang.String"] 
      [required "false"]]')

    The following parameters exist for the new J2EEResourceProperty property:

    Name

    lateTimerTime

    Value

    Number of seconds

    Description

    Specify a description

    Type

    Select java.lang.String

  6. Save the configuration changes.

    Enter the following command to save your changes:

    • Using Jacl:

        $AdminConfig save
    • Using Jython:

  7. In a network deployment environment only, synchronize the node.

    Use the syncActiveNodes script in the AdminNodeManagement script library to propagate the changes to all active nodes, for example:

    • Using Jacl:

        $AdminNodeManagement syncActiveNodes
    • Using Jython:

        AdminNodeManagement.syncActiveNodes()


Results

You have created and configured custom properties for the timer manager using wsadmin.


Related


Configure timer managers


+

Search Tips   |   Advanced Search