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 and edit the configuration fields are required.
    Some resource templates have properties that accept passwords. Passwords can be specified as clear or obfuscated text.
  4. Click an action button. 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.
  5. 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 displays.
    1. 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.
    2. Select the applications that you want to restart.
    3. Select the nodes where you want the resource instances reinstalled and the applications restarted.
  6. 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">