String deploymentTypeString = deploymentType.getType();
ManagementView managementView = discoveryContext.getParentResourceComponent().getConnection().getManagementView();
// TODO (ips): Only refresh the ManagementView *once* per runtime discovery scan, rather than every time this
// method is called. Do this by providing a runtime scan id in the ResourceDiscoveryContext.
managementView.load();
Set<String> deploymentNames = null;
try
{
deploymentNames = managementView.getDeploymentNamesForType(deploymentTypeString);