summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Negrea <snegrea@redhat.com>2012-08-13 23:20:12 (GMT)
committerStefan Negrea <snegrea@redhat.com>2012-08-13 23:20:12 (GMT)
commit06a05b1371c11563b639d4faf74f27254668cd21 (patch)
tree37534f7e24844b761b29375c4cb0b1efba85464b
parent1084a72ad31e8d78529ce8313e9e83c12b264ec7 (diff)
downloadrhq-06a05b1371c11563b639d4faf74f27254668cd21.zip
rhq-06a05b1371c11563b639d4faf74f27254668cd21.tar.gz
rhq-06a05b1371c11563b639d4faf74f27254668cd21.tar.xz
[BZ 829329] Enable the discovery of server-group deployments after a domain deployment is sent to server groups.
-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 6192c18..54cffbf 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());
}