container.managementContext.register(instance);
// Register if it is a management provider
if (instance instanceof ManagementProvider)
{
ManagementProvider provider = (ManagementProvider)instance;
container.addProvider(provider);
}
}
}
return instance;