Editing a Resource Template

You can edit a resource template from the resource templates list in the GUI.

Procedure

  1. Select Shared Objects > Resource Templates.
  2. Select a resource template from the list.
    You can use the Type and Scope to filter the list of resource templates.
  3. Click the General tab and edit the configuration fields as required.
    Some resource templates have properties that accept passwords. Passwords can be specified as clear or obfuscated text.
  4. Click one of the following action buttons. The action performed by a button applies only to the tab being edited.
    Option Action
    Save Save changes to the database.
    Revert Discard changes and revert to the last saved state.
    Restore Default Restore default values for fields that have a default. If a field does not have a default, the value stays as is.
    The Save and Revert buttons are disabled.

    If there are resource instances that depend on the modified resource template and if there are applications that use those resource instances, the Apply changes in resource template to runtime dialog is displayed.

  5. Perform the following steps in the Apply changes in resource template to runtime dialog box.
    1. In the Reinstall Resource Instances section, select the resource instances that you want to reinstall. These are resource instances created from this resource template or other resource templates that depend on the modified resource template.
      Tip: If the resource template is heavily used, select the resource instances in the Reinstall Resource Instances section (and not select the related applications in the Restart Applications section). Restart all the nodes where the related applications are running.
    2. In the Restart Applications section, select the applications that you want to restart.

      If applications have more than 1000 entities that need to be restarted, it is recommended that you restart all the related nodes instead of applications as it may take a long time to generate the huge number of tasks. The applications start using the new resource instance.

      If an application have more than 1000 entities, the application cannot be selected in Restart Applications section and the following warning message is displayed:

      Warning: Since a large number of entities needs to be restarted due to resource instance reinstallation nodes will be restarted immediately after resources instances have been reinstalled
    3. In the Restrict Nodes section, select the nodes where you want the resource instances reinstalled and the applications restarted.

      If an application has more than 1000 entities, the following warning is displayed:

      Warning: all selected Nodes will be restarted immediately after Resource Instances have been re-installed
    4. Click Save.

CLI

You can edit a resource template using the command-line utility.

Procedure

  1. In the data file, specify the type of the resource template in the xsi:type attribute.
    <ResourceTemplate
            xsi:type="amxdata:JdbcResourceTemplate"
            name="JdbcResource"
            description="This is a new Jdbc Resource"
            maxConnections="10">
            <Direct
                xsi:type="amxdata:Direct"
                dbUrl="jdbc:hsqldb:hsql://localhost:1234/jdbcRtDb"
                jdbcDriver="org.hsqldb.jdbcDriver"
                isTransactional="false"
                loginTimeOut="60000"/>       
            <InlineCredentials username="a" password="a"/>
        </ResourceTemplate>
  2. In the AMXAdminTask element, set the action attribute to edit and the objectSelector attribute ResourceTemplate|Environment/ResourceTemplate|Environment/Application/ResourceTemplate/>.
    <AMXAdminTask action="edit" 
    objectSelector="ResourceTemplate|Environment/ResourceTemplate|Environment/ Application/ResourceTemplate">
  3. If the total number of entities in an application is more than 1000, specify:
    options="handle-dependencies"

    The related nodes are restarted automatically; applications are not restarted.