{
log.warn("Failed to create ManagedObject for: "+comp, e);
}
}
}
ManagedDeploymentImpl mdi = new ManagedDeploymentImpl(md.getName(), md.getName(), null, unitMOs);
mdi.setTypes(Collections.singleton("external-mbean"));
try
{
processManagedDeployment(mdi, null, DeploymentState.STARTED, 0, trace);
}
catch(Exception e)
{
log.warn("Failed to process ManagedDeployment for: " + md.getName(), e);
}
}
}
// Process the bootstrap deployments
for(ManagedDeployment md : bootstrapManagedDeployments.values())
{
try
{
//
processManagedDeployment(md, null, DeploymentState.STARTED, 0, trace);
}
catch(Exception e)
{
log.warn("Failed to process ManagedDeployment for: " + md.getName(), e);
}
}
if(this.runtimeMOs.size() > 0)
log.warn("Failed to merged the following runtime ManagedObjects: "+runtimeMOs);
// Now create a ManagedDeployment for the platform beans
Map<String, ManagedObject> platformMBeanMOs = ManagementFactoryUtils.getPlatformMBeanMOs(managedObjFactory);
ManagedDeploymentImpl platformMBeans = new ManagedDeploymentImpl("JDK PlatformMBeans", "PlatformMBeans", null,
platformMBeanMOs);
List<ManagedObject> gcMbeans = ManagementFactoryUtils.getGarbageCollectorMXBeans(managedObjFactory);
Map<String, ManagedObject> gcMOs = new HashMap<String, ManagedObject>();
for (ManagedObject mo : gcMbeans)
gcMOs.put(mo.getName(), mo);
List<ManagedObject> mmMbeans = ManagementFactoryUtils.getMemoryManagerMXBeans(managedObjFactory);
Map<String, ManagedObject> mmMOs = new HashMap<String, ManagedObject>();
for (ManagedObject mo : mmMbeans)
mmMOs.put(mo.getName(), mo);
List<ManagedObject> mpoolMBeans = ManagementFactoryUtils.getMemoryPoolMXBeans(managedObjFactory);
Map<String, ManagedObject> mpoolMOs = new HashMap<String, ManagedObject>();
for (ManagedObject mo : mpoolMBeans)
mpoolMOs.put(mo.getName(), mo);
ManagedDeploymentImpl gcMD = new ManagedDeploymentImpl("GarbageCollectorMXBeans", "GarbageCollectorMXBeans",
null, gcMOs);
platformMBeans.getChildren().add(gcMD);
ManagedDeploymentImpl mmMD = new ManagedDeploymentImpl("MemoryManagerMXBeans", "MemoryManagerMXBeans", null, mmMOs);
platformMBeans.getChildren().add(mmMD);
ManagedDeploymentImpl mpoolMD = new ManagedDeploymentImpl("MemoryPoolMXBeans", "MemoryPoolMXBeans", null, mpoolMOs);
platformMBeans.getChildren().add(mpoolMD);
try
{
// Create the ManagedComponents