Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5246 Open console support
  3. JBAS-6219

ManagementView.getTemplate() should return a new copy of the DeploymentTemplateInfo on every call

XMLWordPrintable

      In our create-resource code, we do the following:

      DeploymentTemplateInfo template = managementView.getTemplate(templateName);
      Map<String, ManagedProperty> managedProperties = template.getProperties();
      // Update managedProperties according to the properties the user entered in the EmbJopr UI.
      managementView.applyTemplate(ManagedDeployment.DeploymentPhase.APPLICATION, resourceName, template);
      managementView.process();

      This all works fine the first time through. The problem is the next time we execute the above code using the same templateName, getTemplate(() returns the same DeploymentTemplateInfo from the previous call (with the updates we made to its managedProperties). Instead, it should return a new "fresh" DeploymentTemplateInfo object that contains only the properties from the original template.

              starksm64 Scott Stark (Inactive)
              ips_jira Ian Springer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: