Actually Ilaya just pointed out to me that the preProcessSharedContext is of course invoked for all available plugins earlier (not when a specific Module is being deployed), so the supports() method would not affect it. Therefore there does need to be a direct check in that method.

I still think the plugin could return a boolean value from supports() that is based on that global jmx enabled flag. Even though it's not related to a single Module, it doesn't seem right for the plugin to return true all the time if it would not do anything at all since jmx is not enabled and it did not register anything in the shared context anyways.