summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Negrea <snegrea@redhat.com>2012-08-14 16:30:41 (GMT)
committerStefan Negrea <snegrea@redhat.com>2012-08-14 16:31:02 (GMT)
commit9d66cddac5b2f0d4cacf64ddc4f78c0cd7a7d02d (patch)
tree0075f9d4dc139fac5e616d2b50fb1e2f2e7d2e8c
parent7615ad2081f7b593ac50c34c648a6c6215c7a652 (diff)
downloadrhq-9d66cddac5b2f0d4cacf64ddc4f78c0cd7a7d02d.zip
rhq-9d66cddac5b2f0d4cacf64ddc4f78c0cd7a7d02d.tar.gz
rhq-9d66cddac5b2f0d4cacf64ddc4f78c0cd7a7d02d.tar.xz
[BZ 829329] Enable the discovery of server-group deployments after a domain deployment is sent to server groups.
(cherry picked from commit 06a05b1371c11563b639d4faf74f27254668cd21)
-rw-r--r--modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java7
-rw-r--r--modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainDeploymentComponent.java8
2 files changed, 15 insertions, 0 deletions
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
index ff55c8d..27b1133 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseServerComponent.java
@@ -552,6 +552,13 @@ public abstract class BaseServerComponent<T extends ResourceComponent<?>> extend
return result;
}
+ /**
+ * Requests a deferred child resource discovery for sub-resources of this server.
+ */
+ public void requestDeferredChildResourcesDiscovery() {
+ this.context.getInventoryContext().requestDeferredChildResourcesDiscovery();
+ }
+
@Override
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) throws Exception {
Set<MeasurementScheduleRequest> skmRequests = new HashSet<MeasurementScheduleRequest>(requests.size());
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainDeploymentComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainDeploymentComponent.java
index 82fdfef..56b2461 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainDeploymentComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/DomainDeploymentComponent.java
@@ -77,6 +77,14 @@ public class DomainDeploymentComponent extends DeploymentComponent implements Op
Result res = getASConnection().execute(operation, 120); // wait up to 2 minutes
if (res.isSuccess()) {
operationResult.setSimpleResult("Successfully deployed to server groups " + serverGroups);
+
+ //request the server to discover child resources to allow the discovery of the deployments
+ //on server groups immediately
+ if (this.context.getParentResourceComponent().getClass().isInstance(HostControllerComponent.class)) {
+ HostControllerComponent<?> hostController = (HostControllerComponent<?>) this.context
+ .getParentResourceComponent();
+ hostController.requestDeferredChildResourcesDiscovery();
+ }
} else {
operationResult.setErrorMessage("Deployment to server groups failed: " + res.getFailureDescription());
}