{
ComponentType type = new ComponentType("MCBean", "MCServer");
ManagedObject serverMO = managedObjectFactory.initManagedObject(server, "JBossServer", null);
if (serverMO.getOperations() != null && serverMO.getOperations().size() == 0)
{
ManagedOperationImpl shutdown = new ManagedOperationImpl("Shutdown the server", "shutdown");
if (serverMO instanceof MutableManagedObject)
{
HashSet<ManagedOperation> ops = new HashSet<ManagedOperation>();
ops.add(shutdown);
MutableManagedObject mmo = MutableManagedObject.class.cast(serverMO);